<?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>Codebreaker &#187; iPhone</title>
	<atom:link href="http://blog.sumin.us/archives/tag/iphone/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.sumin.us</link>
	<description>2bc08752a0894eb2c7afb345286e391d</description>
	<lastBuildDate>Wed, 08 Sep 2010 02:15:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Apple Push Notification</title>
		<link>http://blog.sumin.us/archives/1112</link>
		<comments>http://blog.sumin.us/archives/1112#comments</comments>
		<pubDate>Sun, 16 Aug 2009 06:10:22 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[push notification]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/archives/1112</guid>
		<description><![CDATA[I was able to setup my server and mobile device (iPhone and iPod touch) to make the push notification service working. I had to send a binary data packet over SSL/TSL connection and the APNs doesn't even tell me anything back, so it was very difficult to debug the system. So if you need someone [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1111" class="wp-caption aligncenter" style="width: 330px"><a href="/wp-content/uploads/2009/08/Screenshot-2009.08.15-11.40.07.png"><img src="http://blog.sumin.us/wp-content/uploads/2009/08/Screenshot-2009.08.15-11.40.07.png" alt="Push Test" title="Screenshot 2009.08.15 11.40.07" width="320" height="480" class="size-full wp-image-1111" /></a><p class="wp-caption-text">Push Test</p></div>

<p>I was able to setup my server and mobile device (iPhone and iPod touch) to make the push notification service working. I had to send a binary data packet over SSL/TSL connection and the APNs doesn't even tell me anything back, so it was very difficult to debug the system. So if you need someone to setup the push notification, you can contact me.</p>
<!-- AdSense Now! V1.83 -->
<!-- Post[count: 2] -->
<div class="adsense adsense-leadout" style="text-align:center;margin: 12px;"><script type="text/javascript"><!--
google_ad_client = "pub-2353453386862167";
/* 468x60, created 10/26/09 */
google_ad_slot = "1252542387";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1112/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Macro for UIAlertView</title>
		<link>http://blog.sumin.us/archives/1071</link>
		<comments>http://blog.sumin.us/archives/1071#comments</comments>
		<pubDate>Mon, 25 May 2009 19:48:30 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[UIAlertView]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1071</guid>
		<description><![CDATA[Introduction UIAlertView is a convenient method to notify users with a short message and a couple buttons. However, it could be, actually quiet commonly, a little tedious to open up one. Just like this. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Message" message:@"Data was received, but could not be properly interpreted" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil]; alert.tag = AlertInvalidJSON; [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>

<p>UIAlertView is a convenient method to notify users with a short message and a couple buttons. However, it could be, actually quiet commonly, a little tedious to open up one. Just like this.</p>

<pre><code>UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Message"
        message:@"Data was received, but could not be properly interpreted"
        delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
alert.tag = AlertInvalidJSON;
[alert show];
[alert release];
</code></pre>

<p>So, I decided to make a very simple macro so that I don't have to type all that. (Thanks to C)</p>

<pre><code>#define Alert(tag, title, msg, button, buttons...) {UIAlertView *__alert = 
[[UIAlertView alloc] initWithTitle:title message:msg delegate:self 
cancelButtonTitle:button otherButtonTitles:buttons];[__alert setTag:tag];
[__alert show];[__alert release];}
</code></pre>

<p>Now it takes less time to type, and is easier to read.</p>

<pre><code>Alert(AlertInvalidJSON, @"Message",
    @"Data was received, but could not be properly interpreted",
    @"Dismiss", nil);
</code></pre>

<h3>Screenshot</h3>

<p><img src="http://blog.sumin.us/wp-content/uploads/2009/05/uialertview.png" alt="uialertview" title="uialertview" width="296" height="182" class="aligncenter size-full wp-image-1077" /></p>

<h3>References</h3>

<ul>
<li><a href="http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gcc/variadic-macros.html">Macros with a Variable Number of Arguments</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1071/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone Accelerometer Example</title>
		<link>http://blog.sumin.us/archives/1050</link>
		<comments>http://blog.sumin.us/archives/1050#comments</comments>
		<pubDate>Wed, 22 Apr 2009 05:23:12 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1050</guid>
		<description><![CDATA[This is what I made in today's presentation. Just remember the following two steps: Get an instance of UIAccelerometer, using UIAccelerometer.sharedAccelerometer method, and specify the update interval and the delegate target. Implement UIAccelerometerDelegate within the delegate target; for example, a view controller. accelerometerexample.zip]]></description>
			<content:encoded><![CDATA[<p>This is what I made in today's presentation.</p>

<p>Just remember the following two steps:</p>

<ol>
<li>Get an instance of UIAccelerometer, using UIAccelerometer.sharedAccelerometer method, and specify the update interval and the delegate target. </li>
<li>Implement UIAccelerometerDelegate within the delegate target; for example, a view controller.</li>
</ol>

<p><a href="/wp-content/uploads/2009/04/accelerometerexample.zip">accelerometerexample.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1050/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CQube has made a pretty good start!</title>
		<link>http://blog.sumin.us/archives/1033</link>
		<comments>http://blog.sumin.us/archives/1033#comments</comments>
		<pubDate>Tue, 31 Mar 2009 10:08:37 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[CQube]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1033</guid>
		<description><![CDATA[Apple finally approved CQube last sunday night. It took exactly seven days to go though the review process. I was kind of impressed that CQube got about 100 download hits internationally at the first day of release. I really hope CQube keeps being spread out at this pace or faster! I'm planning to launch the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gallery.sumin.us/v/screenshots/cqube"><img src="http://blog.sumin.us/wp-content/uploads/2009/04/screenshot-20090401-025954.png" alt="screenshot-20090401-025954" title="screenshot-20090401-025954" width="320" height="480" class="aligncenter size-full wp-image-1034" /></a></p>

<p>Apple finally approved <a href="http://cqube.mobi">CQube</a> last sunday night. It took exactly seven days to go though the review process.</p>

<p>I was kind of impressed that <a href="http://cqube.mobi">CQube</a> got about 100 download hits internationally at the first day of release.</p>

<p>I really hope <a href="http://cqube.mobi">CQube</a> keeps being spread out at this pace or faster! I'm planning to launch the full-featured game within two months (on this May), if the classes are nice to me. You know, I'm a full-time college student.</p>

<p>So, those of you who are waiting for the full version, please be patient. Whatever you imagine, you will see more than that.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1033/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iTunesArtwork</title>
		<link>http://blog.sumin.us/archives/916</link>
		<comments>http://blog.sumin.us/archives/916#comments</comments>
		<pubDate>Wed, 28 Jan 2009 08:37:26 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iTunesArtwork]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=916</guid>
		<description><![CDATA[To display your application artwork within iTunes, save a 512x512 .png at the root of your app bundle prior to building. Name the file 'iTunesArtwork'. You probably have read this from the iPhone developer program user guide. Are you having some trouble with setting a 512x512 PNG image for your application's artwork? Did you name [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>To display your application artwork within iTunes, save a 512x512 .png at the root of your app bundle prior to building. Name the file 'iTunesArtwork'.</p>
</blockquote>

<p>You probably have read this from the iPhone developer program user guide. Are you having some trouble with setting a 512x512 PNG image for your application's artwork? Did you name your artwork file as <code>iTunesArtwork.png</code>?</p>

<p>Do <em>not</em> name your file as <code>iTunesArtwork.png</code>. It must be <code>iTunesArtwork</code>. Without extension.</p>

<p><a href="http://gallery.sumin.us/v/screenshots/cqube/docs/5be57ab2afa52bf7.png.html"><img src="http://gallery.sumin.us/d/1559-2/5be57ab2afa52bf7.png" alt="iTunesArtwork" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/916/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>0xE800003A ApplicationVerificationFailed</title>
		<link>http://blog.sumin.us/archives/817</link>
		<comments>http://blog.sumin.us/archives/817#comments</comments>
		<pubDate>Sat, 17 Jan 2009 01:58:18 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[0xE800003A]]></category>
		<category><![CDATA[ApplicationVerificationFailed]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[organizer]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=817</guid>
		<description><![CDATA[Are you having some trouble with this weird error message? When I was getting this message, I checked console messages in the Organizer. unknown mobile_installation_proxy[893] &#60;Error&#62;: install_embedded_profile: Skipping the installation of the embedded profile unknown securityd[887] &#60;Error&#62;: mobile_installat[893] SecItemCopyMatching: missing entitlement unknown mobile_installation_proxy[893] &#60;Error&#62;: entitlement 'application-identifier' has value not permitted by a provisioning profile unknown [...]]]></description>
			<content:encoded><![CDATA[<p>Are you having some trouble with this weird error message?</p>

<p><img src="/wp-content/uploads/2009/01/e2191b18b26127cf.png" alt="Your mobile device has encountered an unexpected error (0xE800003A) ApplicationVerificationFailed" title="e2191b18b26127cf" width="434" height="145" class="aligncenter size-full wp-image-819" /></p>

<p>When I was getting this message, I checked console messages in the Organizer.</p>

<pre><code>unknown mobile_installation_proxy[893] &lt;Error&gt;: install_embedded_profile: Skipping the installation of the embedded profile
unknown securityd[887] &lt;Error&gt;: mobile_installat[893] SecItemCopyMatching: missing entitlement
unknown mobile_installation_proxy[893] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile
unknown mobile_installation_proxy[893] &lt;Error&gt;: verify_executable: Could not validate signature: e8008016
unknown mobile_installation_proxy[893] &lt;Error&gt;: preflight_application_install: Could not verify /var/tmp/install_staging.lbRQyZ/CQube.app/CQube
unknown mobile_installation_proxy[893] &lt;Error&gt;: install_application: Could not preflight application install
unknown mobile_installation_proxy[893] &lt;Error&gt;: handle_install: Installation failed
</code></pre>

<p>Doesn't seem useful unless you know how this tiny device exactly works. I wasted a couple hours to play with entitlements and other stuff that might be related to this issue. There was no luck. Then I finally figured out what I did wrong. You probably made a same mistake just like I did.</p>

<p><img src="/wp-content/uploads/2009/01/ee2ed4cdbd73c393.png" alt="ee2ed4cdbd73c393" title="ee2ed4cdbd73c393" width="470" height="673" class="aligncenter size-full wp-image-820" /></p>

<p>Didn't you put the whole App ID that you copied from the iPhone developer portal? Don't do this!</p>

<p>Put</p>

<pre><code>com.domainname.appname
</code></pre>

<p>Instead of</p>

<pre><code>XXXXXXXX.com.domainname.appname
</code></pre>

<p>I should've read the manual more carefully ;-)</p>

<p>BOOM!
<a href="http://cqube.mobi"><img src="/wp-content/uploads/2009/01/screenshot-20090115-213755.png" alt="screenshot-20090115-213755" title="screenshot-20090115-213755" width="320" height="480" class="aligncenter size-full wp-image-827" /></a></p>

<p>If this is not your case, well, you might want look for other solutions. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/817/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>
