<?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>Just2us</title>
	<atom:link href="http://just2us.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://just2us.com</link>
	<description>Its about us</description>
	<lastBuildDate>Sat, 06 Mar 2010 14:08:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apple dominates 80% of Singapore Smartphone</title>
		<link>http://just2us.com/2010/03/apple-dominates-80-of-singapore-smartphone/</link>
		<comments>http://just2us.com/2010/03/apple-dominates-80-of-singapore-smartphone/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 14:08:47 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[market]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/03/apple-dominates-80-of-singapore-smartphone/</guid>
		<description><![CDATA[AdMob has released its report for Q4 2009 Southeast Asia.
Some particularly useful data are:

The top 3 countries are India, Indonesia and Australia, generating 72% of the traffic 
Singapore has 77% of the traffic coming from smartphones (the rest from non-smartphones), the highest in SEA. Vietnam has the least at 22%. 
iPhone is especially prevalent in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F03%2Fapple-dominates-80-of-singapore-smartphone%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F03%2Fapple-dominates-80-of-singapore-smartphone%2F" height="61" width="51" /></a></div><p>AdMob has released its <a href="http://metrics.admob.com/2010/03/q4-2009-southeast-asia-report/">report for Q4 2009 Southeast Asia</a>.</p>
<p>Some particularly useful data are:</p>
<ul>
<li>The top 3 countries are <strong>India</strong>, <strong>Indonesia</strong> and <strong>Australia</strong>, generating 72% of the traffic </li>
<li><strong>Singapore</strong> has 77% of the traffic coming from smartphones (the rest from non-smartphones), the highest in SEA. Vietnam has the least at 22%. </li>
<li>iPhone is especially prevalent in <strong>Australia</strong> (90%), <strong>Singapore</strong> (80%) and <strong>Hong Kong</strong> (70%). </li>
<li>Nokia is prevalent in the rest of the SEA countries where iPhone is not. </li>
</ul>
<p align="center">&#160;</p>
<p align="center"><a href="http://metrics.admob.com/2010/03/q4-2009-southeast-asia-report/"><img title="admob sg" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="310" alt="admob sg" src="http://just2us.com/site/wp-content/uploads/2010/03/admobsg.jpg" width="486" border="0" /></a><em>Top Smartphones from Singapore</em></p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/03/apple-dominates-80-of-singapore-smartphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to register US iTunes Account</title>
		<link>http://just2us.com/2010/02/how-to-register-us-itunes-account/</link>
		<comments>http://just2us.com/2010/02/how-to-register-us-itunes-account/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 15:17:10 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/how-to-register-us-itunes-account/</guid>
		<description><![CDATA[If you have a non-US iTunes account, and would like to download some US-only content, you need to do this.
It is easy to register for another account, and

you do NOT need another email address (if you use gmail),
you do NOT need a US credit card,
you do NOT need to stay in US (for address)

&#160;
Follow these [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-register-us-itunes-account%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-register-us-itunes-account%2F" height="61" width="51" /></a></div><p>If you have a <strong>non-US iTunes</strong> account, and would like to download some <strong>US-only content</strong>, you need to do this.</p>
<p>It is easy to register for another account, and</p>
<ul>
<li>you do NOT need another email address (if you use gmail),</li>
<li>you do NOT need a US credit card,</li>
<li>you do NOT need to stay in US (for address)</li>
</ul>
<p>&#160;</p>
<h3>Follow these steps..</h3>
<p>In iTunes, go to App Store and click on a FREE app. </p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct1.jpg"><img title="Register-US-acct-1" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="396" alt="Register-US-acct-1" src="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct1_thumb.jpg" width="324" border="0" /></a></p>
<p>&#160;</p>
<p>Create a new account.</p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct2.jpg"><img title="Register-US-acct-2" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="336" alt="Register-US-acct-2" src="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct2_thumb.jpg" width="524" border="0" /></a>&#160; </p>
<p>Continue, accept the terms, and continue (no screenshots provided)..</p>
<p>Fill in the account details. Note that we used a trick here. Let’s say your real email is <a href="mailto:jason.bourne@gmail.com">jason.bourne@gmail.com</a>, then you can register <a href="mailto:jason.bourne+1@gmail.com">jason.bourne+1@gmail.com</a>. The verification email will be sent to your real email!</p>
<p>You can use +1, +800 or +dog. This is a gmail feature and might not work for other email providers.</p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct4.jpg"><img title="Register-US-acct-4" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="423" alt="Register-US-acct-4" src="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct4_thumb.jpg" width="644" border="0" /></a> </p>
<p>Click Continue.</p>
<p>In the next screen, select None for Credit Card (if you have not follow the first step, you will not see None option). Many of the fields are required and will be validated eg. 7-digit number. You could enter some bogus US address. One way is to go to maps.google.com and search for Starbucks in US.</p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct3.jpg"><img title="Register-US-acct-3" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="484" alt="Register-US-acct-3" src="http://just2us.com/site/wp-content/uploads/2010/02/RegisterUSacct3_thumb.jpg" width="556" border="0" /></a></p>
<p>&#160;</p>
<p>Click Continue.</p>
<p>Almost done. iTunes will send you an email for verification. It will be sent to your real email eg. <a href="mailto:jason.bourne@gmail.com">jason.bourne@gmail.com</a>. </p>
<p>Click on the verification link, login and you are done!</p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/how-to-register-us-itunes-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to redeem promo code</title>
		<link>http://just2us.com/2010/02/how-to-redeem-promo-code/</link>
		<comments>http://just2us.com/2010/02/how-to-redeem-promo-code/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 13:25:25 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/how-to-redeem-promo-code/</guid>
		<description><![CDATA[To use promo code from iTunes, go to Home &#62; Redeem (under Quick Links) &#62; enter the promo code.
 

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-redeem-promo-code%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-redeem-promo-code%2F" height="61" width="51" /></a></div><p>To use promo code from iTunes, go to <strong>Home</strong> &gt; <strong>Redeem</strong> (under Quick Links) &gt; <strong>enter the promo code</strong>.</p>
<p align="center"><a href="http://just2us.com/site/wp-content/uploads/2010/02/Redeem1.jpg"><img title="Redeem1" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="373" alt="Redeem1" src="http://just2us.com/site/wp-content/uploads/2010/02/Redeem1_thumb.jpg" width="644" border="0" /></a> </p>
<p align="center"><a href="http://just2us.com/site/wp-content/uploads/2010/02/Redeem2.png"><img title="Redeem2" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="256" alt="Redeem2" src="http://just2us.com/site/wp-content/uploads/2010/02/Redeem2_thumb.png" width="644" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/how-to-redeem-promo-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to prompt user to review your iPhone app</title>
		<link>http://just2us.com/2010/02/how-to-prompt-user-to-review-your-iphone-app/</link>
		<comments>http://just2us.com/2010/02/how-to-prompt-user-to-review-your-iphone-app/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 10:30:26 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/how-to-prompt-user-to-review-your-iphone-app/</guid>
		<description><![CDATA[Apple’s app review is flawed – when users delete an app, it ask to rate. But if users like an app, it does not ask to rate. That is bias.
If a user did not delete your app, it should not be a worthless app and should have a positive review. As a developer, we should [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-prompt-user-to-review-your-iphone-app%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-prompt-user-to-review-your-iphone-app%2F" height="61" width="51" /></a></div><p>Apple’s app review is flawed – when users delete an app, it ask to rate. But if users like an app, it <em>does not </em>ask to rate. That is bias.</p>
<p>If a user did not delete your app, it should not be a worthless app and should have a positive review. As a developer, we should prompt users to rate and comment an app after using it a number of times. </p>
<p><a href="http://txeet.com"><img title="rate txeet" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="484" alt="rate txeet" src="http://just2us.com/site/wp-content/uploads/2010/02/ratetxeet.png" width="324" border="0" /></a></p>
<p>&#160;</p>
<p> <span id="more-283"></span>
<p>What we can do is to detect that the app has started a number of times, and show a polite prompt to the user to ask him to rate the app. If user choose to rate the app, he will be redirected to App Store to rate and comment.</p>
<p>I am not directly providing the code to do that, as Arashpayan has done that excellently.</p>
<p>Arashpayan has written <a href="http://arashpayan.com/blog/index.php/2009/09/07/presenting-appirater/">Appirater</a> (read as Appi-rater). The code he provided at <a title="http://github.com/arashpayan/appirater/" href="http://github.com/arashpayan/appirater/">http://github.com/arashpayan/appirater/</a> works like a charm for <a href="http://txeet.com">txeet</a>.</p>
</p>
<p align="center"><a href="http://txeet.com">&#160;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/how-to-prompt-user-to-review-your-iphone-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to read iPhone crash log?</title>
		<link>http://just2us.com/2010/02/how-to-read-iphone-crash-log/</link>
		<comments>http://just2us.com/2010/02/how-to-read-iphone-crash-log/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 14:08:50 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/how-to-read-iphone-crash-log/</guid>
		<description><![CDATA[Many times, application crashes, and a developer will have no idea what is the cause (if he knows, it would not have happened).
I am not providing the how-to here, instead I am referring to anoshkin’s blog post.
One valuable lesson I learnt: Always keep the dSYM for each version released
I did not know that I should [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-read-iphone-crash-log%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fhow-to-read-iphone-crash-log%2F" height="61" width="51" /></a></div><p>Many times, application crashes, and a developer will have no idea what is the cause (<em>if he knows, it would not have happened</em>).</p>
<p>I am not providing the how-to here, instead I am referring to <a href="http://www.anoshkin.net/blog/2008/09/09/iphone-crash-logs/">anoshkin’s blog post</a>.</p>
<p>One valuable lesson I learnt: <strong>Always keep the dSYM for each version released</strong></p>
<p>I did not know that I should keep the dSYM, and when I need it, I don’t have it.. Bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/how-to-read-iphone-crash-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Signs that App Store is getting crowded</title>
		<link>http://just2us.com/2010/02/sign-that-app-store-is-getting-crowded/</link>
		<comments>http://just2us.com/2010/02/sign-that-app-store-is-getting-crowded/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:39:49 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[market]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/sign-that-app-store-is-getting-crowded/</guid>
		<description><![CDATA[txeet was released on 9 Feb 2010. 
Shortly after releasing, I checked on App Store ranking and my analytic data, and I see signs that Apple’s App Store is getting too crowded.
&#160;
 
Sign 1 – Apps cluttered in the categories, especially in Lifestyle
In just a single day, there are 18 lifestyle apps released. These apps [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fsign-that-app-store-is-getting-crowded%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fsign-that-app-store-is-getting-crowded%2F" height="61" width="51" /></a></div><p><a href="http://txeet.com">txeet</a> was released on 9 Feb 2010. </p>
<p>Shortly after releasing, I checked on App Store ranking and my analytic data, and I see signs that Apple’s App Store is getting too crowded.</p>
<p>&#160;</p>
<p> <span id="more-273"></span><br />
<h2>Sign 1 – Apps cluttered in the categories, especially in Lifestyle</h2>
<p>In just a single day, there are <strong>18 lifestyle apps</strong> released. These apps are ordered in alphabetical order, therefore txeet is placed quite behind, in fact it is in page 2. </p>
<p>To have a newly released app in page 2 is a big disappointment. One year ago, it could take 3 days before a new app gets pushed to page 2. Those were the days..</p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/lifestylerelease1.jpg"><img title="lifestyle-release1" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="688" alt="lifestyle-release1" src="http://just2us.com/site/wp-content/uploads/2010/02/lifestylerelease1_thumb.jpg" width="360" border="0" /></a></p>
<p>Note that page 1 has 5 charm apps (similar apps with combination of color and types…). The developer probably gonna release another 100+ apps as there are so many colors..</p>
<p><img title="lifestyle-release2" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="697" alt="lifestyle-release2" src="http://just2us.com/site/wp-content/uploads/2010/02/lifestylerelease2_thumb.jpg" width="360" border="0" /> </p>
</p>
<p>Page 2 has quite a lot of Girls apps, the latest trend. On first look, txeet looks bright and very out of place.</p>
<p>&#160;</p>
<p>&#160;</p>
<h2>Sign 2 – Analytics show that Android has more users</h2>
<p>I used Flurry analytics to analyze the <strong>number of new users </strong>for the first few days of launch.</p>
<p>Android was released on Oct 18th, and the first day it gathered <strong>620 new users</strong>.</p>
<h2><a href="http://just2us.com/site/wp-content/uploads/2010/02/txeetandroid.png"><img title="txeet android" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="194" alt="txeet android" src="http://just2us.com/site/wp-content/uploads/2010/02/txeetandroid_thumb.png" width="659" border="0" /></a></h2>
<p>&#160;</p>
<p>iPhone was released on Feb 9th, and the first full day it gathered <strong>147 new users</strong>. </p>
</p>
<h2><a href="http://just2us.com/site/wp-content/uploads/2010/02/txeetiphone.png"><img title="txeet iphone" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="197" alt="txeet iphone" src="http://just2us.com/site/wp-content/uploads/2010/02/txeetiphone_thumb.png" width="659" border="0" /></a> </h2>
<p>This post will be updated when I have updated data.</p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/sign-that-app-store-is-getting-crowded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>txeet is now available for iPhone</title>
		<link>http://just2us.com/2010/02/txeet-is-now-available-for-iphone/</link>
		<comments>http://just2us.com/2010/02/txeet-is-now-available-for-iphone/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 03:01:47 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/txeet-is-now-available-for-iphone/</guid>
		<description><![CDATA[txeet has been approved by Apple and can now be downloaded from App Store!

]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Ftxeet-is-now-available-for-iphone%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Ftxeet-is-now-available-for-iphone%2F" height="61" width="51" /></a></div><p><a href="http://txeet.com">txeet</a> has been approved by Apple and can now be <a href="http://itunes.apple.com/us/app/txeet-sms-templates/id353425053?mt=8">downloaded from App Store</a>!</p>
<p align="center"><a href="http://txeet.com/download/"><img title="" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="620" alt="" src="http://just2us.com/site/wp-content/uploads/2010/02/iphonescreen.png" width="320" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/txeet-is-now-available-for-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitfalls of NSFetchedResultsController</title>
		<link>http://just2us.com/2010/02/pitfalls-of-nsfetchedresultscontroller/</link>
		<comments>http://just2us.com/2010/02/pitfalls-of-nsfetchedresultscontroller/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 14:06:59 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CoreData]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/pitfalls-of-nsfetchedresultscontroller/</guid>
		<description><![CDATA[I have recently used one of the most useful framework in iPhone 3.0 – CoreData. 
There are many guides on using CoreData, such as from cocoadevcentral or Apple’s guide. But what I found lacking is that there was no discussion on the pitfalls of using CoreData, or its view controller, NSFetchedResultsController.
I learnt the pitfalls along [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fpitfalls-of-nsfetchedresultscontroller%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fpitfalls-of-nsfetchedresultscontroller%2F" height="61" width="51" /></a></div><p>I have recently used one of the most useful framework in iPhone 3.0 – CoreData. </p>
<p>There are many guides on using CoreData, such as from <a href="http://cocoadevcentral.com/articles/000086.php">cocoadevcentral</a> or <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreData/Articles/cdBasics.html#//apple_ref/doc/uid/TP40001650-TP1">Apple’s guide</a>. But what I found lacking is that there was no discussion on the pitfalls of using CoreData, or its view controller, <a href="http://developer.apple.com/iphone/library/documentation/CoreData/Reference/NSFetchedResultsController_Class/Reference/Reference.html">NSFetchedResultsController</a>.</p>
<p>I learnt the pitfalls along the way, and there are 3 particular pitfalls that I would like to share with developers while developing <a href="http://txeet.com">txeet</a> for iPhone.</p>
<p>&#160;</p>
<h2>1. Performance hit with predicate using one-to-many relationship</h2>
<p>When using NSFetchedResultsController, we would often form our predicate (like SQL) to retrieve some table rows. </p>
<p>If you were to use a predicate that involves transversing a one-to-many relationship, the performance could be slowed down <a href="http://stackoverflow.com/questions/1145178/core-data-fetching-objects-that-are-in-relationship-to-another-object">tremendously</a> (as slow as 30 sec to run, or even crash!). Take for example a <strong>Template</strong> model that has a one-to-many relationship <strong>tags</strong> to <strong>Tag</strong> model:</p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/coredatapitfallcode1.jpg"><img title="coredata pitfall code1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="40" alt="coredata pitfall code1" src="http://just2us.com/site/wp-content/uploads/2010/02/coredatapitfallcode1_thumb.jpg" width="624" border="0" /></a>&#160; </p>
<p>The predicate above would require transversing to each Tag to find ‘love’. This is computationally <em>very expensive</em>. </p>
<p>The solution to this is to avoid transversing relationship. A faster way that CoreData could execute is to access the properties/attributes. For the above example, what I did is to add another attribute <strong>tagsAsAttribute</strong> to <strong>Template</strong> model. This property would store the tag names in a delimited format such as “;love;jokes;quotes;”. The predicate would then be changed to:</p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/coredatapitfallcode2.jpg"><img title="coredata pitfall code2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="31" alt="coredata pitfall code2" src="http://just2us.com/site/wp-content/uploads/2010/02/coredatapitfallcode2_thumb.jpg" width="679" border="0" /></a> </p>
<p>Note: This is not the best way to design the data model, as <strong>tagsAsAttribute</strong> has a dependency and is redundant.</p>
<p>&#160;</p>
<h2>2. User-driven updates</h2>
<p>If you read the <a href="http://developer.apple.com/iphone/library/documentation/CoreData/Reference/NSFetchedResultsControllerDelegate_Protocol/Reference/Reference.html">Apple’s guide to NSFetchedResultsControllerDelegate</a>, please note of the section User-Driven Updates.</p>
<p>In short, if you have user-driven updates, you should write the following as the first line in every (only one is shown below) of the NSFetchedResultsControllerDelegate delegate methods:</p>
<p><a href="http://just2us.com/site/wp-content/uploads/2010/02/coredatapitfallcode3.jpg"><img title="coredata pitfall code3" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="37" alt="coredata pitfall code3" src="http://just2us.com/site/wp-content/uploads/2010/02/coredatapitfallcode3_thumb.jpg" width="557" border="0" /></a> </p>
<p>And when there is a user-driven update, set the <strong>isStillUpdating</strong> boolean to true, and set false when the update is completed.</p>
<p>User-driven updates could be re-ordering of table rows, or inserting of objects.</p>
<p>&#160;</p>
<h2>3. abort() should NEVER be used in release</h2>
<p>If you have used the sample code for CodeData, there is a line of code which is there only for testing environment. In the comments, it warned developers that <strong>abort()</strong> should not be used in shipping application..</p>
<p>But I didn’t read the comments..</p>
<p>Apparently, certain devices will occasionally have error when running certain CoreData methods. Eg. NSManagedObjectContext’s save. When there is an error, we could optionally handle the error, but we should NEVER abort and exit the app.</p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/pitfalls-of-nsfetchedresultscontroller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SG 4D has added 20 years of 4D results!</title>
		<link>http://just2us.com/2010/02/sg-4d-has-added-20-years-of-4d-results/</link>
		<comments>http://just2us.com/2010/02/sg-4d-has-added-20-years-of-4d-results/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 11:37:41 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[SG 4D]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/sg-4d-has-added-20-years-of-4d-results/</guid>
		<description><![CDATA[SG 4D (mobile website) has added many more years of past 4D results!
Previously, the system has only results since Nov 2006, but now it has since May 1986! The mobile website has also added a date field (ddmmyy) for you to search for a draw easily.
If you have SG 4D app on iPhone or Android, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fsg-4d-has-added-20-years-of-4d-results%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fsg-4d-has-added-20-years-of-4d-results%2F" height="61" width="51" /></a></div><p align="left"><a href="http://sg4d.just2us.com/">SG 4D (mobile website)</a> has added many more years of past 4D results!</p>
<p align="left">Previously, the system has only results since Nov 2006, but now it has since May 1986! The mobile website has also added a date field (ddmmyy) for you to search for a draw easily.</p>
<p align="left">If you have SG 4D app on <a href="http://just2us.com/2009/05/sg-4d/">iPhone</a> or <a href="http://just2us.com/2009/11/sg-4d-now-on-android/">Android</a>, please wait for the next release that exploit the 20 years more of 4D numbers <img src='http://just2us.com/site/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p align="center"><a href="http://sgresult.just2us.com/4d/?date=010186&amp;=Get+Draw"><img title="first draw" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="469" alt="first draw" src="http://just2us.com/site/wp-content/uploads/2010/02/firstdraw1.jpg" width="326" border="0" /></a></p>
<p><a href="http://en.wikipedia.org/wiki/4-Digits"><em>Did you know?</em></a></p>
<p><em>Singapore Pools 4D betting was computerised on <a href="http://en.wikipedia.org/wiki/4-Digits">31 May 1986</a>, and it got off an auspicious start with the first prize number coming out as 8838 (“8” is auspicious for chinese).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/sg-4d-has-added-20-years-of-4d-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad keynote in 180 sec</title>
		<link>http://just2us.com/2010/02/ipad-keynote-in-180-sec/</link>
		<comments>http://just2us.com/2010/02/ipad-keynote-in-180-sec/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:05:53 +0000</pubDate>
		<dc:creator>samwize</dc:creator>
				<category><![CDATA[Interesting]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Apple iPad]]></category>

		<guid isPermaLink="false">http://just2us.com/2010/02/ipad-keynote-in-180-sec/</guid>
		<description><![CDATA[Spare yourself watching the 1 hr long iPad keynote.
This is better, and it shows that if we repeat the same thing over and over in a presentation, the audience will bound to believe..



]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fipad-keynote-in-180-sec%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjust2us.com%2F2010%2F02%2Fipad-keynote-in-180-sec%2F" height="61" width="51" /></a></div><p>Spare yourself watching the <a href="http://events.apple.com.edgesuite.net/1001q3f8hhr/event/index.html">1 hr long iPad keynote</a>.</p>
<p>This is better, and it shows that if we repeat the same thing over and over in a presentation, the audience will bound to believe..</p>
<div class="wlWriterEditableSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:8b132ae9-55a4-4905-ade7-8500ff6217f2" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/1ZS8HqOGTbA&amp;hl=en"></param><embed src="http://www.youtube.com/v/1ZS8HqOGTbA&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://just2us.com/2010/02/ipad-keynote-in-180-sec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
