How to read iPhone crash log?

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 keep the dSYM, and when I need it, I don’t have it.. Bad.

Signs that App Store is getting crowded

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.

 

Read the rest of this entry »

txeet is now available for iPhone

txeet has been approved by Apple and can now be downloaded from App Store!

Pitfalls of NSFetchedResultsController

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 the way, and there are 3 particular pitfalls that I would like to share with developers while developing txeet for iPhone.

 

1. Performance hit with predicate using one-to-many relationship

When using NSFetchedResultsController, we would often form our predicate (like SQL) to retrieve some table rows.

If you were to use a predicate that involves transversing a one-to-many relationship, the performance could be slowed down tremendously (as slow as 30 sec to run, or even crash!). Take for example a Template model that has a one-to-many relationship tags to Tag model:

coredata pitfall code1 

The predicate above would require transversing to each Tag to find ‘love’. This is computationally very expensive.

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 tagsAsAttribute to Template model. This property would store the tag names in a delimited format such as “;love;jokes;quotes;”. The predicate would then be changed to:

coredata pitfall code2

Note: This is not the best way to design the data model, as tagsAsAttribute has a dependency and is redundant.

 

2. User-driven updates

If you read the Apple’s guide to NSFetchedResultsControllerDelegate, please note of the section User-Driven Updates.

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:

coredata pitfall code3

And when there is a user-driven update, set the isStillUpdating boolean to true, and set false when the update is completed.

User-driven updates could be re-ordering of table rows, or inserting of objects.

 

3. abort() should NEVER be used in release

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 abort() should not be used in shipping application..

But I didn’t read the comments..

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.

SG 4D has added 20 years of 4D results!

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, please wait for the next release that exploit the 20 years more of 4D numbers :)

first draw

Did you know?

Singapore Pools 4D betting was computerised on 31 May 1986, and it got off an auspicious start with the first prize number coming out as 8838 (“8” is auspicious for chinese).

iPad keynote in 180 sec

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..

What are you working on?

Some of you might be wondering – what are you working on? Is there new releases of SG 4D, SG Toto, SG Wireless, or some other new app?

txeet, is what I am currently working on.

In Oct 2009, txeet was first released on Android. Thereafter, I have been working on an iPhone version. This screenshot is a preview:

txeet preview

In Feb 2010, the first version for iPhone should be released. I’ll pray hard, to Apple for its release..

SG 4D – Mobile website for all phones

This is a little secret. I have created a mobile website for 4D results at http://sg4d.just2us.com/

There is nothing special about it, other than that it was built with Google’s App Engine. Running on Google’s infrastructure and servers has its bonuses – Google ensures stability, performance and scalability.

sgresult 4d

Hey AppVault! You copied my Broken Apple graphics!

Late last night, we found out that AppVault has added a all-too-familiar-looking Broken Apple to their website – because AppBox complained that AppVault was too similar and infringed on their copyright. Here is the original website from AppVault:

AppVault copyrighted broken

But if you go to the website now, you would see the below instead. Spot the differences?

AppVault without broken apple

Hmmm.. they took away MY BROKEN APPLE graphics! I am fine with you infringing my copyright, just give me due credits, can?

AppVault comment

@AppVault, can you not silently drop my case? You don’t just remove an infringed material from your App Store blog just because you can :p

SG 4D is no longer in Top 100

SG 4D was first released in Oct 2008. Since the first day it was released, it has been in the Top 100 free apps (in Singapore App Store).

But in Jan 2010, SG Live 4D was released. This 4D app is developed by another company (not by me). It is the fastest and coolest (reading the numbers in Hokkien?) 4D app in the app store. And therefore, it kicked out SG 4D from its throne :(

 
The new 4D app by Live4D

Ah.. but that is how the consumer market works.

When there is a better product, users will eventually flock to it. Even better if it is free. Take the case of Google’s free vs Nokia’s paid on the mobile. Nokia is taking action only because of tough competition. If there isn’t any competition, Nokia would continue to charge $$ to users. There is no reason not to earn..

Back to SG 4D. I am sure end-users will get better app when there are more choices. No doubt.