<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Peter Chang&#039;s Hacker Blog</title>
	<atom:link href="http://peter78.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://peter78.wordpress.com</link>
	<description>Code snippets, Silicon Valley and Tech Thoughts</description>
	<lastBuildDate>Wed, 25 Jul 2012 03:32:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='peter78.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Peter Chang&#039;s Hacker Blog</title>
		<link>http://peter78.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://peter78.wordpress.com/osd.xml" title="Peter Chang&#039;s Hacker Blog" />
	<atom:link rel='hub' href='http://peter78.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Beautiful Button Packs using Bootstrap + Kuler&#8217;s Top 100</title>
		<link>http://peter78.wordpress.com/2012/02/13/beautiful-button-packs-using-bootstrap/</link>
		<comments>http://peter78.wordpress.com/2012/02/13/beautiful-button-packs-using-bootstrap/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 23:29:50 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Visual]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=99</guid>
		<description><![CDATA[Button packs based on Adobe Kuler&#8217;s Top 100 color schemes.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=99&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://wrapbootstrap.com/preview/WB00T81AK">Button packs</a> based on <a href="http://kuler.adobe.com/#themes/rating?time=30">Adobe Kuler&#8217;s Top 100 color schemes</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=99&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2012/02/13/beautiful-button-packs-using-bootstrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing Routes in Rails</title>
		<link>http://peter78.wordpress.com/2011/11/17/testing-routes-in-rails/</link>
		<comments>http://peter78.wordpress.com/2011/11/17/testing-routes-in-rails/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 23:53:36 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=97</guid>
		<description><![CDATA[http://blog.zobie.com/2008/11/testing-routes-in-rails/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=97&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.zobie.com/2008/11/testing-routes-in-rails/">http://blog.zobie.com/2008/11/testing-routes-in-rails/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=97&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/11/17/testing-routes-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile UI Patterns</title>
		<link>http://peter78.wordpress.com/2011/10/17/mobile-ui-patterns/</link>
		<comments>http://peter78.wordpress.com/2011/10/17/mobile-ui-patterns/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 21:03:33 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=92</guid>
		<description><![CDATA[http://mobile-patterns.com/ http://pttrns.com/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=92&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://mobile-patterns.com/">http://mobile-patterns.com/</a></p>
<p><a href="http://pttrns.com/">http://pttrns.com/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=92&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/10/17/mobile-ui-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Malformed JSON Error for Facebook Signed Request</title>
		<link>http://peter78.wordpress.com/2011/10/04/malformed-json-error-for-facebook-signed-request/</link>
		<comments>http://peter78.wordpress.com/2011/10/04/malformed-json-error-for-facebook-signed-request/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 16:29:13 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=87</guid>
		<description><![CDATA[There&#8217;s a bit of confusion concerning the base64 decoding of the signed request returned by Facebook. Their FAQ mentions you have to use base64 decoding for URLs specifically which handle the proper character substitution for URLs. The other error has to do with the end padding that is omitted. If you do a simple JSON [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=87&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s a bit of confusion concerning the base64 decoding of the signed request returned by Facebook. Their FAQ mentions you have to use base64 decoding for URLs specifically which handle the proper character substitution for URLs.</p>
<p>The other error has to do with the end padding that is omitted. If you do a simple JSON parse on these base64 encoded string without padding, you may end up finding yourself missing a &#8220;}&#8221; on the end.</p>
<p>For instructions on getting the proper JSON, see <a href="http://qugstart.com/blog/ruby-and-rails/facebook-base64-url-decode-for-signed_request/">this</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=87&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/10/04/malformed-json-error-for-facebook-signed-request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails Initialization and Configuration Order</title>
		<link>http://peter78.wordpress.com/2011/07/19/rails-initialization-and-configuration-order/</link>
		<comments>http://peter78.wordpress.com/2011/07/19/rails-initialization-and-configuration-order/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 19:00:21 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=81</guid>
		<description><![CDATA[A good and simple overview of how initialization and configuration works, in detail, for Rails apps. http://www.sekuda.com/rails_initialization_and_configuration_order<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=81&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A good and simple overview of how initialization and configuration works, in detail, for Rails apps.</p>
<p><a href="http://www.sekuda.com/rails_initialization_and_configuration_order">http://www.sekuda.com/rails_initialization_and_configuration_order</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=81&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/07/19/rails-initialization-and-configuration-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Fix Index Selection for Ruby in TextMate</title>
		<link>http://peter78.wordpress.com/2011/07/07/fix-index-selection-for-ruby-in-textmate/</link>
		<comments>http://peter78.wordpress.com/2011/07/07/fix-index-selection-for-ruby-in-textmate/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 16:05:26 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=84</guid>
		<description><![CDATA[Install the Beautifier bundle. Here are some other useful bundles for working on Ruby in TextMate.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=84&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Install the <a href="http://blog.monkeysthumb.org/code-beautifier-textmate-bundle">Beautifier bundle.</a></p>
<p>Here are some other <a href="http://adventuresincoding.com/2010/05/10-textmate-bundlesplugins-to-boost-your-ruby-on-rails-development-productivity/">useful bundles for working on Ruby in TextMate</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=84&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/07/07/fix-index-selection-for-ruby-in-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up SSH for EC2 Covenience</title>
		<link>http://peter78.wordpress.com/2011/07/06/setting-up-ssh-for-ec2-covenience/</link>
		<comments>http://peter78.wordpress.com/2011/07/06/setting-up-ssh-for-ec2-covenience/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 16:43:39 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Shell Hacks]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=82</guid>
		<description><![CDATA[Add/Modify .ssh/config and add this entry: Host ec2 Hostname ec2-x-x-x-x.compute-x.amazonaws.com User ubuntu IdentityFile /your/path/to/id/file Then you can simply log into your machine by typing: ssh ec2 instead of giving the complete path to your machine and identity file each time.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=82&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Add/Modify .ssh/config and add this entry:</p>
<p><code><br />
Host ec2<br />
  Hostname ec2-x-x-x-x.compute-x.amazonaws.com<br />
  User ubuntu<br />
  IdentityFile /your/path/to/id/file<br />
</code></p>
<p>Then you can simply log into your machine by typing:</p>
<p><code><br />
ssh ec2<br />
</code></p>
<p>instead of giving the complete path to your machine and identity file each time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=82&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/07/06/setting-up-ssh-for-ec2-covenience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails State Machines&#8230;</title>
		<link>http://peter78.wordpress.com/2011/07/01/rails-state-machines/</link>
		<comments>http://peter78.wordpress.com/2011/07/01/rails-state-machines/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 03:08:50 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=78</guid>
		<description><![CDATA[.. and integrated into the ActiveRecord gem no less! http://blog.envylabs.com/2009/08/the-rails-state-machine/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=78&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img class="alignnone" title="traffic light" src="http://blog.envylabs.com/wp-content/uploads/2009/08/2440158724_11d4e206e7-150x150.jpg" alt="" width="150" height="150" /></p>
<p>.. and integrated into the ActiveRecord gem no less!</p>
<p><a href="http://blog.envylabs.com/2009/08/the-rails-state-machine/" rel="nofollow">http://blog.envylabs.com/2009/08/the-rails-state-machine/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=78&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/07/01/rails-state-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>

		<media:content url="http://blog.envylabs.com/wp-content/uploads/2009/08/2440158724_11d4e206e7-150x150.jpg" medium="image">
			<media:title type="html">traffic light</media:title>
		</media:content>
	</item>
		<item>
		<title>A Successful Git Branching Model</title>
		<link>http://peter78.wordpress.com/2011/06/30/a-successful-git-branching-model/</link>
		<comments>http://peter78.wordpress.com/2011/06/30/a-successful-git-branching-model/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 16:52:42 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=75</guid>
		<description><![CDATA[In my days of coding, I&#8217;ve been lucky to avoid dealing with source control much. I spent some early days doing simple checkout/commits in CVS. Later on, I used SVN but typically on projects that I worked on by myself or with another, working in distinct areas. Lately, I&#8217;ve started using Git but, again, in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=75&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In my days of coding, I&#8217;ve been lucky to avoid dealing with source control much. I spent some early days doing simple checkout/commits in CVS. Later on, I used SVN but typically on projects that I worked on by myself or with another, working in distinct areas.</p>
<p>Lately, I&#8217;ve started using Git but, again, in a single-developer situation.</p>
<p>Here&#8217;s a great article on how to use Git in a dev/prod environment with multiple developers.</p>
<p><a href="http://nvie.com/posts/a-successful-git-branching-model/">http://nvie.com/posts/a-successful-git-branching-model/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=75&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/06/30/a-successful-git-branching-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>
	</item>
		<item>
		<title>Apple Push Notification Service Deployment Tips</title>
		<link>http://peter78.wordpress.com/2011/04/01/apple-push-notification-service-deployment-tips/</link>
		<comments>http://peter78.wordpress.com/2011/04/01/apple-push-notification-service-deployment-tips/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 22:54:21 +0000</pubDate>
		<dc:creator>peter78</dc:creator>
				<category><![CDATA[iOS Development]]></category>

		<guid isPermaLink="false">http://peter78.wordpress.com/?p=68</guid>
		<description><![CDATA[Here are some tips when debugging Apple Push Notifications. Take heed as it&#8217;s very easy to get into a confusing situation and not get any push messages at all. General Rule of Thumbs: Keep in mind that the sandbox (development) environment is entirely separate to the production environment. Let me repeat: Keep in mind that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=68&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://peter78.files.wordpress.com/2011/04/facepalm.jpg"><img class="alignnone size-medium wp-image-70" title="facepalm" src="http://peter78.files.wordpress.com/2011/04/facepalm.jpg?w=300&#038;h=240" alt="" width="300" height="240" /></a></p>
<p><a href="http://peter78.files.wordpress.com/2011/04/facepalm.jpg"></a>Here are some tips when debugging Apple Push Notifications. Take heed as it&#8217;s very easy to get into a confusing situation and not get any push messages at all.</p>
<p>General Rule of Thumbs:</p>
<ul>
<li>Keep in mind that the sandbox (development) environment is entirely separate to the production environment.</li>
<li>Let me repeat: <em>Keep in mind that the sandbox (development) environment is entirely separate to the production environment. </em>Mixing device tokens and certifications across the environment will lead to a lot of nothing (that is, non responses).</li>
<li>Servers needs push certificates from the provisioning portal.</li>
<li>Clients register themselves with push services by communicating with Apple servers.</li>
</ul>
<p>The two environments have items needed specific to them. More specifically:</p>
<ul>
<li>Servers need a <strong>separate</strong> developer certificate and production certificate.</li>
<li>Client get a <strong>different</strong> device token when registering themselves in development builds vs applications downloaded from the App Store.</li>
</ul>
<p>Therefore, the following rules exist (unless you do some hackery I&#8217;m not currently aware of):</p>
<ul>
<li>Development builds of your client (that is, any build put on your device from the development environment including Ad Hoc) will get development device tokens when registering with the APNS. <strong>Which means you can&#8217;t test production server settings with at development build on your client. </strong>Attempts to do so will lead to confusion and wasted time.</li>
<li>Production builds (that is, the app actually downloaded from the App Store) will get production device tokens. These must be tested with production APNS server settings.</li>
</ul>
<p>Last, but most definitely not least, you can only have 1 type of build on any given iPhone device*. So if you have a development build on your device and want to test your app downloaded from the app store, <strong>delete it first, then download your app</strong> and test it in the production environment (which it should be pointing to anyway). I didn&#8217;t delete my development build first and push notifications didn&#8217;t seem to work even though I attempted to install the app from the App Store (perhaps because it didn&#8217;t replace the existing app).</p>
<p><strong>Developers Tip</strong></p>
<p>If you have an iPad you can install your iPhone app on there to do some push notification testing with your iPhone. iPads also accept push notifications themselves.</p>
<p>*You can have different builds if you utilize different app ids between development and production. I haven&#8217;t tried this out yet but it seems like yet another thing that might cause confusion when doing builds, especially if you forget about it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/peter78.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/peter78.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=peter78.wordpress.com&#038;blog=1394985&#038;post=68&#038;subd=peter78&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://peter78.wordpress.com/2011/04/01/apple-push-notification-service-deployment-tips/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/32bcd52139eaff5c68493b603a6be57f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">peter78</media:title>
		</media:content>

		<media:content url="http://peter78.files.wordpress.com/2011/04/facepalm.jpg?w=300" medium="image">
			<media:title type="html">facepalm</media:title>
		</media:content>
	</item>
	</channel>
</rss>
