<?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>Paul Hart &#187; iPhone</title>
	<atom:link href="http://paulhart.ca/index.php/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulhart.ca</link>
	<description>The business of coding for pleasure.</description>
	<lastBuildDate>Mon, 12 Apr 2010 02:18:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upgrade Path for cocos2d 0.9.0-alpha</title>
		<link>http://paulhart.ca/index.php/2009/11/19/upgrade-path-for-cocos2d-0-9-0-alpha/</link>
		<comments>http://paulhart.ca/index.php/2009/11/19/upgrade-path-for-cocos2d-0-9-0-alpha/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 02:37:41 +0000</pubDate>
		<dc:creator>Paul Hart</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cocos2d]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://paulhart.ca/?p=12</guid>
		<description><![CDATA[I decided to upgrade my project to using cocos2d 0.9.0-alpha. Here's the story.]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m making good progress with my project, I&#8217;m still far enough from completion that I don&#8217;t mind trying out bleeding edge versions of the libraries I rely on. In that vein, I&#8217;ve upgraded my game to use the cocos2d 0.9.0-alpha library that was <a href="http://www.cocos2d-iphone.org/forum/topic/3079">announced a few days ago</a>. Here&#8217;s my upgrade story.</p>
<p style="text-align: center;"><strong>Do No Harm</strong></p>
<p>First things first, make a backup of the project. In case of emergency, it&#8217;s easier to revert the processes undertaken. I simply made a tar file of the project directory and then gzipped it.</p>
<p style="text-align: center;"><strong>Excise The Old Tissue</strong></p>
<p>I deleted the &#8216;cocos2d&#8217; directory inside my &#8220;cocos2d Sources&#8221; group of classes (I&#8217;d create the project using one of the cocos2d templates). When asked, I told Xcode to move the files to the Trash, not just delete the references.</p>
<p style="text-align: center; "><strong>Introduce The Transplant</strong></p>
<p>Next was copying in the new &#8216;cocos2d&#8217; directory from the 0.9.0-alpha tarball into the place the old version of the directory inhabited. I stated I wanted to copy the files, not just references, and that I wanted them added to the &#8216;cocos2d libraries&#8217; subproject.</p>
<p style="text-align: center; "><strong>Administer The Anti-Rejection Medication</strong></p>
<p>At the bottom of the new ccConfig.h file is a commented out line that creates a CC_COMPATABILITY_WITH_0_8 flag. This is required initially, and will make cocos2d create stub classes that use the 0.8 naming conventions but flag their use with deprecation warnings.</p>
<p style="text-align: center;"><strong>Move to Intensive Care and Observe The Patient</strong></p>
<p>Now that the new files are in place and prepared, it&#8217;s time for a clean and compile. The result: a whole bunch of warnings as expected, but also a handful of errors. Errors are bad.</p>
<p>Fortunately, all the errors were the same &#8211; the compiler was complaining about the lack of a TargetedTouchDelegate protocol. This has been renamed CCTargetedTouchDelegate, so that change was applied liberally through the header files, the compile was fine, but the linker hated me. Turns out that the addition of the files to the &#8216;cocos2d libraries&#8217; subproject was a mistake. With that checkbox unchecked, the linking went fine.</p>
<p style="text-align: center;"><strong>Fool Me Once&#8230;</strong></p>
<p>Okay, so I really wanted to have my cocos2d folder live within the subproject build, not the main project. I deleted that new cocos2d directory again, and before adding it back I set the active project to be the &#8216;cocos2d libraries&#8217;. When I copied the files back into place, I was given the choice of making them exclusively part of that target, and did so. Then I set the active project back to my app, updated ccConfig.h again, cleaned the project, and compiled again. All good.</p>
<p style="text-align: center;"><strong>Removing The Stitches</strong></p>
<p>The setup was all corrected, now I needed to deal with the warnings. Most of these simply required the addition of the new &#8216;CC&#8217; namespace prefix. A few class names had changed completely though:</p>
<ul>
<li>TextureMgr is now CCTextureCache</li>
<li>AtlasAnimation is now part of CCAnimation</li>
<li>AtlasSprite is now part of CCSprite</li>
<li>AtlasSpriteManager is now CCSpriteSheet</li>
</ul>
<p>Where the class name had changed, there were a few method name changes to go alongside. Animation changes were slightly more involved, but not significantly so. My code now compiled without any warnings. All done, right?</p>
<p style="text-align: center;"><strong>Fool Me Twice&#8230;</strong></p>
<p>The last step was to re-comment the line in ccConfig.h that enabled 0.8 compatibility. A clean and compile later, and there&#8217;s a ton of errors again! Looks like not everything has a deprecation message yet. These classes included Director, TouchDispatcher, and some animations. The fixes were all class renames, and then it was done.</p>
<p style="text-align: center;"><strong>A Simple Operation</strong></p>
<p>All in all, this was a pretty simple feat to accomplish, though I got a lot of help from the <a href="http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:migrating_to_0_9">upgrade guide</a> and the <a href="http://www.cocos2d-iphone.org/forum/topic/3079">community forum</a>.  The cocos2d library is great and I look forward to seeing what new functionality the 0.9 series will bring us.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulhart.ca/index.php/2009/11/19/upgrade-path-for-cocos2d-0-9-0-alpha/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Thoughts on improving and opening the iPhone / iPod Touch approval process</title>
		<link>http://paulhart.ca/index.php/2009/11/17/thoughts-on-improving-and-opening-the-iphone-ipod-touch-approval-process/</link>
		<comments>http://paulhart.ca/index.php/2009/11/17/thoughts-on-improving-and-opening-the-iphone-ipod-touch-approval-process/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 15:41:33 +0000</pubDate>
		<dc:creator>Paul Hart</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Approval Process]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://paulhart.ca/?p=3</guid>
		<description><![CDATA[Thoughts on how to improve the existing approvals process for the App Store, and on creating a new distribution channel.]]></description>
			<content:encoded><![CDATA[<p>It seems that Apple can&#8217;t catch a break these days, at least as far as their developer community is concerned. As someone who is actively developing an application (again) for iPhone and iPod Touch, the issues around the existing application approval process concern me greatly.</p>
<p>Below is a rehash of some comments I left at <a href="http://www.avc.com/a_vc/2009/11/the-power-of-instant-approval.html#comment-23186876">Fred Wilson&#8217;s blog</a>.</p>
<p>Today, the vast majority of iPhone developers are targeting the App Store as their only distribution channel. Though Apple has made an &#8220;ad-hoc&#8221; distribution channel available, it is unwieldy and extremely limited in its scope. Some developers have attempted to use this channel to circumvent the App Store; the reaction from Apple was to further limit the ad-hoc channel to the point that it was no longer viable for mass distribution.</p>
<p>While many commenters feel the whole idea of having an approval process is wrong on a moral level (&#8220;my customer&#8217;s device, my customer&#8217;s choice&#8221;), it does provide some value. In summary, some of the approval process is automated (&#8220;is this application only referencing public API methods?&#8221;) and some requires human input (&#8220;does the application meet our UI guidelines?&#8221;).</p>
<p>Given that some of the approval process is automated, I believe Apple should execute the automated steps as early as possible &#8211; right after the application has been uploaded. There is no value in a developer sitting around for two weeks for their program to be approved, only to find out that they&#8217;ve been rejected because an automated test has finally been run. The sooner this rejection reason can be communicated, the better.</p>
<p>Looking beyond this automation, there is the question of distribution. Currently Apple controls all distribution of applications for their mobile devices. I think they could open this up to some extent, while still maintaining control over certain aspects of code quality.</p>
<p>When developers submit their applications for approval, they could request an approval for &#8220;independent distribution&#8221;. Such applications would be required to pass the automated parts of the existing approvals process, and would probably have other restrictions (i.e. no access to StoreKit, no Push Notifications, possibly no network access). Passing applications would be signed by Apple as having been approved for independent distribution and could be installed via iTunes or directly through Mobile Safari and a slightly updated version of the existing App Store program on the iPhone.</p>
<p>If the developer chooses to only have their application approved for independent distribution, it is not put into the queue for human approval. This moves simple applications out of the extended approval process. Apple could introduce additional timing incentives for developers to start using this approval option. For instance, if the developer wants both forms of approval, they don&#8217;t get the signed binary for independent distribution until the full App Store approval process has been completed.</p>
<p>At the time of writing, the approval queue is approximately two weeks long (&#8220;96% of applications are approved within 14 days&#8221;). This queue is part of a workflow that takes a developed application and eventually makes it available to users exclusively through the App Store. By introducing some automation and other limiting criteria, Apple could create a better experience for their developer community and enable new distribution channels.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulhart.ca/index.php/2009/11/17/thoughts-on-improving-and-opening-the-iphone-ipod-touch-approval-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
