<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>iPhone development tips from an iPhone development beginner.</description><title>Go Cocoa!</title><generator>Tumblr (3.0; @gococoa)</generator><link>http://gococoa.tumblr.com/</link><item><title>XCode tip: NSZombie!</title><description>&lt;p&gt;If your app is having mysterious errors and mysterious crashing, try enabling NSZombie.  It will basically keep a &amp;#8220;zombie&amp;#8221; pointer to any object you release.  Thus, if your problem is releasing an object that has already been release, enabling NSZombie will help you to debug where in the code this happened.&lt;/p&gt;
&lt;p&gt;To enable NSZombie:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;In the menu bar, go to Project&amp;gt;Edit Active Executable&lt;/li&gt;
&lt;li&gt;Click Arguments at the top&lt;/li&gt;
&lt;li&gt;Add a Variable to be set named &amp;#8220;NSZombieInfo&amp;#8221; with value &amp;#8220;YES&amp;#8221;&lt;/li&gt;
&lt;li&gt;Make sure the check box is checked&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The log will, hopefully, now give a more useful error.  Good Luck!&lt;/p&gt;
&lt;p&gt;Oh, and don&amp;#8217;t forget to uncheck that box.  It would be bad news to release an app with a bunch of extra NSZombie pointers.&lt;/p&gt;</description><link>http://gococoa.tumblr.com/post/129507728</link><guid>http://gococoa.tumblr.com/post/129507728</guid><pubDate>Wed, 24 Jun 2009 15:04:43 -0400</pubDate></item><item><title>Passing BOOL in a selector method.</title><description>&lt;p&gt;BOOLs cannot be passed as objects for selectors because they are primitives.  Rather, they must be wrapped in an NS object such as NSNumber:&lt;/p&gt;
&lt;p&gt;[self performSelectorOnMainThread:@selector(didFinishSendingStatusUpdateSuccesfully:) withObject:[NSNumber numberWithBool:success] waitUntilDone:NO];&lt;/p&gt;
To unwrap a BOOL just use the boolValue class method of NSNumber:
&lt;p&gt;[success boolValue]&lt;/p&gt;

&lt;p&gt;There you go, simple and easy.&lt;/p&gt;</description><link>http://gococoa.tumblr.com/post/129499971</link><guid>http://gococoa.tumblr.com/post/129499971</guid><pubDate>Wed, 24 Jun 2009 14:49:56 -0400</pubDate></item><item><title>iPhones will be delivered on time?!</title><description>&lt;p&gt;After getting a very sad email from Apple containing a projected June 23 delivery date for my iPhone 3GS, I gave their support a call to find out what exactly was going on.  The first person I spoke with said, &amp;#8220;Yeah, sorry. Nothing &lt;i&gt;I&lt;/i&gt; can do!&amp;#8221;  However, the second customer support rep assured me that I will have the phone in hand tomorrow.  In fact, he claimed that any phone ordered before yesterday would arrive tomorrow.  That&amp;#8217;s quite a guarantee, and hopefully one that Apple can stand by.&lt;/p&gt;
&lt;p&gt;I wish I knew the source of all this confusion, but I&amp;#8217;m more than happy to believe the second guy.&lt;/p&gt;

&lt;p&gt;Here are some links to more info on all this confusion&amp;#160;:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.gadgetreview.com/2009/06/when-will-my-iphone-3gs-arrive-take-a-guess-and-you-could-win-something.html"&gt;Gadget Review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sampletheweb.com/2009/06/18/white-iphone-3g-s-not-shipping-or-apple-technical-glitch/"&gt;http://www.sampletheweb.com/2009/06/18/white-iphone-3g-s-not-shipping-or-apple-technical-glitch/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a hred="http://www.pcworld.com/businesscenter/article/166825/the_iphone_3g_s_wait_goes_onmay_get_longer.html"&gt;PCWorld&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;</description><link>http://gococoa.tumblr.com/post/126156345</link><guid>http://gococoa.tumblr.com/post/126156345</guid><pubDate>Thu, 18 Jun 2009 21:12:05 -0400</pubDate></item><item><title>iPhones DELAYED!!!</title><description>&lt;p&gt;I received an email from Apple today saying that my iPhone had shipped.  However, rather than the Friday, June 19th delivery which had been guaranteed when I ordered, the email contained an estimated delivery date of Tuesday June 23rd.  It&amp;#8217;s four days late!  I am, needless to say, very unhappy about this. :(&lt;/p&gt;
&lt;p&gt;On a lighter note, I just finished CS193P lecture 10 on memory and threading.  Really interesting stuff!&lt;/p&gt;
&lt;p&gt;edit:  Rumor has it, this has been happening to many who ordered the 32GB version.&lt;/p&gt;</description><link>http://gococoa.tumblr.com/post/125659559</link><guid>http://gococoa.tumblr.com/post/125659559</guid><pubDate>Thu, 18 Jun 2009 01:34:00 -0400</pubDate><category>iPhone,</category><category>technology</category><category>CS193P</category><category>Apple</category></item><item><title>Lazy Loading</title><description>&lt;p&gt;The iPhone has about the processing power/memory of an eight year old computer (said Alan Canastraro).  Thus, we need to load things as gradually as possible.&lt;/p&gt;
&lt;p&gt;If you have more than one view controller, use more than one NIB!  Putting everything in one NIB is a mistake I&amp;#8217;ve seen people make on a lot of forums.  Not only is CocoaTouch/Interface Builder not made to work this way, but it will really stress out the device.&lt;/p&gt;
&lt;p&gt;Also, think about what will be most processor heavy and only do those things when they are necessary in the app.  These things include:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;Complex Graphics&lt;/li&gt;
&lt;li&gt;Initializing large arrays&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Basically, only call a method when it is absolutely necessary.&lt;/p&gt;

&lt;p&gt;Now I&amp;#8217;m going to try to rewrite my Presence 2 assignment so that all the images don&amp;#8217;t load first thing :/&lt;/p&gt;</description><link>http://gococoa.tumblr.com/post/125336031</link><guid>http://gococoa.tumblr.com/post/125336031</guid><pubDate>Wed, 17 Jun 2009 14:16:47 -0400</pubDate></item><item><title>iPhones won't be delivered early</title><description>&lt;p&gt;&lt;img src="http://www.blogcdn.com/www.engadgetmobile.com/media/2009/06/iphone-3g-s-delay.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;It looks like the iPhone orders which were scheduled on UPS tracking to be delivered before the 19th will have to wait after all.  Too bad for all the almost lucky future 3GS owners.  However, I&amp;#8217;m sure this gives everyone who wasn&amp;#8217;t going to receive theirs (me?) early a sick sense of satisfaction. ;)&lt;/p&gt;</description><link>http://gococoa.tumblr.com/post/125101659</link><guid>http://gococoa.tumblr.com/post/125101659</guid><pubDate>Wed, 17 Jun 2009 04:40:00 -0400</pubDate><category>iPhone</category><category>3GS</category><category>news</category></item><item><title>My very first iPhone is arriving on Friday.  I can finally stop...</title><description>&lt;img src="http://24.media.tumblr.com/NvKD8r5qlotaulnuKZ8AUZTjo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;My very first iPhone is arriving on Friday.  I can finally stop borrowing!&lt;/p&gt;</description><link>http://gococoa.tumblr.com/post/125089679</link><guid>http://gococoa.tumblr.com/post/125089679</guid><pubDate>Wed, 17 Jun 2009 04:01:59 -0400</pubDate></item><item><title>OMG Presence2 assignment for CS193P</title><description>&lt;img src="http://25.media.tumblr.com/NvKD8r5qlosqera7TDw701oPo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;OMG Presence2 assignment for CS193P&lt;/p&gt;</description><link>http://gococoa.tumblr.com/post/124822191</link><guid>http://gococoa.tumblr.com/post/124822191</guid><pubDate>Tue, 16 Jun 2009 18:29:47 -0400</pubDate></item><item><title>Tips for an Absolute Beginner</title><description>&lt;p&gt;I recently (as of this summer) started doing iphone development after taking an intro to object-oriented programming class in Java.  I&amp;#8217;ve been following along with the stanford course on iTunes U, &lt;a href="http://www.stanford.edu/class/cs193p/cgi-bin/index.php"&gt;CS193P&lt;/a&gt;.  I&amp;#8217;m on lecture 10 and so far it&amp;#8217;s been very informative.  I highly recommend it.  My only qualm is that I have no way to get my code evaluated.&lt;/p&gt;
&lt;p&gt;Here are some tips for someone just starting out on the platform from someone just starting out:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Don&amp;#8217;t get too bogged down with design patterns at first, the frameworks are designed in such a way that you will kind of learn them as you go.&lt;/li&gt;
&lt;li&gt;Do, at least, the first 6 courses of CS193P (along with the assignments)! They will help a lot.&lt;/li&gt;
&lt;li&gt;Think about the architecture of your app before you start but be willing to make changes down the road.  This saves hours, sometimes days of work.&lt;/li&gt;
&lt;li&gt;Apple&amp;#8217;s docs are really good and pretty much all you really need for reference.  Holding the option key and double-clicking on an object in xcode will take you straight its documentation.&lt;/li&gt;
&lt;li&gt;Though it seems not to say so anywhere on the apple website, the $99 developer program subscription lasts for 1 year.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Great resources:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cocoadevcentral.com/d/learn_objectivec/"&gt;http://www.cocoadevcentral.com/d/learn_objectivec/&lt;/a&gt; - this is a good intro to objective-C and C though most, if not all, of this stuff is covered in CS193P.  Still, it&amp;#8217;s nicely laid out and really easy to read.  However, remember that this is not geared towards iPhone development.  The main difference with objective-C on the iPhone is that the iPhone does not use garbage collecting.&lt;/li&gt;
&lt;li&gt;The developer.apple forums are great.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://groups.google.com/group/iphone-appdev-auditors"&gt;http://groups.google.com/group/iphone-appdev-auditors&lt;/a&gt; - this is the auditors group for the CS193P class.  You can ask any questions there.&lt;/li&gt;
&lt;li&gt;Me!  Ask anything, I&amp;#8217;ll try to help or at least point you in the right direction.  Particularly, if you&amp;#8217;re having a problem with any of the stanford assignments, I probably had the same problem already.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://gococoa.tumblr.com/post/124816740</link><guid>http://gococoa.tumblr.com/post/124816740</guid><pubDate>Tue, 16 Jun 2009 18:17:00 -0400</pubDate><category>iphone</category><category>cocoa touch</category></item></channel></rss>
