<?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/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Get Set Games &#187; advent</title>
	<atom:link href="http://getsetgames.com/tag/advent/feed/" rel="self" type="application/rss+xml" />
	<link>http://getsetgames.com</link>
	<description></description>
	<lastBuildDate>Thu, 12 Jan 2012 20:12:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/><cloud domain='getsetgames.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<link rel="http://api.friendfeed.com/2008/03#sup" xmlns="http://www.w3.org/2005/Atom" type="application/json" href="http://friendfeed.com/api/public-sup.json#5c973c50be"/>		<item>
		<title>iPhone Development Advent Tips Recap</title>
		<link>http://getsetgames.com/2009/12/26/iphone-development-advent-tips-recap/</link>
		<comments>http://getsetgames.com/2009/12/26/iphone-development-advent-tips-recap/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 19:44:00 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=868</guid>
		<description><![CDATA[Below is a recap of all of the iPhone app development tips we posted in the month of December advent-style. We hope this serves as a one-stop shop for many [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-26-at-2.39.49-PM.png" alt="" title="Screen shot 2009-12-26 at 2.39.49 PM" width="150" class="alignright size-full wp-image-1087" />Below is a recap of all of the iPhone app development tips we posted in the month of December advent-style. We hope this serves as a one-stop shop for many aspects of iPhone development that are commonly encountered. </p>
<p>1. <a href="http://getsetgames.com/2009/12/01/iphonedev-advent-tip-1-how-to-open-a-url-in-safari/">How to Open a URL in Safari</a><br />
2. <a href="http://getsetgames.com/2009/12/02/iphonedev-advent-tip-2-how-to-show-an-alert-with-uialertview/">How to Show an Alert with UIAlertView</a><br />
3. <a href="http://getsetgames.com/2009/12/03/iphonedev-advent-tip-3-how-to-display-an-activity-indicator-with-uiactivityindicatorview/">How to Display an Activity Indicator with UIActivityIndicatorView</a><br />
4. <a href="http://getsetgames.com/2009/12/04/iphonedev-advent-tip-4-eliminating-class-dependencies-on-your-application-delegate/">Eliminating class dependencies on your app delegate</a><br />
5. <a href="http://getsetgames.com/2009/12/05/iphonedev-advent-tip-5-how-to-load-a-uiimage-from-a-url/">How to Load a UIImage From a URL</a><br />
6. <a href="http://getsetgames.com/2009/12/06/iphonedev-advent-tip-6-how-to-open-the-mail-app-with-a-pre-composed-html-email/">How to Open the Mail App With a Pre-Composed HTML Email</a><br />
7. <a href="http://getsetgames.com/2009/12/07/iphonedev-advent-tip-7-how-to-get-the-current-time-with-nsdate/">How to Get the Current Time With NSDate</a><br />
8. <a href="http://getsetgames.com/2009/12/08/iphonedev-advent-tip-8-how-to-get-the-platform-name/">How to Get the Platform Name</a><br />
9. <a href="http://getsetgames.com/2009/12/09/iphonedev-advent-tip-9-how-to-set-your-apps-splash-screen/">How to Set Your App&#8217;s Splash Screen</a><br />
10. <a href="http://getsetgames.com/2009/12/10/iphonedev-advent-tip-10-string-comparison-using-nsstring/">String Comparison Using NSString</a><br />
11. <a href="http://getsetgames.com/2009/12/11/iphonedev-advent-tip-11-how-to-hide-and-show-the-status-bar/">How to Hide (and Show) the Status Bar</a><br />
12. <a href="http://getsetgames.com/2009/12/12/iphonedev-advent-tip-12-how-to-dial-a-phone-number/">How to Dial a Phone Number</a><br />
13. <a href="http://getsetgames.com/2009/12/13/iphonedev-advent-tip-13-how-to-get-your-apps-display-name-and-version/">How to Get Your App&#8217;s Display Name and Version</a><br />
14. <a href="http://getsetgames.com/2009/12/14/iphonedev-advent-tip-14-how-to-retrieve-your-app-delegate-singleton-instance/">How to Retrieve Your App Delegate Singleton Instance</a><br />
15. <a href="http://getsetgames.com/2009/12/15/iphonedev-advent-tip-15-how-to-make-the-iphone-vibrate/">How to Make the iPhone Vibrate</a><br />
16. <a href="http://getsetgames.com/2009/12/16/iphonedev-advent-tip-16-how-to-show-the-network-activity-indicator/">How to Show the Network Activity Indicator</a><br />
17. <a href="http://getsetgames.com/2009/12/17/iphonedev-advent-tip-17-how-to-prevent-the-iphone-from-sleeping/">How to Prevent the iPhone From Sleeping</a><br />
18. <a href="http://getsetgames.com/2009/12/18/iphonedev-advent-tip-18-how-to-take-the-shine-off-your-apps-icon/">How to Take the Shine off Your App&#8217;s Icon</a><br />
19. <a href="http://getsetgames.com/2009/12/19/iphonedev-advent-tip-19-how-to-format-an-nsstring/">How to Format an NSString</a><br />
20. <a href="http://getsetgames.com/2009/12/20/iphonedev-advent-tip-20-how-to-play-a-video-with-mpmovieplayercontroller/">How to Play a Video With MPMoviePlayerController</a><br />
21. <a href="http://getsetgames.com/2009/12/21/iphonedev-advent-tip-21-how-to-upgrade-your-iphone-game-to-openfeint-2-4/">How to Upgrade Your iPhone Game to OpenFeint 2.4</a><br />
22. <a href="http://getsetgames.com/2009/12/22/iphonedev-advent-tip-22-how-to-log-to-the-console-using-nslog/">How to Log to the Console Using NSLog</a><br />
23. <a href="http://getsetgames.com/2009/12/23/iphonedev-advent-tip-23-how-to-suspend-touch-input/">How to Suspend Touch Input</a><br />
24. <a href="http://getsetgames.com/2009/12/24/iphonedev-advent-tip-24-how-to-open-the-sms-app-with-a-phone-number/">How to Open the SMS App With a Phone Number</a></p>
]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/26/iphone-development-advent-tips-recap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-26-at-2.39.49-PM-150x150.png" />
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-26-at-2.39.49-PM.png" medium="image">
			<media:title type="html">Screen shot 2009-12-26 at 2.39.49 PM</media:title>
			<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-26-at-2.39.49-PM-150x150.png" />
		</media:content>
	</item>
		<item>
		<title>How to Open the SMS App With a Phone Number</title>
		<link>http://getsetgames.com/2009/12/24/iphonedev-advent-tip-24-how-to-open-the-sms-app-with-a-phone-number/</link>
		<comments>http://getsetgames.com/2009/12/24/iphonedev-advent-tip-24-how-to-open-the-sms-app-with-a-phone-number/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 19:49:49 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[UIApplication]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=1073</guid>
		<description><![CDATA[It&#8217;s the day before Christmas, so this is the last post in our advent tip series. We&#8217;ve really enjoyed writing about so many little things that are so easily accomplished [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s the day before Christmas, so this is the last post in our <a href="http://getsetgames.com/tag/advent/">advent tip series</a>. We&#8217;ve really enjoyed writing about so many little things that are so easily accomplished with the iPhone SDK and we hope that they&#8217;ve helped you in developing your iPhone apps. This may be the last blog post in this series, but you can be sure we&#8217;ll still be writing about our adventures with iPhone, cocos2d and OpenFeint development.</p>
<h2>Less Yap, More Tip</h2>
<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/messages.png" alt="" title="messages" width="69" height="85" class="alignright size-full wp-image-1074" />Today&#8217;s advent tip is how to open the Messages app (aka the SMS app) with a specific phone number populated in the <strong>To:</strong> field. This is accomplished with great ease because the iPhone has implemented the <strong>sms:</strong> URI scheme. Therefore, we can use the UIApplication class&#8217; openURL method, which we have seen before when we discussed how to <a href="http://getsetgames.com/2009/12/12/iphonedev-advent-tip-12-how-to-dial-a-phone-number/">dial a phone number</a>, <a href="http://getsetgames.com/2009/12/06/iphonedev-advent-tip-6-how-to-open-the-mail-app-with-a-pre-composed-html-email/">pre-compose an email</a>, and yes, even <a href="http://getsetgames.com/2009/12/01/iphonedev-advent-tip-1-how-to-open-a-url-in-safari/">open a URL</a>.</p>
<p>So here it is: the one line of code you need to pop open the SMS app with a phone number:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;sms:5555555555&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/24/iphonedev-advent-tip-24-how-to-open-the-sms-app-with-a-phone-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/messages.png" />
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/messages.png" medium="image">
			<media:title type="html">messages</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Suspend Touch Input</title>
		<link>http://getsetgames.com/2009/12/23/iphonedev-advent-tip-23-how-to-suspend-touch-input/</link>
		<comments>http://getsetgames.com/2009/12/23/iphonedev-advent-tip-23-how-to-suspend-touch-input/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 00:06:43 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIApplication]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=1069</guid>
		<description><![CDATA[Have you ever encountered a situation where you wish you could just pause and resume touch input while developing an iPhone app? Sure, you could always increase the complexity of [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever encountered a situation where you wish you could just pause and resume touch input while developing an iPhone app? Sure, you could always increase the complexity of your input handling by considering the state of any number of variables, but there are some times when just switching input off and on would be easiest.</p>
<p>We had a number of cases like this when developing <a href="http://getsetgames.com/games/addicus/">Addicus</a>. In particular, because we have both the game and game over screens operating in a single cocos2d scene, we were noticing some bugs that occurred because of the way we handled input. This was solved by suspending input for brief periods of time.</p>
<h2>Input Goes Off</h2>
<p>Here&#8217;s how to tell your iPhone app to stop responding to touch events in just one line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> beginIgnoringInteractionEvents<span style="color: #002200;">&#93;</span>;</pre></div></div>

<h2>Input Goes On</h2>
<p>And as you might expect, resuming responding to touch input events is similarly easy:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> endIgnoringInteractionEvents<span style="color: #002200;">&#93;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/23/iphonedev-advent-tip-23-how-to-suspend-touch-input/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
		<item>
		<title>How to Log to the Console Using NSLog</title>
		<link>http://getsetgames.com/2009/12/22/iphonedev-advent-tip-22-how-to-log-to-the-console-using-nslog/</link>
		<comments>http://getsetgames.com/2009/12/22/iphonedev-advent-tip-22-how-to-log-to-the-console-using-nslog/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 23:56:19 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[NSLog]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=1056</guid>
		<description><![CDATA[Xcode has a built in console that provides an invaluable debugging tool for iPhone app development. It gives you a way to monitor text output from your app live at [...]]]></description>
			<content:encoded><![CDATA[<p>Xcode has a built in console that provides an invaluable debugging tool for iPhone app development. It gives you a way to monitor text output from your app live at runtime. It works both for apps being debugged in the simulator and on a device.</p>
<h2>NSLog</h2>
<p>Logging statements to the console is just as easy as you would expect it to be in iPhone app development. Just run the NSLog function like so:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hello world&quot;</span><span style="color: #002200;">&#41;</span>;</pre></div></div>

<h2>Format Specifiers</h2>
<p>The NSLog statement also supports <a href="http://getsetgames.com/2009/12/19/iphonedev-advent-tip-19-how-to-format-an-nsstring/">string formatting specifiers</a>, so you can also output the values of variables to the console with just one line. Below are some examples:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span> str <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hello world&quot;</span>;
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@&quot;</span>, str<span style="color: #002200;">&#41;</span>;
&nbsp;
<span style="color: #a61390;">int</span> num <span style="color: #002200;">=</span> <span style="color: #2400d9;">10</span>;
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%i&quot;</span>, num<span style="color: #002200;">&#41;</span>;
&nbsp;
<span style="color: #a61390;">float</span> price <span style="color: #002200;">=</span> <span style="color: #2400d9;">1.99</span>;
NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%f&quot;</span>, price<span style="color: #002200;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/22/iphonedev-advent-tip-22-how-to-log-to-the-console-using-nslog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
	</item>
		<item>
		<title>How to Upgrade Your iPhone Game to OpenFeint 2.4</title>
		<link>http://getsetgames.com/2009/12/21/iphonedev-advent-tip-21-how-to-upgrade-your-iphone-game-to-openfeint-2-4/</link>
		<comments>http://getsetgames.com/2009/12/21/iphonedev-advent-tip-21-how-to-upgrade-your-iphone-game-to-openfeint-2-4/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 15:40:28 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[openfeint]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=1018</guid>
		<description><![CDATA[If you were watching twitter this week, you might have heard that OpenFeint 2.4 was quietly released to developers. This update surely stretches the definition of &#8220;point release&#8221; because it [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/of_logo.png" alt="" title="of_logo" width="232" height="61" class="alignright size-full wp-image-1043" />If you were watching twitter this week, you might have heard that <a href="http://www.openfeint.com">OpenFeint 2.4</a> was <a href="http://twitter.com/openfeint/status/6806021596">quietly released</a> to developers. This update surely stretches the definition of &#8220;point release&#8221; because it is packed with awesome new features as well as a complete overhaul of the interface.</p>
<p>If you are upgrading to OpenFeint 2.4 from a previous version, then it is not as easy as replacing the source code. However, it is still quite easy to make the upgrade if you just keep a few things in mind. Here&#8217;s what you need to know:</p>
<h2>Disabling Chat</h2>
<p>If you were previously disabling the chat feature in order to meet a certain parental ratings requirement, then you would be doing so by passing the <strong>OpenFeintSettingDisableChat</strong> setting into the initializeWithProductKey method. Since chat is not the only user-genereated content in OpenFeint 2.4, this setting name has been changed to <strong>OpenFeintSettingDisableUserGeneratedContent</strong>. Below is the new way to initialize OpenFeint with chat (and all user-generated content) disabled:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSDictionary</span><span style="color: #002200;">*</span> settings <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDictionary</span> dictionaryWithObjectsAndKeys<span style="color: #002200;">:</span>
			<span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithInt<span style="color: #002200;">:</span>UIInterfaceOrientationLandscapeRight<span style="color: #002200;">&#93;</span>, OpenFeintSettingDashboardOrientation,
			<span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Addicus&quot;</span>, OpenFeintSettingShortDisplayName,
			<span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithBool<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>, OpenFeintSettingDisableUserGeneratedContent,
			<span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
&nbsp;
OFDelegatesContainer<span style="color: #002200;">*</span> delegates <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>OFDelegatesContainer containerWithOpenFeintDelegate<span style="color: #002200;">:</span>self
								andChallengeDelegate<span style="color: #002200;">:</span>self
								andNotificationDelegate<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>OpenFeint initializeWithProductKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;MY_PRODUCT_KEY&quot;</span>
			andSecret<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;MY_PRODUCT_SECRET&quot;</span>
			andDisplayName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Addicus&quot;</span>
			andSettings<span style="color: #002200;">:</span>settings
			andDelegates<span style="color: #002200;">:</span>delegates<span style="color: #002200;">&#93;</span>;</pre></div></div>

<h2>New Library Dependencies</h2>
<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-21-at-10.22.40-AM-298x300.png" alt="" title="Screen shot 2009-12-21 at 10.22.40 AM" width="298" height="300" class="alignright size-medium wp-image-1039" />If you replaced OpenFeint 2.3.x in your project with the new 2.4 source, you might have gotten a bunch of nasty errors upon building it. This is because the OpenFeint 2.4 requires more libraries to be added to your target. You need to add the following 3 frameworks to your target to get your OpenFeint 2.4 game to build successfully:</p>
<ul>
<li>CFNetwork</li>
<li>CoreLocation</li>
<li>MapKit</li>
</ul>
<p><br/><br />
<br/></p>
<h2>Achievements and Social Networks</h2>
<p>In OpenFeint 2.4, unlocking an achievement no longer prompts the user to notify their friends on Twitter and Facebook by default. However, you can restore this behaviour by setting the <strong>OpenFeintSettingPromptToPostAchievementUnlock</strong> setting to be true at the time of initialization. Below is how to initialize OpenFeint 2.4 with prompts to post achievements to social networks enabled:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSDictionary</span><span style="color: #002200;">*</span> settings <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDictionary</span> dictionaryWithObjectsAndKeys<span style="color: #002200;">:</span>
			<span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithInt<span style="color: #002200;">:</span>UIInterfaceOrientationLandscapeRight<span style="color: #002200;">&#93;</span>, OpenFeintSettingDashboardOrientation,
			<span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Addicus&quot;</span>, OpenFeintSettingShortDisplayName,
			<span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithBool<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>, OpenFeintSettingPromptToPostAchievementUnlock,
			<span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
&nbsp;
OFDelegatesContainer<span style="color: #002200;">*</span> delegates <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>OFDelegatesContainer containerWithOpenFeintDelegate<span style="color: #002200;">:</span>self
								andChallengeDelegate<span style="color: #002200;">:</span>self
								andNotificationDelegate<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>OpenFeint initializeWithProductKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;MY_PRODUCT_KEY&quot;</span>
			andSecret<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;MY_PRODUCT_SECRET&quot;</span>
			andDisplayName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Addicus&quot;</span>
			andSettings<span style="color: #002200;">:</span>settings
			andDelegates<span style="color: #002200;">:</span>delegates<span style="color: #002200;">&#93;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/21/iphonedev-advent-tip-21-how-to-upgrade-your-iphone-game-to-openfeint-2-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/of_logo-150x61.png" />
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/of_logo.png" medium="image">
			<media:title type="html">of_logo</media:title>
			<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/of_logo-150x61.png" />
		</media:content>
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-21-at-10.22.40-AM.png" medium="image">
			<media:title type="html">Screen shot 2009-12-21 at 10.22.40 AM</media:title>
			<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-21-at-10.22.40-AM-150x150.png" />
		</media:content>
	</item>
		<item>
		<title>How to Play a Video With MPMoviePlayerController</title>
		<link>http://getsetgames.com/2009/12/20/iphonedev-advent-tip-20-how-to-play-a-video-with-mpmovieplayercontroller/</link>
		<comments>http://getsetgames.com/2009/12/20/iphonedev-advent-tip-20-how-to-play-a-video-with-mpmovieplayercontroller/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 21:27:32 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[MPMoviePlayerController]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=1022</guid>
		<description><![CDATA[Splash screens, cutscenes, tutorials or just good old content. There are plenty of reasons to need to play a video in your iPhone app. Here&#8217;s how to do it in [...]]]></description>
			<content:encoded><![CDATA[<p>Splash screens, cutscenes, tutorials or just good old content. There are plenty of reasons to need to play a video in your iPhone app. Here&#8217;s how to do it in 3 simple steps:</p>
<p>1. Add the MediaPlayer framework to your target.</p>
<p>2. Import the MediaPlayer header file in the file you intend to begin playing the video in, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &lt;MediaPlayer/MediaPlayer.h&gt;</span></pre></div></div>

<p>3a. Now we can stream a video from the internet like so:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span>url <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://www.example.com/myvideo.m4v&quot;</span><span style="color: #002200;">&#93;</span>;
MPMoviePlayerController <span style="color: #002200;">*</span>player <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>MPMoviePlayerController alloc<span style="color: #002200;">&#93;</span> initWithContentURL<span style="color: #002200;">:</span>url<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>player play<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>3b. Alternately, we can stream a video that you include in your app bundle. To stream a file called <em>myvideo.m4v</em>, you would run the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>path <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSBundle</span> mainBundle<span style="color: #002200;">&#93;</span> pathForResource<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;myvideo&quot;</span> ofType<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;m4v&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span>url <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> fileURLWithPath<span style="color: #002200;">:</span>path<span style="color: #002200;">&#93;</span>;
&nbsp;
MPMoviePlayerController <span style="color: #002200;">*</span>player <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>MPMoviePlayerController alloc<span style="color: #002200;">&#93;</span> initWithContentURL<span style="color: #002200;">:</span>url<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>player play<span style="color: #002200;">&#93;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/20/iphonedev-advent-tip-20-how-to-play-a-video-with-mpmovieplayercontroller/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
	</item>
		<item>
		<title>How to Format an NSString</title>
		<link>http://getsetgames.com/2009/12/19/iphonedev-advent-tip-19-how-to-format-an-nsstring/</link>
		<comments>http://getsetgames.com/2009/12/19/iphonedev-advent-tip-19-how-to-format-an-nsstring/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 03:08:02 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[NSString]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=1010</guid>
		<description><![CDATA[It&#8217;s back to basics with today&#8217;s advent tip. I would be surprised if anything short of ALL developers have had a need to format strings at one time or another. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s back to basics with today&#8217;s advent tip. I would be surprised if anything short of ALL developers have had a need to format strings at one time or another. iPhone app development is no exception.</p>
<p>String formatting allows you to build a string based on a template and varying types of values. For example, if I am keeping track of a player&#8217;s score as an integer and I want to display a string to the player that celebrates their score by saying &#8220;You scored 2600! Way to go!&#8221;, then I need string formatting to get the correct score in the middle of that string.</p>
<h2>How to Do It</h2>
<p>Below is an example of how to build the above NSString. This example formats a string with an integer in it using the <strong>%i</strong> format specifier.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">int</span> score <span style="color: #002200;">=</span> <span style="color: #2400d9;">2600</span>;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span> scoreString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;You scored %i! Way to go!&quot;</span>,score<span style="color: #002200;">&#93;</span>;</pre></div></div>

<h2>Format Specifiers</h2>
<p>But string formatting doesn&#8217;t stop at putting integers in strings. Below are some of the most common format specifiers for other value types:</p>
<table>
<tr>
<td><strong>Specifier</strong></td>
<td><strong>Purpose</strong></td>
</tr>
<tr>
<td>%i</td>
<td>integer</td>
</tr>
<tr>
<td>%f</td>
<td>float</td>
</tr>
<tr>
<td>%@</td>
<td>Objective-C object (commonly used to specify another NSString)</td>
</tr>
<tr>
<td>%x</td>
<td>hexadecimal</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/19/iphonedev-advent-tip-19-how-to-format-an-nsstring/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
	</item>
		<item>
		<title>How to Take the Shine off Your App&#8217;s Icon</title>
		<link>http://getsetgames.com/2009/12/18/iphonedev-advent-tip-18-how-to-take-the-shine-off-your-apps-icon/</link>
		<comments>http://getsetgames.com/2009/12/18/iphonedev-advent-tip-18-how-to-take-the-shine-off-your-apps-icon/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 00:44:11 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[UIPrerenderedIcon]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=1002</guid>
		<description><![CDATA[iPhone apps have a curved shine applied to their icons by default. It makes any icon look like it has been buffed to a high gloss. But what if you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-4.56.39-PM.png" alt="Screen shot 2009-12-18 at 4.56.39 PM" title="Screen shot 2009-12-18 at 4.56.39 PM" width="141" height="82" class="alignright size-full wp-image-1003" />iPhone apps have a curved shine applied to their icons by default. It makes any icon look like it has been buffed to a high gloss. But what if you don&#8217;t want your icon to look shiny? What if you want full control over the look of your icon? Don&#8217;t fret: there are a couple of easy ways to disable the shine and take back control, and they&#8217;re both rather easy.</p>
<h2>UIPrerenderedIcon</h2>
<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-4.45.15-PM.png" alt="Screen shot 2009-12-18 at 4.45.15 PM" title="Screen shot 2009-12-18 at 4.45.15 PM" width="366" height="60" class="alignright size-full wp-image-1004" />The first method is to add a setting to your project in Xcode. Just follow these 4 simple steps to do so:</p>
<p>1. Open your iPhone app&#8217;s info.plist file.</p>
<p>2. Command-click and select Add Row.</p>
<p>3. Select &#8220;Icon already includes gloss and bevel effects&#8221; from the drop down that appears.</p>
<p>4. Check the checkbox that appears next to the new row.</p>
<p>Alternately, you could set this setting in your info.plist by editing it in a text editor. You just need to add the following 2 XML tags inside the &lt;dict&gt; tag:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dict<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>UIPrerenderedIcon<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/key<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;true</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	...</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/18/iphonedev-advent-tip-18-how-to-take-the-shine-off-your-apps-icon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-4.56.39-PM.png" />
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-4.56.39-PM.png" medium="image">
			<media:title type="html">Screen shot 2009-12-18 at 4.56.39 PM</media:title>
		</media:content>
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-4.45.15-PM.png" medium="image">
			<media:title type="html">Screen shot 2009-12-18 at 4.45.15 PM</media:title>
			<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-18-at-4.45.15-PM-150x60.png" />
		</media:content>
	</item>
		<item>
		<title>How to Prevent the iPhone from Sleeping</title>
		<link>http://getsetgames.com/2009/12/17/iphonedev-advent-tip-17-how-to-prevent-the-iphone-from-sleeping/</link>
		<comments>http://getsetgames.com/2009/12/17/iphonedev-advent-tip-17-how-to-prevent-the-iphone-from-sleeping/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 23:10:53 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIApplication]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=994</guid>
		<description><![CDATA[Left idle, the iPhone goes into sleep mode after about a minute. This narcoleptic behaviour saves on battery life, but there are situations where you would not want the device [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/put-the-iphone-to-sleep.jpeg" alt="put-the-iphone-to-sleep" title="put-the-iphone-to-sleep" width="200" class="alignright size-full wp-image-995" /></p>
<p>Left idle, the iPhone goes into sleep mode after about a minute. This narcoleptic behaviour saves on battery life, but there are situations where you would not want the device to go to sleep. For instance, in the middle of a multiplayer game that is turn-based, such as chess. You could wait for longer than a minute for your opponent to make make their move and you wouldn&#8217;t want to miss it when they did.</p>
<p>To keep the iPhone awake and alert, simply run the following line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span>.idleTimerDisabled <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;</pre></div></div>

<p>Do use this tip sparingly though. The iPhone&#8217;s power is unmatched, to be sure, but unfortunately it is not unlimited. </p>
]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/17/iphonedev-advent-tip-17-how-to-prevent-the-iphone-from-sleeping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/put-the-iphone-to-sleep-150x150.jpg" />
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/put-the-iphone-to-sleep.jpeg" medium="image">
			<media:title type="html">put-the-iphone-to-sleep</media:title>
			<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/put-the-iphone-to-sleep-150x150.jpg" />
		</media:content>
	</item>
		<item>
		<title>How to Show the Network Activity Indicator</title>
		<link>http://getsetgames.com/2009/12/16/iphonedev-advent-tip-16-how-to-show-the-network-activity-indicator/</link>
		<comments>http://getsetgames.com/2009/12/16/iphonedev-advent-tip-16-how-to-show-the-network-activity-indicator/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 03:17:32 +0000</pubDate>
		<dc:creator>Derek van Vliet</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[advent]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[UIApplication]]></category>

		<guid isPermaLink="false">http://getsetgames.com/?p=987</guid>
		<description><![CDATA[The network activity indicator is like the UIActivityIndicatorView we previously discussed, only it sits on the status bar, it is smaller, and believe it or not, it is even easier [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-16-at-10.14.26-PM.png" alt="Screen shot 2009-12-16 at 10.14.26 PM" title="Screen shot 2009-12-16 at 10.14.26 PM" width="172" height="143" class="alignright size-full wp-image-990" />The network activity indicator is like the <a href="http://getsetgames.com/2009/12/03/iphonedev-advent-tip-3-how-to-display-an-activity-indicator-with-uiactivityindicatorview/">UIActivityIndicatorView</a> we previously discussed, only it sits on the status bar, it is smaller, and believe it or not, it is even easier to manipulate. It&#8217;s the little rotating wheel of bars (pictured right) that shows up on the status bar whenever your iPhone is accessing the network.</p>
<h2>Show It</h2>
<p>If you would like to let your users know that your iPhone app is currently swapping data with the network, you can do so with this simple line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span>.networkActivityIndicatorVisible <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;</pre></div></div>

<h2>Hide It</h2>
<p>You guessed it: once you&#8217;re done showing it, to hide it again, just set the same UIApplication property to NO like so.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span>.networkActivityIndicatorVisible <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://getsetgames.com/2009/12/16/iphonedev-advent-tip-16-how-to-show-the-network-activity-indicator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-16-at-10.14.26-PM-150x143.png" />
		<media:content url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-16-at-10.14.26-PM.png" medium="image">
			<media:title type="html">Screen shot 2009-12-16 at 10.14.26 PM</media:title>
			<media:thumbnail url="http://getsetgames.com/wp-content/uploads/2009/12/Screen-shot-2009-12-16-at-10.14.26-PM-150x143.png" />
		</media:content>
	</item>
	</channel>
</rss>

