<?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>WebSight Design Blog &#187; objective-c</title>
	<atom:link href="http://blog.websightdesign.com/tag/objective-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.websightdesign.com</link>
	<description>The Official Blog of WebSight Design, Inc.</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:40:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>Using the UIImagePickerController in an iPhone OS v2.2.1 app &amp; On A OS v3.0 Device</title>
		<link>http://blog.websightdesign.com/2009/08/31/using-the-uiimagepickercontroller-in-an-iphone-os-v2-2-1-app-on-a-os-v3-0-device/</link>
		<comments>http://blog.websightdesign.com/2009/08/31/using-the-uiimagepickercontroller-in-an-iphone-os-v2-2-1-app-on-a-os-v3-0-device/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 18:50:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cocoa touch]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.websightdesign.com/?p=225</guid>
		<description><![CDATA[So I wrote an iPhone application for a client using v2.2.1 of the iPhone SDK. (The client did not want to go OS v3.0 yet.) I needed to give a user the capability of taking and uploading a picture with the built-in camera or uploading a picture from the photo library on the phone. Seems [...]<p><a href="http://blog.websightdesign.com/2009/08/31/using-the-uiimagepickercontroller-in-an-iphone-os-v2-2-1-app-on-a-os-v3-0-device/">Using the UIImagePickerController in an iPhone OS v2.2.1 app &#038; On A OS v3.0 Device</a> is a post from: WebSight Design, Inc. company blog. With headquarters in the San Francisco bay area, WebSight Design, Inc. has been providing world class web engineering, creative design and hosting solutions since 1995. <a href="http://Websightdesign.com">WebSight Design</a></p>
]]></description>
			<content:encoded><![CDATA[<p>So I wrote an <a href="http://www.websightdesign.com/services/iphone">iPhone application</a> for a client using v2.2.1 of the iPhone SDK. (The client did not want to go OS v3.0 yet.) I needed to give a user the capability of taking and uploading a picture with the built-in camera or uploading a picture from the photo library on the phone. Seems pretty straightforward so far. Yes? I thought so. It turned out to be pretty tricky but the solution was very simple and was staring me in the face.</p>
<p><strong>The Problem</strong><br />
I had a UIViewController with an UIImageView setup to be used as a container for the selected image. I also had several UIButtons on the page. (One button for calling up the camera. Another button for calling up the photo library, etc&#8230;) So what should have happened is that the Camera or photo library UI would display a Modal View window the user instructing them to either take a picture or select a photo from their library. Once they did that, they would be returned to the main view and whatever photo they took or selected would appear in UIImageView as a preview. However, when I was selecting the photo the &#8220;editingInfo&#8221; NSDictionary object that was supposed to be returned would be there only about 50% of the time. The other 50% it would be returned empty. I double and triple checked my code and it was all correct. Something was zapping my dictionary object and I couldn&#8217;t, for the life of me, figure out what it was.</p>
<p>The second part to this problem was that the preview image never appeared whenever the user was grabbing their image from the camera. It worked if the photo library was the source but not if it was the camera. Very, very frustrating.</p>
<p>Here is my original code:</p>
<p>My .h file -</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #a61390;">@interface</span> AddPhotoController <span style="color: #002200;">:</span> UIViewController &nbsp;<span style="color: #002200;">&#123;</span><br />
IBOutlet UIImageView <span style="color: #002200;">*</span>imageView;<br />
IBOutlet UIButton <span style="color: #002200;">*</span>snapNewPictureButton;<br />
IBOutlet UIButton <span style="color: #002200;">*</span>selectFromPhotoLibraryButton;<br />
<span style="color: #002200;">&#125;</span><br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> UIImageView <span style="color: #002200;">*</span>imageView;<br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> UIButton <span style="color: #002200;">*</span>snapNewPictureButton;<br />
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic, retain<span style="color: #002200;">&#41;</span> UIButton <span style="color: #002200;">*</span> selectFromPhotoLibraryButton;</div></div>
<p>My .m file -</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #a61390;">@implementation</span> AddPhotoController<br />
<span style="color: #a61390;">@synthesize</span> imageView, snapNewPictureButton, selectFromPhotoLibraryButton;</div></div>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>IBAction<span style="color: #002200;">&#41;</span>getCameraPicture<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender<br />
<span style="color: #002200;">&#123;</span><br />
UIImagePickerController <span style="color: #002200;">*</span>picker <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImagePickerController alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
picker.delegate <span style="color: #002200;">=</span> self;<br />
picker.sourceType <span style="color: #002200;">=</span> UIImagePickerControllerSourceTypeCamera;<br />
picker.allowsImageEditing <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;</div></div>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">&#91;</span>self presentModalViewController<span style="color: #002200;">:</span>picker animated<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#91;</span>picker release<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></div>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>imagePickerController<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImagePickerController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>picker didFinishPickingImage<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>image editingInfo<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>editingInfo<br />
<span style="color: #002200;">&#123;</span><br />
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Image Meta Info.: %@&quot;</span>,editingInfo<span style="color: #002200;">&#41;</span>;</div></div>
<p>UIImage *selectedImage = image;<br />
imageView.image = selectedImage;<br />
self._havePictureData = YES;<br />
[self.useThisPhotoButton setEnabled:YES];</p>
<p>[picker dismissModalViewControllerAnimated:YES];<br />
}</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>imagePickerControllerDidCancel<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImagePickerController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>picker<br />
<span style="color: #002200;">&#123;</span><br />
<span style="color: #002200;">&#91;</span>picker dismissModalViewControllerAnimated<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></div>
<p>Like I said before, it all seems pretty straightforward. However, there were two things wrong with the above code.<br />
#1. Deprecated Method<br />
The UIImagePickerController method, <strong>– imagePickerController:didFinishPickingImage:editingInfo:</strong>, is deprecated in v3.0 of the iPhone OS. So even though I built the app using SDK v2.2.1, because the app will be running on 3.0 devices, I needed to use the new and improved method, <strong>- imagePickerController:didFinishPickingMediaWithInfo:editingInfo</strong>, which contains FIVE pieces of really important information:</p>
<ol>
<li> UIImagePickerControllerMediaType &#8211; Which specifies the type of media that this dictionary contains.</li>
<li> UIImagePickerControllerOriginalImage &#8211; Contains the original non-cropped image.</li>
<li> UIImagePickerControllerEditedImage &#8211; Contains the user-edited cropped image.</li>
<li> UIImagePickerControllerCropRect &#8211; Contains the CGRect that was applied to the original image.</li>
<li> UIImagePickerControllerMediaURL &#8211; If the object is a movie, this object contains the URL to be used by the media player.</li>
</ol>
<p>I simply accessed the &#8220;UIImagePickerControllerEditedImage&#8221; object from the dictionary and was off to the races.</p>
<p>#2. Dismissing the Modal View<br />
This one was really painful as it was so simple to solve. In order for the UIImageView to be updated correctly, you must dismiss the ImagePicker modal window BEFORE you attempt to update your UIImageView.</p>
<p>As a result of this, here is my updated method call:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> imagePickerController<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImagePickerController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>thePicker didFinishPickingMediaWithInfo<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/"><span style="color: #400080;">NSDictionary</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>imageInfo<br />
<span style="color: #002200;">&#123;</span><br />
<span style="color: #002200;">&#91;</span>thePicker dismissModalViewControllerAnimated<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;<br />
UIImage <span style="color: #002200;">*</span>img <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>imageInfo objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;UIImagePickerControllerEditedImage&quot;</span><span style="color: #002200;">&#93;</span>;<br />
previewImage.image <span style="color: #002200;">=</span> <span style="color: #a61390;">nil</span>;<br />
self.previewImage.image <span style="color: #002200;">=</span> img;</div></div>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/"><span style="color: #400080;">NSData</span></a> <span style="color: #002200;">*</span>imageData <span style="color: #002200;">=</span> UIImagePNGRepresentation<span style="color: #002200;">&#40;</span>img<span style="color: #002200;">&#41;</span>;<br />
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>imageData length<span style="color: #002200;">&#93;</span> <span style="color: #002200;">&amp;</span>gt; <span style="color: #2400d9;">0</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span></div></div>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">&#91;</span>self archivePictureData<span style="color: #002200;">:</span>imageData<span style="color: #002200;">&#93;</span>;<br />
self._havePictureData <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;</div></div>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">&#91;</span>self.useThisPhotoButton setEnabled<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></div>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">&#125;</span></div></div>
<p>That was it. Hope that was helpful.</p>
<p><a href="http://blog.websightdesign.com/2009/08/31/using-the-uiimagepickercontroller-in-an-iphone-os-v2-2-1-app-on-a-os-v3-0-device/">Using the UIImagePickerController in an iPhone OS v2.2.1 app &#038; On A OS v3.0 Device</a> is a post from: WebSight Design, Inc. company blog. With headquarters in the San Francisco bay area, WebSight Design, Inc. has been providing world class web engineering, creative design and hosting solutions since 1995. <a href="http://Websightdesign.com">WebSight Design</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.websightdesign.com/2009/08/31/using-the-uiimagepickercontroller-in-an-iphone-os-v2-2-1-app-on-a-os-v3-0-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Case Study: Carlos Santana iPhone App</title>
		<link>http://blog.websightdesign.com/2009/03/31/case-study-carlos-santana-iphone-app/</link>
		<comments>http://blog.websightdesign.com/2009/03/31/case-study-carlos-santana-iphone-app/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 02:33:12 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Clients]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[mobile development]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[Santana]]></category>

		<guid isPermaLink="false">http://blog.websightdesign.com/?p=25</guid>
		<description><![CDATA[<a href=http://blog.websightdesign.com/2009/03/31/case-study-carlos-santana-iphone-app/><img src=http://blog.websightdesign.com/wp-content/uploads/2009/03/icon-copy-thumb.gif class=imgtfe hspace=5 align=left width=200  border=0></a>About a month ago, WebSight Design released our first iPhone application, (http://itunes.com/app/Santana), for the musician Carlos Santana. I thought it might be interesting and maybe even helpful for others iPhone developers if I listed some of my experiences with building this application. I figure I would describe the application (features, etc&#8230;), and illustrate some of [...]<p><a href="http://blog.websightdesign.com/2009/03/31/case-study-carlos-santana-iphone-app/">Case Study: Carlos Santana iPhone App</a> is a post from: WebSight Design, Inc. company blog. With headquarters in the San Francisco bay area, WebSight Design, Inc. has been providing world class web engineering, creative design and hosting solutions since 1995. <a href="http://Websightdesign.com">WebSight Design</a></p>
]]></description>
			<content:encoded><![CDATA[<p style="clear: both"><a class="image-link" href="http://itunes.com/app/Santana"><img style=" display: inline; float: left; margin: 0 10px 10px 0;" src="http://blog.websightdesign.com/wp-content/uploads/2009/03/icon-copy-thumb.gif" alt="" width="57" height="57" align="left" /></a>About a month ago, <a title="WebSight Design, Inc." href="http://www.websightdesign.com" target="_blank">WebSight Design</a> released our first iPhone application, (<a title="Link to Santana app in iTunes" href="http://itunes.com/app/Santana" target="_blank">http://itunes.com/app/Santana</a>), for the musician <a title="Carlos Santana" href="http://www.santana.com" target="_blank">Carlos Santana</a>. I thought it might be interesting and maybe even helpful for others iPhone developers if I listed some of my experiences with building this application. I figure I would describe the application (features, etc&#8230;), and illustrate some of the pitfalls I encountered throughout the development process and how they were dealt with.</p>
<p style="clear: both"><a class="image-link" href="http://blog.websightdesign.com/wp-content/uploads/2009/03/screenshot-2.jpg"><img class="linked-to-original" style=" display: inline; float: left; margin: 0 10px 10px 0;" src="http://blog.websightdesign.com/wp-content/uploads/2009/03/screenshot-2-thumb.jpg" alt="" width="185" height="172" align="left" /></a><strong>Application Features</strong><br />
Right off the bat, having such a distinctive and dynamic client such as Carlos Santana means that nothing can be done in a simply pedestrian manner. (The man is an icon for crying out loud.) We wanted to incorporate custom artwork to try to create an immersive as an experience as possible. (Without blowing the bank of course.) We wanted the focus to be on his music. So we started there. Our Creative Director has been working with Santana for years now so she knew exactly what needed to be done. She came up with the icons for the navigation and the photo-scroller watermark image.</p>
<p>Seeing how we wanted it to be focused on Carlos&#8217; music, we incorporated several of his most popular music videos and song tracks. We optimized all of the videos for delivery specifically for the iPhone. We included his entire album discography and even included links to purchase songs and entire albums, (How old am I that I actually refer to them as &#8220;albums&#8221;.), via iTunes. but we also wanted to take advantage of the intimate nature of the iPhone by bringing back a feature that Carlos had intended for his website called: Musician&#8217;s Corner.</p>
<p style="clear: both"><a class="image-link" href="http://blog.websightdesign.com/wp-content/uploads/2009/03/screenshot-5.jpg"><img class="linked-to-original" style=" display: inline; float: left; margin: 0 10px 10px 0;" src="http://blog.websightdesign.com/wp-content/uploads/2009/03/screenshot-5-thumb.jpg" alt="" width="228" height="191" align="left" /></a>I really wanted to take advantage of the personal or intimate nature of the iPhone. On Santana.com, there is a section buried way, way down on the site called “The Musician’s Corner”. The original intent was to establish an area online where fellow musicians and fans could see and hear directly from Carlos and the musicians in his band, and learn how they work. Gain a better understanding and appreciation of some of his most popular songs. A few videos had been recorded and posted to the Santana website. Unfortunately, it never really took off. (I think, because it was so buried on the site.) However, I felt that the iPhone was the PERFECT platform for this type of content. With the tacit agreement from Santana Management, we added two videos for a couple of Carlos’ most popular songs: Black Magic Woman and Oye Como Va. We added them to the “More” section of the application under the heading “Lessons”.</p>
<p style="clear: both">So all told, we had about 12 videos and 25 music tracks. Plus, the discography, bio information, News and Tour Dates, made for a pretty hefty app. (Both in size and overall experience.)</p>
<p style="clear: both"><strong>Ad-hoc Distribution</strong><br />
Once we had the foundation laid out, I wanted to get the application installed on Carlos&#8217; and/or an iPhone for Santana Management. Apple provides two methods for deploying an app on to an iPhone: 1.) Via the App Store. 2.) Via Ad-hoc Distribution. Ad-hoc is the method given to developers to test their app or to get client approvals and such. Apple is very clear about it&#8217;s instructions on what you need to do in order to make Ad-hoc distribution work. I was so focused on building the app that I didn&#8217;t test as throughly as I could have, the steps to make the ad-hoc method work. The day came that Santana Management wanted me to install the application so they could play with it and review it. Sat there for several hours and could not for the life of me get it to work. That could have killed the deal right then and there. Thankfully, the folks over at Santana Management were very cool and understanding. They saw it running on my phone so they knew I wasn&#8217;t trying to pull a fast one. Still, that could have spelled the end-game right there.</p>
<p style="clear: both"><strong>Certificates and App Store Submission</strong><br />
Actually, writing the app code was the easy part compared to submitting the app to Apple and getting through their review process. First off, you have no idea how long it will take. You aren&#8217;t given a ballpark or even just a rough estimate. Nada. You just have to wait. We waited for one month before we were finally approved. (I have spoken with folks at Apple and they have since told me that the amount of time we spent &#8220;In Review&#8221; was about normal.)</p>
<p style="clear: both">My second error in this whole thing was that I failed to put in the appropriate alerts for when there is no available Internet connection. (Either WiFi, 3G or Edge.) I know, I know&#8230; a really silly, academic and time-wasting error. Well, Apple caught it immediately and rejected the app. doh! However, corrected the error and resubmitted the app within 24 hours of said rejection. One month later, I received notice that we were approved and inserted into the <a title="Santana in the App Store" href="http://itunes.com/app/Santana" target="_blank">App Store</a>.</p>
<p style="clear: both"><strong>Lessons Learned</strong><br />
There are several lessons I took away from the whole experience of developing for the iPhone platform for the first time. Here are a few of them:</p>
<ol style="clear: both">
<li><strong>Read the </strong><a title="iPhone Human Interface Guidelines" href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html" target="_blank"><strong>Apple Human Interface Guidelines (HIG)</strong></a>: Apple is *very* serious about developers following their guidelines. Plus, it&#8217;s actually a really good read with lots of extremely helpful information. Don&#8217;t skip this&#8230; you have been warned.</li>
<li><strong>Work With A Designer</strong>: I recently attended an <a title="Apple Tech Talk" href="http://developer.apple.com/events/iphone/techtalks/" target="_blank">iPhone Tech Talk</a> where I sat in on the UI Design workshop. Several iPhone apps were compared to one another. Time-and-time again, the most popular apps in their category were the ones with original artwork and a unique UI. Let&#8217;s face it. A table view is what it is. The trick is to come up with a unique approach to solving common problems. I was lucky enough to have access to a great designer. Take the time to work on the UI.</li>
<li><strong>Check for Leaks</strong>: Leaks will crash your app. Apple provides an AWESOME app called <a title="Shark" href="http://developer.apple.com/tools/sharkoptimize.html" target="_blank">Shark</a> to help with tracking down memory leaks and helping optimize your code.</li>
<li><strong>Code to Avoid Leaks</strong>: There are many best practices you should follow to avoid writing &#8220;leaky&#8221; code to begin with. Remember, there is no garbage collecting on the iPhone yet, (we&#8217;ll see in v3.0), so be sure to watch your retain-and-release counts. (It sounds much more daunting than it actually is.)</li>
<li><strong>Use the Simulator But Don&#8217;t Rely On It</strong>: The iPhone simulator that comes with the iPhone SDK is very nice but you have to be careful when using it. Sometimes code that works correctly in the simulator DOES NOT work once you compile and deploy onto the phone. This is true inversely as well. For example, I couldn&#8217;t figure out why I kept getting an error when compiling code for the simulator that included the Media framework. As soon as I just recompiled and deployed to the phone, the error went away.</li>
<li><strong>Test Ad-Hoc Deployment</strong>: There is gonna come a time when you need to deploy your app on a phone other than the one you use for your development. Perhaps your client would like to see the application running on their phone. You don&#8217;t want to be caught off guard like that. I know already&#8230; it&#8217;s not a fun position to be in!<strong><br />
</strong></li>
<li><strong>Submit and Be Patient</strong>: There is no rhyme-or-reason to the Apple app review process. (At least no reason they&#8217;ve made public anyway.) You just have to submit your app and then walk away. Go walk the dog. Go work on another app. Go be with your family that you have been neglecting for the past few weeks. <img src='http://blog.websightdesign.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Some application categories have a longer review queue than others. Regardless, it&#8217;s a fact that you&#8217;re gonna have some time on your hands. Don&#8217;t fight it. Embrace it.</li>
</ol>
<p style="clear: both">The only other takeaway from this whole experience I found is that people LOVE <a title="Carlos Santana - Santana.com" href="http://www.santana.com" target="_blank">Carlos Santana</a>. In the first week alone that the application was available in the Apple App Store, it was downloaded and installed by over one thousand iPhone and iPod Touch users. I&#8217;ve received comments from users that they really love the original artwork and in particular, they really like the music lessons. (I&#8217;m a musician too. I know what I&#8217;m talking about.)</p>
<p style="clear: both">I would love to hear if anyone has downloaded the app and would like to get your thoughts on it. Drop me a line and let me know.</p>
<p><br class="final-break" style="clear: both" /></p>
<p><a href="http://blog.websightdesign.com/2009/03/31/case-study-carlos-santana-iphone-app/">Case Study: Carlos Santana iPhone App</a> is a post from: WebSight Design, Inc. company blog. With headquarters in the San Francisco bay area, WebSight Design, Inc. has been providing world class web engineering, creative design and hosting solutions since 1995. <a href="http://Websightdesign.com">WebSight Design</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.websightdesign.com/2009/03/31/case-study-carlos-santana-iphone-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I&#8217;ve Fallen In Love&#8230; Her Name is Cocoa!</title>
		<link>http://blog.websightdesign.com/2008/08/23/ive-fallen-in-love-her-name-is-cocoa/</link>
		<comments>http://blog.websightdesign.com/2008/08/23/ive-fallen-in-love-her-name-is-cocoa/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 03:54:30 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[cocoa touch]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.websightdesign.com/2008/08/23/ive-fallen-in-love-her-name-is-cocoa/</guid>
		<description><![CDATA[I’ve recently *really* been getting into Cocoa development for both the MacOSX and the iPhone. Can I just say that Cocoa, (especially Cocoa Touch), ROCKS!!! I am in the middle of building a soon-to-be-published app for the Apple App Store. I forgot how much I loved writing C code. Objective-C is really a nice, simple [...]<p><a href="http://blog.websightdesign.com/2008/08/23/ive-fallen-in-love-her-name-is-cocoa/">I&#8217;ve Fallen In Love&#8230; Her Name is Cocoa!</a> is a post from: WebSight Design, Inc. company blog. With headquarters in the San Francisco bay area, WebSight Design, Inc. has been providing world class web engineering, creative design and hosting solutions since 1995. <a href="http://Websightdesign.com">WebSight Design</a></p>
]]></description>
			<content:encoded><![CDATA[<p style="clear: both">I’ve recently *really* been getting into Cocoa development for both the MacOSX and the iPhone. Can I just say that Cocoa, (especially Cocoa Touch), ROCKS!!! I am in the middle of building a soon-to-be-published app for the Apple App Store. I forgot how much I loved writing C code. Objective-C is really a nice, simple and clean language. I’ll be posting some tutorials on it soon.</p>
<p><br class="final-break" style="clear: both" /></p>
<p><a href="http://blog.websightdesign.com/2008/08/23/ive-fallen-in-love-her-name-is-cocoa/">I&#8217;ve Fallen In Love&#8230; Her Name is Cocoa!</a> is a post from: WebSight Design, Inc. company blog. With headquarters in the San Francisco bay area, WebSight Design, Inc. has been providing world class web engineering, creative design and hosting solutions since 1995. <a href="http://Websightdesign.com">WebSight Design</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.websightdesign.com/2008/08/23/ive-fallen-in-love-her-name-is-cocoa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

