<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Which OS Version to Target?</title>
	<atom:link href="http://www.cocoanetics.com/2009/07/which-os-version-to-target/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/</link>
	<description>Our DNA is written in Objective-C</description>
	<lastBuildDate>Mon, 14 May 2012 19:43:35 +0100</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: drops</title>
		<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/#comment-1394</link>
		<dc:creator>drops</dc:creator>
		<pubDate>Fri, 10 Jul 2009 09:30:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1121#comment-1394</guid>
		<description>Wow, that&#039;s amazing. I finally see how it can be possible to achieve that Tap Tap Revenge is doing!

I have to work up a recipe once I can find time to make an example.</description>
		<content:encoded><![CDATA[<p>Wow, that&#8217;s amazing. I finally see how it can be possible to achieve that Tap Tap Revenge is doing!</p>
<p>I have to work up a recipe once I can find time to make an example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dzamir</title>
		<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/#comment-1393</link>
		<dc:creator>dzamir</dc:creator>
		<pubDate>Fri, 10 Jul 2009 09:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1121#comment-1393</guid>
		<description>https://devforums.apple.com/message/92251

http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/</description>
		<content:encoded><![CDATA[<p><a href="https://devforums.apple.com/message/92251" rel="nofollow">https://devforums.apple.com/message/92251</a></p>
<p><a href="http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/" rel="nofollow">http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dzamir</title>
		<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/#comment-1392</link>
		<dc:creator>dzamir</dc:creator>
		<pubDate>Fri, 10 Jul 2009 09:06:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1121#comment-1392</guid>
		<description>You use the 3.0 sdk and build against 2.2.
I can swear you that it works :-)
If you search the apple dev forums, you can find answer from apple engineers that recommend this way.</description>
		<content:encoded><![CDATA[<p>You use the 3.0 sdk and build against 2.2.<br />
I can swear you that it works <img src='http://www.cocoanetics.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
If you search the apple dev forums, you can find answer from apple engineers that recommend this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drops</title>
		<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/#comment-1391</link>
		<dc:creator>drops</dc:creator>
		<pubDate>Fri, 10 Jul 2009 08:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1121#comment-1391</guid>
		<description>But how would you load 3.0 frameworks on 2.0 builds? To use a framework you need to include the headers and those reject to be loaded on pre 3.0, unless you hack them...</description>
		<content:encoded><![CDATA[<p>But how would you load 3.0 frameworks on 2.0 builds? To use a framework you need to include the headers and those reject to be loaded on pre 3.0, unless you hack them&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dzamir</title>
		<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/#comment-1390</link>
		<dc:creator>dzamir</dc:creator>
		<pubDate>Fri, 10 Jul 2009 08:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1121#comment-1390</guid>
		<description>It&#039;s not a magic function to run 3.0 feature on a 2.0 build. There are 2 way to the &quot;magic&quot;:
1) check the firmware version:
+(int) iPhoneOSMajorVersion {
	if (majorVersion == 0) {
		NSString * version = [[UIDevice currentDevice] systemVersion];
		majorVersion = [[version substringToIndex:1] intValue];
	}
	return majorVersion;
}

+(BOOL) isIPhoneOS3 {
	return [self iPhoneOSMajorVersion] &gt;= 3;
}

if ([xxx isIPhoneOs3]) {
    // iphone 3.0 stuffs.
} else {
    // iphone 2.0 stuffs
}

2) check if the current firmware implements the selector you need to call:

if ([obj respondsToSelector:@selector(selnameThatWorksOnlyIn3)]) {
    [obj selnameThatWorksOnlyIn3];
} else {
   [obj oldSelectorThatWorksOn2];
}


The last method is the best method, because it&#039;s always better to check if the selector exists (things can change from firmware to firmware), but it&#039;s better if you save the result of respondsToSelector in a global BOOL so you can easily check later if the selector exists without calling the method every time</description>
		<content:encoded><![CDATA[<p>It&#8217;s not a magic function to run 3.0 feature on a 2.0 build. There are 2 way to the &#8220;magic&#8221;:<br />
1) check the firmware version:<br />
+(int) iPhoneOSMajorVersion {<br />
	if (majorVersion == 0) {<br />
		NSString * version = [[UIDevice currentDevice] systemVersion];<br />
		majorVersion = [[version substringToIndex:1] intValue];<br />
	}<br />
	return majorVersion;<br />
}</p>
<p>+(BOOL) isIPhoneOS3 {<br />
	return [self iPhoneOSMajorVersion] &gt;= 3;<br />
}</p>
<p>if ([xxx isIPhoneOs3]) {<br />
    // iphone 3.0 stuffs.<br />
} else {<br />
    // iphone 2.0 stuffs<br />
}</p>
<p>2) check if the current firmware implements the selector you need to call:</p>
<p>if ([obj respondsToSelector:@selector(selnameThatWorksOnlyIn3)]) {<br />
    [obj selnameThatWorksOnlyIn3];<br />
} else {<br />
   [obj oldSelectorThatWorksOn2];<br />
}</p>
<p>The last method is the best method, because it&#8217;s always better to check if the selector exists (things can change from firmware to firmware), but it&#8217;s better if you save the result of respondsToSelector in a global BOOL so you can easily check later if the selector exists without calling the method every time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Heck</title>
		<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/#comment-1389</link>
		<dc:creator>Andreas Heck</dc:creator>
		<pubDate>Fri, 10 Jul 2009 05:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1121#comment-1389</guid>
		<description>Good Morning, Oliver!
You&#039;ve published great stats and you&#039;re asking a clever question. I can answer with our own stats, collected within the highscore of our Super Trumps games:
http://iphone.derheckser.com/2009/07/10/what-shall-we-do-for-3-0/</description>
		<content:encoded><![CDATA[<p>Good Morning, Oliver!<br />
You&#8217;ve published great stats and you&#8217;re asking a clever question. I can answer with our own stats, collected within the highscore of our Super Trumps games:<br />
<a href="http://iphone.derheckser.com/2009/07/10/what-shall-we-do-for-3-0/" rel="nofollow">http://iphone.derheckser.com/2009/07/10/what-shall-we-do-for-3-0/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wuf810</title>
		<link>http://www.cocoanetics.com/2009/07/which-os-version-to-target/#comment-1388</link>
		<dc:creator>wuf810</dc:creator>
		<pubDate>Fri, 10 Jul 2009 01:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.drobnik.com/touch/?p=1121#comment-1388</guid>
		<description>http://www.iphonedevsdk.com/forum/iphone-sdk-development-iphone-os-3-0/22725-stats-3-0-users.html#post101510</description>
		<content:encoded><![CDATA[<p><a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development-iphone-os-3-0/22725-stats-3-0-users.html#post101510" rel="nofollow">http://www.iphonedevsdk.com/forum/iphone-sdk-development-iphone-os-3-0/22725-stats-3-0-users.html#post101510</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

