<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Doug Diego &#187; Code</title>
	<atom:link href="http://dougdiego.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougdiego.com</link>
	<description></description>
	<lastBuildDate>Tue, 17 Jan 2012 21:57:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Three20: Uploading an image to a server</title>
		<link>http://dougdiego.com/2010/12/24/three20-uploading-an-image-to-a-server/</link>
		<comments>http://dougdiego.com/2010/12/24/three20-uploading-an-image-to-a-server/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 20:00:44 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Three20]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=373</guid>
		<description><![CDATA[Here&#8217;s an example to upload an image (or any data file) to a server:]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an example to upload an image (or any data file) to a server:</p>
<pre class="brush: cpp; title: ; notranslate">
- (void) uploadMediaForUserId: (NSString*) userId {
	NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys:
								kAPIVersion, @&quot;v&quot;,
								nil];
	// Media Name
	if( TTIsStringWithAnyText(_mediaName)){
		[parameters setObject:_mediaName forKey:@&quot;n&quot;];
	}

	// Media Description
	if( TTIsStringWithAnyText(_mediaDescription)){
		[parameters setObject:_mediaDescription forKey:@&quot;d&quot;];
	}

	// REST resource, where kMedia: @&quot;/users/%@/media&quot;;
	NSString *resource = [NSString stringWithFormat:kMedia, userId];

	// Create the URL, where kServerURL is something like &quot;http://www.dougdiego.com&quot;
	NSString *url = [kServerURL stringByAppendingFormat:@&quot;%@?%@&quot;, resource, [parameters gtm_httpArgumentsString]];
	// Resulting URL looks like: http://www.dougdiego.com/users/12345/media

	TTURLRequest* request = [TTURLRequest requestWithURL:url  delegate:self];
	request.httpMethod = @&quot;POST&quot;; 

	NSString * imageLocalUrl = [NSString stringWithFormat:@&quot;documents://%@&quot;,_mediaFilename];
	NSData *imageData = UIImageJPEGRepresentation(TTIMAGE(imageLocalUrl), 0.6); 

	// Set the media file with the parameter: file
	[request addFile:imageData mimeType:@&quot;image/jpeg&quot;  fileName:@&quot;file&quot;]; 

	request.cachePolicy = TTURLRequestCachePolicyNoCache;
	request.cacheExpirationAge = TT_CACHE_EXPIRATION_AGE_NEVER;

	TTURLJSONResponse* response = [[TTURLJSONResponse alloc] init];
	request.response = response;
	TT_RELEASE_SAFELY(response);

	[request send];
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/24/three20-uploading-an-image-to-a-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three20: Swipe to delete</title>
		<link>http://dougdiego.com/2010/12/24/three20-swipe-to-delete/</link>
		<comments>http://dougdiego.com/2010/12/24/three20-swipe-to-delete/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 14:00:28 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=368</guid>
		<description><![CDATA[Need to implement Swipe to delete in your Three20 project? In order to do so, I added the 3 following methods to my datasource (TTListDataSource subclass): Note: before adding the numberOfRowsInSection method, I was getting NSInternalInconsistencyException errors.]]></description>
			<content:encoded><![CDATA[<p>Need to implement Swipe to delete in your <a href="http://three20.info/">Three20</a> project?  In order to do so, I added the 3 following methods to my datasource (TTListDataSource subclass):</p>
<pre class="brush: cpp; title: ; notranslate">
- (BOOL) tableView: (UITableView *)tableView canEditRowAtIndexPath:  (NSIndexPath *)indexPath {
	return YES;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle: (UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
	[tableView beginUpdates];
	if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Make sure the row is there to delete
		if([_myModel.messages count] &gt;= indexPath.row){
            // Get the object to delete
			MyObject* myObject = [[_myModel.messages objectAtIndex:indexPath.row] retain];

           	// Remove the object, in my case this makes an API call
            [self removeObjectById: myobject.id];

            // Remove the object from the array
			[_myModel.messages removeObjectAtIndex:indexPath.row];

			// clean up
			TT_RELEASE_SAFELY(myObject);
		}
        // Delete the row from the UITableView
		[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:YES];
	}
	[tableView endUpdates];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
	return [_myModel.messages count];
}
</pre>
<p>Note: before adding the numberOfRowsInSection method, I was getting <strong>NSInternalInconsistencyException</strong>  errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/24/three20-swipe-to-delete/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Targeting the iPhone 4</title>
		<link>http://dougdiego.com/2010/12/24/targeting-the-iphone-4/</link>
		<comments>http://dougdiego.com/2010/12/24/targeting-the-iphone-4/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 04:44:51 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=360</guid>
		<description><![CDATA[Are you releasing a flashlight app for the iPhone 4 or writing an application that use the capabilities of a certain device? Apple provides a UIKit Dictionary key called UIRequiredDeviceCapabilities for this purpose. Apple define this key as: UIRequiredDeviceCapabilities (Array or Dictionary &#8211; iOS) lets iTunes and the App Store know which device-related features an [...]]]></description>
			<content:encoded><![CDATA[<p>Are you releasing a flashlight app for the iPhone 4 or writing an application that use the capabilities of a certain device?  Apple provides a UIKit Dictionary key called UIRequiredDeviceCapabilities for this purpose.  </p>
<p>Apple define this key as: <em><strong><a href="http://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html">UIRequiredDeviceCapabilities</a></strong> (Array or Dictionary &#8211; iOS) lets iTunes and the App Store know which device-related features an application requires in order to run. iTunes and the mobile App Store use this list to prevent customers from installing applications on a device that does not support the listed capabilities.</em></p>
<p>You set this key in the Info.plist.  Here is an example which tells the App Store that your app requires a camera flash.  You can use this if your app only runs on the iPhone 4:<br />
<a href="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-23-at-8.31.19-PM.png"><img src="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-23-at-8.31.19-PM-300x31.png" alt="" title="Screen shot 2010-12-23 at 8.31.19 PM" width="300" height="31" class="alignnone size-medium wp-image-362" /></a></p>
<pre class="brush: cpp; title: ; notranslate">
	&lt;key&gt;UIRequiredDeviceCapabilities&lt;/key&gt;
	&lt;array&gt;
		&lt;string&gt;camera-flash&lt;/string&gt;
	&lt;/array&gt;
</pre>
<p>More: <a href="http://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html">UIKit Keys</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/24/targeting-the-iphone-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Custom Fonts with FontLabel</title>
		<link>http://dougdiego.com/2010/12/23/iphone-custom-fonts-with-fontlabel/</link>
		<comments>http://dougdiego.com/2010/12/23/iphone-custom-fonts-with-fontlabel/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 02:52:24 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=353</guid>
		<description><![CDATA[Need to use your own custom font? Or you want to support a certain font that isn&#8217;t on older iPhonts? Check out the project FontLabel. To use FontLabel: 1. Get a copy of the project: https://github.com/zynga/FontLabel.git 2. Add the files to your project: 3. Add a font file to your project. You can find several [...]]]></description>
			<content:encoded><![CDATA[<p>Need to use your own custom font?  Or you want to support a certain font that isn&#8217;t on older iPhonts?  Check out the project <a href="https://github.com/zynga/FontLabel">FontLabel</a>.</p>
<p>To use FontLabel:<br />
1. Get a copy of the project: <a href="https://github.com/zynga/FontLabel.git">https://github.com/zynga/FontLabel.git</a></p>
<p>2. Add the files to your project:<br />
<a href="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-22-at-6.43.56-PM.png"><img src="http://dougdiego.com/wp-content/uploads/2010/12/Screen-shot-2010-12-22-at-6.43.56-PM.png" alt="" title="Add FontLabel files to your project" width="279" height="206" class="alignnone size-full wp-image-356" /></a></p>
<p>3. Add a font file to your project.   You can find several free fonts here: <a href="http://www.webpagepublicity.com/free-fonts.html">http://www.webpagepublicity.com/free-fonts.html</a></p>
<p>4. In your AppDelegate, add the import:</p>
<pre class="brush: cpp; title: ; notranslate">
#import &quot;FontManager.h&quot;
</pre>
<p>And then load the font file in the didFinishLaunchingWithOptions:</p>
<pre class="brush: cpp; title: ; notranslate">
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
	// Load Custom Fonts
	[[FontManager sharedManager] loadFont:@&quot;FuturaBoldBT&quot;];
}
</pre>
<p>In my example, I used the font &#8220;FuturaBoldBT.ttf</p>
<p>5.  Finally create a FontLabel, which is just a subclass of UILabel:</p>
<pre class="brush: cpp; title: ; notranslate">
-(void) displayMyLabel {
        FontLabel * myLabel = [[FontLabel alloc] initWithFrame:CGRectMake(10, 30, 50, 30)
												fontName:@&quot;FuturaBoldBT&quot; pointSize:26.0f];
	myLabel.textAlignment = UITextAlignmentCenter;
	myLabell.textColor = UIColor.whiteColor;
	[myLabel setBackgroundColor:UIColor.clearColor];
	[self addSubview:myLabel];
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/12/23/iphone-custom-fonts-with-fontlabel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sgx error (background gpu access not permitted)</title>
		<link>http://dougdiego.com/2010/10/01/sgx-error-background-gpu-access-not-permitted/</link>
		<comments>http://dougdiego.com/2010/10/01/sgx-error-background-gpu-access-not-permitted/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 15:45:07 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=344</guid>
		<description><![CDATA[I recently started seeing this error in my Cocos 2d iPhone application running on iOS 4.1: sgx error (background gpu access not permitted): Program received signal: “SIGABRT”. After searching around, I found this thread on the cocos2d forum. I modified my code in the ApplicationDelegate to look like: This solved my problem. I hope it [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started seeing this error in my Cocos 2d iPhone application running on iOS 4.1:<br />
<code><br />
sgx error (background gpu access not permitted):<br />
Program received signal: “SIGABRT”.<br />
</code></p>
<p>After searching around, I found this <a href="http://www.cocos2d-iphone.org/forum/topic/7326">thread</a> on the cocos2d forum.</p>
<p>I modified my code in the ApplicationDelegate to look like:</p>
<pre class="brush: cpp; title: ; notranslate">
- (void)applicationDidEnterBackground:(UIApplication *)application
{
	[[CCDirector sharedDirector] stopAnimation];
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
	[[CCDirector sharedDirector] startAnimation];
}

- (void)applicationWillResignActive:(UIApplication *)application
{
	[[CCDirector sharedDirector] pause];
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
	[[CCDirector sharedDirector] resume];
}
</pre>
<p>This solved my problem. I hope it helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2010/10/01/sgx-error-background-gpu-access-not-permitted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone Development Helper:  Fill up your Address Book</title>
		<link>http://dougdiego.com/2009/06/12/iphone-development-helper-fill-up-your-address-book/</link>
		<comments>http://dougdiego.com/2009/06/12/iphone-development-helper-fill-up-your-address-book/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 06:00:56 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ABAddressBookRef]]></category>
		<category><![CDATA[ABAddressBookSave]]></category>
		<category><![CDATA[ABMultiValueAddValueAndLabel]]></category>
		<category><![CDATA[ABMutableMultiValueRef]]></category>
		<category><![CDATA[ABRecordRef]]></category>
		<category><![CDATA[ABRecordSetValue]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=297</guid>
		<description><![CDATA[AddressBookFill is a simple application which populates your address book with contacts. This is useful when developing for the iPhone and working on the emulator. On many occasions, I&#8217;ve spent quite a bit of time adding contacts to the emulator to test something. Then when I change emulator version, they all get erased. This is [...]]]></description>
			<content:encoded><![CDATA[<p>AddressBookFill is a simple application which populates your address book with contacts. This is useful when developing for the iPhone and working on the emulator. </p>
<p>On many occasions, I&#8217;ve spent quite a bit of time adding contacts to the emulator to test something.  Then when I change emulator version, they all get erased.  This is very frustrating.  So I put together this simple application which allow you to programatically fill up your address book.</p>
<p>Currenly the address book is populated with U.S. Presidents.  Values are set for:<br />
* first name<br />
* last name<br />
* photo<br />
* phone number<br />
* birthday </p>
<p>I&#8217;ll make it more robust in the future. But you may find this useful for now.   The code might also be interesting if you&#8217;re learning how to program the address book.</p>
<p>Download: <a href="http://dougdiego.com/wp-content/uploads/2009/06/addressbookfill-1.0.tar.gz">addressbookfill-10.tar</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2009/06/12/iphone-development-helper-fill-up-your-address-book/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ASIHTTPRequest &#8211; Uploading Photos</title>
		<link>http://dougdiego.com/2009/04/08/asihttprequest-uploading-photos/</link>
		<comments>http://dougdiego.com/2009/04/08/asihttprequest-uploading-photos/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 15:46:16 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=252</guid>
		<description><![CDATA[Recently I used ASIHTTPRequest to upload images and other data from an iPhone application to a web server. I search around and looked at all the different options and this was best and easiest to use. It&#8217;s open source and comes with lots of good examples. I was particularly impressed with the network queue. The [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I used <a href="http://allseeing-i.com/ASIHTTPRequest/">ASIHTTPRequest</a> to upload images and other data from an iPhone application to a web server.  I search around and looked at all the different options and this was best and easiest to use.  It&#8217;s open source and comes with lots of good examples. I was particularly impressed with the network queue.</p>
<p>The one thing I did not find, was sample code for was posting an image to a server.  Here is some sample code:</p>
<pre class="brush: cpp; title: ; notranslate">
// Initilize Queue
[networkQueue setUploadProgressDelegate:statusProgressView];
[networkQueue setRequestDidFinishSelector:@selector(imageRequestDidFinish:)];
[networkQueue setQueueDidFinishSelector:@selector(imageQueueDidFinish:)];
[networkQueue setRequestDidFailSelector:@selector(requestDidFail:)];
[networkQueue setShowAccurateProgress:true];
[networkQueue setDelegate:self];

// Initilize Variables
NSURL *url;
ASIFormDataRequest * request;

// Add Image
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
     NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *dataPath = [documentsDirectory
     stringByAppendingPathComponent:@&quot;myImage.jpg&quot;];

// Get Image
NSData *imageData = [[[NSData alloc]
     initWithContentsOfFile:dataPath] autorelease];

// Return if there is no image
if(imageData != nil){
	url = [NSURL URLWithString:@&quot;http://myserver/upload.php&quot;];
	request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
	[request setPostValue:@&quot;myImageName&quot; forKey:@&quot;name&quot;];
	[request setData:imageData forKey:@&quot;file&quot;];
	[request setDidFailSelector:@selector(requestWentWrong:)];
	[request setTimeOutSeconds:500];
	[networkQueue addOperation:request];
	queueCount++;
}
[networkQueue go];
</pre>
<p>Note: It&#8217;s not necessary to use a queue here because I&#8217;m only uploading 1 thing.  But in my application I&#8217;m uploading many things and a queue was helpful.  It also runs in the asynchronously in the background, which prevents the UI from getting locked up.</p>
<p>Note 2: When sending large files you should use &#8220;setFile&#8221; instead of &#8220;setData&#8221;.  Files are then read from disk instead of memory.  Here is an updated example.  Thanks again to <a href="http://allseeing-i.com/ASIHTTPRequest/">Ben Copsey</a> for this library and his useful comments below.</p>
<pre class="brush: cpp; title: ; notranslate">
NSString *imagePath = [documentsDirectory
     stringByAppendingPathComponent:@&quot;myImage.jpg&quot;];
url = [NSURL URLWithString:@&quot;http://myserver/upload.php&quot;];
ASIFormDataRequest *request =
    [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];
[request setPostValue:@&quot;myImageName&quot; forKey:@&quot;name&quot;];
[request setFile:imagePath forKey:@&quot;photo&quot;];
</pre>
<p>More info on streaming here: <a href="http://allseeing-i.com/ASIHTTPRequest/How-to-use#streaming">http://allseeing-i.com/ASIHTTPRequest/How-to-use#streaming</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2009/04/08/asihttprequest-uploading-photos/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Undefined symbols: _SCNetworkReachabilityCreateWithName</title>
		<link>http://dougdiego.com/2008/12/23/undefined_symbols_scnetworkreachabilitycreatewithname/</link>
		<comments>http://dougdiego.com/2008/12/23/undefined_symbols_scnetworkreachabilitycreatewithname/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 17:36:43 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=171</guid>
		<description><![CDATA[I was recently adding some code to check for the availability of the network, so I can display an error to the user if unavailable. I looked at the SeismicXML application and borrowed the following code: I wouldn&#8217;t compile unless I added the following import: After adding this I still go 2 more errors, but [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently adding some code to check for the availability of the network, so I can display an error to the user if unavailable.</p>
<p>I looked at the SeismicXML application and borrowed the following code:</p>
<pre class="brush: cpp; title: ; notranslate">
// Use the SystemConfiguration framework to determine if the host that provides
// the RSS feed is available.
- (BOOL)isDataSourceAvailable
{
    static BOOL checkNetwork = YES;
    if (checkNetwork) {
// Since checking the reachability of a host can be expensive,
// cache the result and perform the reachability check once.
        checkNetwork = NO;

        Boolean success;
        const char *host_name = &quot;earthquake.usgs.gov&quot;;
		//const char *host_name = &quot;localhost&quot;;

        SCNetworkReachabilityRef reachability =
SCNetworkReachabilityCreateWithName(NULL, host_name);
        SCNetworkReachabilityFlags flags;
        success = SCNetworkReachabilityGetFlags(reachability, &amp;amp;amp;flags);
        _isDataSourceAvailable = success &amp;amp;amp;&amp;amp;amp;
(flags &amp;amp;amp; kSCNetworkFlagsReachable) &amp;amp;amp;&amp;amp;amp;
!(flags &amp;amp;amp; kSCNetworkFlagsConnectionRequired);
        CFRelease(reachability);
    }
    return _isDataSourceAvailable;
}
</pre>
<p>I wouldn&#8217;t compile unless I added the following import:</p>
<pre class="brush: cpp; title: ; notranslate">#import &lt;SystemConfiguration/SystemConfiguration.h&gt; </pre>
<p>After adding this I still go 2 more errors, but these were a bit more cryptic.</p>
<p><code> Undefined symbols:<br />
"_SCNetworkReachabilityCreateWithName", referenced from:<br />
-[TheElementsAppDelegate isDataSourceAvailable] in TheElementsAppDelegate.o<br />
"_SCNetworkReachabilityGetFlags", referenced from:<br />
-[TheElementsAppDelegate isDataSourceAvailable] in TheElementsAppDelegate.o<br />
ld: symbol(s) not found<br />
collect2: ld returned 1 exit status</code></p>
<p>After some digging around I realized that I was missing the SystemConfiguration.framework framework.</p>
<p>So here is what I did to add it.<br />
1. I right click on &#8220;Frameworks&#8221; and choose: Add &lt; Existing Framework<br />
<img class="alignnone size-full wp-image-172" title="add_framework" src="http://dougdiego.com/wp-content/uploads/2008/12/add_framework.png" alt="add_framework" width="474" height="290" /></p>
<p>2. Browsed to the file: /System/Library/Frameworks/SystemConfiguration.framework</p>
<p>3. Rebuilt the project and my error was gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2008/12/23/undefined_symbols_scnetworkreachabilitycreatewithname/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>iPhone Address Book</title>
		<link>http://dougdiego.com/2008/11/11/iphone-address-book/</link>
		<comments>http://dougdiego.com/2008/11/11/iphone-address-book/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 01:42:45 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=124</guid>
		<description><![CDATA[I found a great tutorial, with source code, for basic usage of the iPhone Address book: http://iphone.zcentric.com/2008/09/19/access-the-address-book/ It was very helpful for getting started with using the address book in my code.]]></description>
			<content:encoded><![CDATA[<p>I found a great tutorial, with source code, for basic usage of the iPhone Address book:</p>
<p><a href="http://iphone.zcentric.com/2008/09/19/access-the-address-book/">http://iphone.zcentric.com/2008/09/19/access-the-address-book/</a></p>
<p>It was very helpful for getting started with using the address book in my code.</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2008/11/11/iphone-address-book/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Distribution Provisioning Profile not showing up</title>
		<link>http://dougdiego.com/2008/11/11/distribution-provisioning-profile-not-showing-up/</link>
		<comments>http://dougdiego.com/2008/11/11/distribution-provisioning-profile-not-showing-up/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 01:35:08 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://dougdiego.com/?p=122</guid>
		<description><![CDATA[I recently spent about 2 hours trying to get my Distribution Provisioning Profile to show up. I followed the instructions and did everything, but still it would not show up. Then I came across this thread: http://www.v2ex.com/2008/10/22/distribution-provisioning-profile-not-showing-up/ The first suggestion was to create a new project. I created a new project and my Distribution Provisioning [...]]]></description>
			<content:encoded><![CDATA[<p>I recently spent about 2 hours trying to get my Distribution Provisioning Profile to show up. I followed the instructions and did everything, but still it would not show up.</p>
<p>Then I came across this thread: <a href="http://www.v2ex.com/2008/10/22/distribution-provisioning-profile-not-showing-up/">http://www.v2ex.com/2008/10/22/distribution-provisioning-profile-not-showing-up/</a></p>
<p>The first suggestion was to create a new project.  I created a new project and my Distribution Provisioning profile appeared in it.  Then I went back to my main project and it appeared there too.  Problem solved!</p>
]]></content:encoded>
			<wfw:commentRss>http://dougdiego.com/2008/11/11/distribution-provisioning-profile-not-showing-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

