<?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: iPhone SDK 3 and Deprecated Method Warnings</title>
	<atom:link href="http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html</link>
	<description>iOS Developer Tips, Tricks and Tutorials.</description>
	<lastBuildDate>Wed, 08 Feb 2012 06:31:16 -0600</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Simon</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html#comment-24019</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Wed, 25 Aug 2010 11:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-24019</guid>
		<description>Yes you can include 3.0 SDK features in a build with a deployment target of 2.2.1. You have to weak link the 3.0 library. And you have to make sure that you don&#039;t call any 3.0 api&#039;s on a 2.2.1 device. Apple have a sample app that shows you how.

http://developer.apple.com/iphone/library/samplecode/MailComposer/Introduction/Intro.html</description>
		<content:encoded><![CDATA[<p>Yes you can include 3.0 SDK features in a build with a deployment target of 2.2.1. You have to weak link the 3.0 library. And you have to make sure that you don&#8217;t call any 3.0 api&#8217;s on a 2.2.1 device. Apple have a sample app that shows you how.</p>
<p><a href="http://developer.apple.com/iphone/library/samplecode/MailComposer/Introduction/Intro.html" rel="nofollow">http://developer.apple.com/iphone/library/samplecode/MailComposer/Introduction/Intro.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Muchow</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html#comment-4858</link>
		<dc:creator>John Muchow</dc:creator>
		<pubDate>Mon, 07 Sep 2009 05:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4858</guid>
		<description>Chris,

iPhone apps are targeted for one base platform. For example, if you create a build for 2.2.1, you typically do not include features of the 3.0 SDK, one way around this is weak linking, see Simon&#039;s comment.

John</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>iPhone apps are targeted for one base platform. For example, if you create a build for 2.2.1, you typically do not include features of the 3.0 SDK, one way around this is weak linking, see Simon&#8217;s comment.</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html#comment-4857</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 07 Sep 2009 02:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4857</guid>
		<description>So do you release two different versions of your app, one for = 3.0?  Or do both of these get put into a &quot;universal binary&quot; for the iPhone?</description>
		<content:encoded><![CDATA[<p>So do you release two different versions of your app, one for = 3.0?  Or do both of these get put into a &#8220;universal binary&#8221; for the iPhone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Lazzeri</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html#comment-4121</link>
		<dc:creator>Marco Lazzeri</dc:creator>
		<pubDate>Wed, 22 Jul 2009 09:03:37 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4121</guid>
		<description>Great hint! Thanks</description>
		<content:encoded><![CDATA[<p>Great hint! Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wim Verhoef</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html#comment-4041</link>
		<dc:creator>Wim Verhoef</dc:creator>
		<pubDate>Sat, 11 Jul 2009 13:04:10 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4041</guid>
		<description>Mike,

If you are targeting an SDK prior to 3.0 the preprocessor variable __IPHONE_3_0 is undefined so the else part is used. Now if you are compiling for an SDK equal to or after 3.0 the variable WILL be defined so the then part is used. No need to do a comparison.
To check how this works just have a look at Availablity.h in the SDK.
As you see all previous versions are defined as well:

#define __IPHONE_2_0     20000  
#define __IPHONE_2_1     20100  
#define __IPHONE_2_2     20200  
#define __IPHONE_3_0     30000  
#define __IPHONE_NA      99999  /* not available */

If you really want to do a comparison, the comments in Availability.h recommend this:

#if __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 30000
        // code for OS3.0 and later
#else
        // code for earlier versions
#endif</description>
		<content:encoded><![CDATA[<p>Mike,</p>
<p>If you are targeting an SDK prior to 3.0 the preprocessor variable __IPHONE_3_0 is undefined so the else part is used. Now if you are compiling for an SDK equal to or after 3.0 the variable WILL be defined so the then part is used. No need to do a comparison.<br />
To check how this works just have a look at Availablity.h in the SDK.<br />
As you see all previous versions are defined as well:</p>
<p>#define __IPHONE_2_0     20000<br />
#define __IPHONE_2_1     20100<br />
#define __IPHONE_2_2     20200<br />
#define __IPHONE_3_0     30000<br />
#define __IPHONE_NA      99999  /* not available */</p>
<p>If you really want to do a comparison, the comments in Availability.h recommend this:</p>
<p>#if __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 30000<br />
        // code for OS3.0 and later<br />
#else<br />
        // code for earlier versions<br />
#endif</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Weller</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html#comment-3784</link>
		<dc:creator>Mike Weller</dc:creator>
		<pubDate>Fri, 03 Jul 2009 14:44:56 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-3784</guid>
		<description>I&#039;ve been using similar code, but my problem is this: what happens when the version goes up to 3_1? Now that code is going to revert to the pre 3.0 version. Is there some way to do a &quot;if version &lt; 3&quot; test?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using similar code, but my problem is this: what happens when the version goes up to 3_1? Now that code is going to revert to the pre 3.0 version. Is there some way to do a &#8220;if version &lt; 3&#8243; test?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maksim Horbul</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html#comment-3633</link>
		<dc:creator>Maksim Horbul</dc:creator>
		<pubDate>Tue, 30 Jun 2009 07:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-3633</guid>
		<description>The most often met deprecation warning is related to the cell.text. 

UITableViewCell in SDK 3 offers textLabel and detailTextLabel:

#if __IPHONE_3_0
  cell.textLabel.text = @&quot;The Text&quot;;
  cell.detailTextLabel.text = @&quot;The Sub-text&quot;;
#else
  // cell with the custom content view
  cell.text = @&quot;The Text&quot;
  cell.customSubTextLabel = @&quot;The Sub-Text&quot;
#endif

&lt;em&gt;Editor&#039;s note: cell.customSubTextLabel does not exist in 2.x. To have functionality similar to the 3.0 cell.detailTextLabel, you would have to add a custom label to a subclass of cell.&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>The most often met deprecation warning is related to the cell.text. </p>
<p>UITableViewCell in SDK 3 offers textLabel and detailTextLabel:</p>
<p>#if __IPHONE_3_0<br />
  cell.textLabel.text = @&#8221;The Text&#8221;;<br />
  cell.detailTextLabel.text = @&#8221;The Sub-text&#8221;;<br />
#else<br />
  // cell with the custom content view<br />
  cell.text = @&#8221;The Text&#8221;<br />
  cell.customSubTextLabel = @&#8221;The Sub-Text&#8221;<br />
#endif</p>
<p><em>Editor&#8217;s note: cell.customSubTextLabel does not exist in 2.x. To have functionality similar to the 3.0 cell.detailTextLabel, you would have to add a custom label to a subclass of cell.</em></p>
]]></content:encoded>
	</item>
</channel>
</rss>

