<?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>MacOSCoders &#187; iPhone SDK</title>
	<atom:link href="http://www.macoscoders.com/tag/iphone-sdk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.macoscoders.com</link>
	<description>My blog to talk on iPhone, Mac OS, Adobe Flex, AIR...</description>
	<lastBuildDate>Thu, 06 Oct 2011 11:09:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Supporting both Retina Display and Normal Display</title>
		<link>http://www.macoscoders.com/2010/10/13/supporting-both-retina-display-and-normal-display/</link>
		<comments>http://www.macoscoders.com/2010/10/13/supporting-both-retina-display-and-normal-display/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 12:17:20 +0000</pubDate>
		<dc:creator>Anish Kumar</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[@2x]]></category>
		<category><![CDATA[retina display]]></category>

		<guid isPermaLink="false">http://www.macoscoders.com/?p=442</guid>
		<description><![CDATA[With iPhone 4.0 SDK, all graphics/images are automatically scaled (including coordinates) according to the device screen resolution. All we have to do is provide two versions of each image used in our application &#8211; one to suit for the retina display, other one suit to normal resolution. All images that needs to be rendered for [...]]]></description>
			<content:encoded><![CDATA[<p>With iPhone 4.0 SDK, all graphics/images are automatically scaled (including coordinates) according to the device screen resolution. All we have to do is provide two versions of each image used in our application &#8211; one to suit for the retina display, other one suit to normal resolution. All images that needs to be rendered for retina display must have a &#8220;@2x&#8221; in the filename (just before the file extension). If the device uses retina display, it will automatically load the @2x file, otherwise it will load the normal file and scale it up. </p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li><a href="http://www.macoscoders.com/2009/05/19/how-to-set-badge-value-of-an-tabbar-item/" rel="bookmark" class="wherego_title">How to set badge value of an TabBar Item</a></li><li><a href="http://www.macoscoders.com/2010/12/16/terminal-error-could-not-determine-audit-condition/" rel="bookmark" class="wherego_title">Terminal Error : &#8220;Could not determine audit condition&#8221;</a></li><li><a href="http://www.macoscoders.com/2010/08/12/in-app-sms-in-iphone-os-4-0/" rel="bookmark" class="wherego_title">In-App SMS in iPhone OS 4.0</a></li><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macoscoders.com/2010/10/13/supporting-both-retina-display-and-normal-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selecting Earlier Version Of SDK When iPhone SDK 3.0 Is Installed</title>
		<link>http://www.macoscoders.com/2009/05/05/selecting-earlier-version-of-sdk-when-iphone-sdk-30-is-installed/</link>
		<comments>http://www.macoscoders.com/2009/05/05/selecting-earlier-version-of-sdk-when-iphone-sdk-30-is-installed/#comments</comments>
		<pubDate>Tue, 05 May 2009 08:13:20 +0000</pubDate>
		<dc:creator>Anish Kumar</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[2.2.1]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[Active SDK]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[iPhone OS]]></category>

		<guid isPermaLink="false">http://www.macoscoders.com/?p=167</guid>
		<description><![CDATA[The iPhone SDK 3.0 is great in offering tons of new features to developers to play with. It irresistable not to install it n use it. But we should be ready to make few sacrifices in using it. Firstly as the release notes says, iPhone OS 3.0 beta installed on iPhone can&#8217;t be revereted back [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 165px"><img title="iPhone OS Active SDK Targets Missing" src="http://www.macoscoders.com/images/Active_SDK_Targets_Missing.jpg" alt="iPhone OS Active SDK Targets Missing" width="155" height="153" /><p class="wp-caption-text">iPhone OS Active SDK Targets Missing</p></div>
<p>The iPhone SDK 3.0 is great in offering tons of new features to developers to play with. It irresistable not to install it n use it. But we should be ready to make few sacrifices in using it. Firstly as the release notes says, iPhone OS 3.0 beta installed on iPhone can&#8217;t be revereted back to a earlier version of OS. While this was a big issue for people who skipped reading the release notes n were excited to install iPhone OS 3.0 Seed 1. However the later versions of iPhone OS 3.0 Seed 3 and 4 seem to be pretty stable and near production quality expect for few problems like low battery backup. The other major issue I am facing with iPhone SDK 3.0 is not being able to set the Active Target to a earlier version of iPhone OS other than 3.0. XCode silently removes all the other available options from the &#8216;Active SDK&#8217; list and gives only iPhone OS 3.0. This can be annoying, but we cant blame Apple for this as they have warned this in their release notes. The image on the left shows the behaviour I am talking about.<span id="more-167"></span></p>
<div class="wp-caption alignright" style="width: 119px"><img title="Remove User Specific Files From XCode Project File" src="http://www.macoscoders.com/images/Remove_User_Specific_Files_From_XCode_Project.jpg" alt="Remove User Specific Files From XCode Project File" width="109" height="82" /><p class="wp-caption-text">Remove User Specific Files From XCode Project File</p></div>
<p>But as the saying &#8216;Where there is a will, there is way&#8217;, we can overcome this by following these steps:-</p>
<ol>
<li>Clean All Targets</li>
<li>Close the project</li>
<li>Right click on your XCode project file and select &#8216;Show Package Contents&#8217;</li>
<li>You will be presented with usually 3 files with two of the files carrying the system user name as shown in the figure. Delete those two files. (Don&#8217;t worry, Its safe to remove them.) And open your project again and you should be able to see the old SDK options back in your &#8216;Active SDK&#8217; list</li>
</ol>
<div class="wp-caption alignleft" style="width: 321px"><img title="Active SDK Regained" src="http://www.macoscoders.com/images/Active_SDK_Regained.jpg" alt="Active SDK Regained" width="311" height="157" /><p class="wp-caption-text">Active SDK Regained</p></div>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://www.macoscoders.com/2009/05/05/selecting-earlier-version-of-sdk-when-iphone-sdk-30-is-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Launch iPhone Maps application from within your Code</title>
		<link>http://www.macoscoders.com/2009/03/26/launch-iphone-maps-application-from-within-your-code/</link>
		<comments>http://www.macoscoders.com/2009/03/26/launch-iphone-maps-application-from-within-your-code/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 09:15:27 +0000</pubDate>
		<dc:creator>Anish Kumar</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[IPhone]]></category>

		<guid isPermaLink="false">http://www.macoscoders.com/?p=50</guid>
		<description><![CDATA[Last week I spent some time playing around with the Maps application on the iPhone and I thought I’d share some of my findings. (Note that since there is no maps application available in the iPhone simulator all of the below will be launched in Safari instead &#8211; you’ll have to actually run it on [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I spent some time playing around with the Maps application on the iPhone and I thought I’d share some of my findings. (Note that since there is no maps application available in the iPhone simulator all of the below will be launched in Safari instead &#8211; you’ll have to actually run it on your iPhone to see it in the maps application.)</p>
<p><span id="more-50"></span>In it’s simplest form, to launch the maps application at your last location:</p>
<div style="margin-left: 10px;"><code><br />
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"<span style="color: red;">http://maps.google.com/maps</span>"]];<br />
</code></div>
<p>which gives you something like this:</p>
<p><img style="border: 0pt none;" src="http://macoscoders.com/images/maps1.jpg" border="0" alt="" width="320" height="480" /></p>
<p>Getting slightly more interesting, we can specify the <strong>latitude/longitude</strong> (”<strong>ll</strong>“) flag to tell the maps application to launch at a specific location (in this case, my workplace):</p>
<div style="margin-left: 10px;"><code><br />
NSString *latlong = @"-33.874559,151.219575";</code></p>
<p>NSString *url = [NSString stringWithFormat: @"<span style="color: red;">http://maps.google.com/maps?ll=%@</span>",<br />
[latlong stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];</p>
<p>[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];</p></div>
<p>results in:</p>
<p><img style="border: 0pt none;" src="http://macoscoders.com/images/maps2.jpg" border="0" alt="" width="320" height="480" /></p>
<p>If you want to get maps to show all the thai restaurants near you, you can specify the <strong>query</strong> (”<strong>q</strong>“) flag:</p>
<div style="margin-left: 10px;"><code><br />
NSString *name = @"thai";</code></p>
<p>NSString *latlong = @”-33.874559,151.219575″;</p>
<p>NSString *url = [NSString stringWithFormat: @"<span style="color: red;">http://maps.google.com/maps?q=%@&amp;mrt=yp&amp;ll=%@</span>",<br />
[name stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],<br />
[latlong stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];<br />
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];</div>
<p>will give you:</p>
<p><img style="border: 0pt none;" src="http://macoscoders.com/images/maps3.jpg" border="0" alt="" width="320" height="480" /></p>
<p>Note that in this example, I’ve include the <strong>search mode</strong> (”<strong>mrt</strong>“) flag, with a value of “<strong>yp</strong>” &#8211; this tells maps to search only for businesses &#8211; although this is of course not necessary.</p>
<p>Other interesting parameters include the <strong>zoom</strong> (”<strong>z</strong>“) flag zoom-level (1-19 defaults is 17 I believe &#8211; maps will intelligently alter the zoom level if you specify a query):</p>
<div style="margin-left: 10px;"><code><br />
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"<span style="color: red;">http://maps.google.com/maps?z=8</span>"]];<br />
</code></div>
<p>zooms out from the previous map:</p>
<p><img style="border: 0pt none;" src="http://macoscoders.com/images/maps4.jpg" border="0" alt="" width="320" height="480" /></p>
<p>and the ability to change the map type using the map type (”t”) flag (options are “m”-map, “k”-satellite, “h”- hybrid):</p>
<div style="margin-left: 10px;"><code><br />
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"<span style="color: red;">http://maps.google.com/maps?t=k</span>"]];<br />
</code></div>
<p>shows the map in satellite mode:</p>
<p><img style="border: 0pt none;" src="http://macoscoders.com/images/maps5.jpg" border="0" alt="" width="320" height="480" /></p>
<p>Last, but certainly not least &#8211; it’s actually possible to get the maps application to show with your own set of pins dropped on it (rather than using google’s search results as above). In order to do this, you will need to provide a KML file (KML &#8211; “Keyhole Markup Language” is a standard for representing geographic annotation &#8211; more information can be found <a href="http://en.wikipedia.org/wiki/KML">here</a>).</p>
<p>This is again done using the <strong>query</strong>(”<strong>q</strong>“) flag, but this time you pass in the url of your KML file:</p>
<div style="margin-left: 10px;"><code><br />
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"<span style="color: red;">http://maps.google.com/maps?q=http://http://www.macoscoders.com/images/sample.kml</span>"]];<br />
</code></div>
<p>(in this example, I only have a single entry in my KML file &#8211; you can view the file here: <a href="http://objective-d.com/sample.kml">http://<code><span style="color: red;">www.macoscoders.com/images</span></code>/sample.kml</a>):</p>
<p><img style="border: 0pt none;" src="http://macoscoders.com/images/maps6.jpg" border="0" alt="" width="320" height="480" /></p>
<p>This has just been a taster of the kind of control you have over the maps application, but hopefully it’s got you interested enough to start playing around.</p>
<p>For more information I suggest you check out the handy reference available here: <a href="http://mapki.com/index.php?title=Google_Map_Parameters">http://mapki.com/index.php?title=Google_Map_Parameters</a>.</p>
<p>If you are interested in including a map from <strong>within</strong> your iPhone applications, I encourage you to take a look at the <a href="http://code.google.com/p/iphone-google-maps-component/">iphone-google-maps-component</a> and <a href="http://code.google.com/p/route-me/">route-me</a> projects.</p>
<p><strong>[Update]:</strong> The iPhone 2.2. update seems to have broken url’s in the form: maps://maps.google.com/maps?q= however in my initial testing, it seems if you use http://maps.google.com/maps?q= (i.e. using http:// instead of maps://) then things still seem to function correctly &#8211; I’ve updated the post to reflect this.</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macoscoders.com/2009/03/26/launch-iphone-maps-application-from-within-your-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
array(0) {
}

