Author Archive

iPhone localization

Quick way to find current language .

NSString   *language = [[NSLocale currentLocale] objectForKey: NSLocaleLanguageCode];
NSString   *countryCode = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode];

Got it from Stackoverflow Putting it here for reference.

Restore to production iPhone software image

Downloaded and installed ios4.1 beta about 2 weeks ago.  Tried it out with the beta Xcode.  Sad to find out this wreck my testing and deployment for production code.

Did a search and found ways to restore iPhone to another image.  Followed the instructions and reset my deployment target to ios4.0.2.  Everything works out except for my iPhone backups and settings.  Need to sort out that but it’s minor.

http://www.demonoid.com/files/details/2271749/009063673263/

http://www.iclarified.com/entry/index.php?enid=750

Thanks to the good guys at iClarified who maintained the list of previous iPhone firmware file.

using iOS4 with iPhone 3G

no multi-tasking! also heard that iOS4 takes up lots of memory. no wonder, my app is facing problem. really need to optimize the app in terms of memory access and usage.

update to iOS4 and latest xcode

just did a massive update to the xcode, itunes and iphone to the latest.

first thought is slow for mapkit rendering.

second is that compiling is much tighter now.  what used to work for iPhone OS 3.13  doesn’t work for iOS4 for some cases, especially the memory intensive stuff for some Coredata calls that I made earlier.  Need to optimize or remove some of the fetch.  Seems like iOS4 is quite adamant on memory.

also, need to rework some of the google docs code that import into coredata.

was able to import earlier, not was busted.

did like the compiler and some enhance debugging tools in xcode.

looks like got lots to clean up and debug for version iOS4

Google Maps will be with iPhone / iPad for long time

As quoted by Steve Jobs in recent All Things D Conference near Los Angeles, “The iPhone would continue to have Google Maps”

Therefore, good to continue using Google Maps API with iPhone’s Mapkit.

Integrate Google Maps API into an iPhone app

Found some very good links and references from StackOverflow.  Will look into it later.

MapKit with iPhone SDK

Just found a great tutorial on using MapKit.  Will try it out later with the application.

Category: MapKit  Leave a Comment

GoggleDocs Spreadsheet headers need no spaces

I have downloaded speadsheets before with GoogleDocs Spreadsheet API, but never with headers that have spaces in between them.

Was assuming that this will work with header titles with no spaces, but was wrong.  Remove the spaces between the title wording and the API continue to work as before.

No sure if this is a bug, but it seem strange that header titles cannot have spaces between words.

Example Headers before, not working
Display Name    E-mail Address

Example Headers after, working
DisplayName    E-mailAddress

for (int count = 0; count < entriesCount; count++) {

entry = [[mEntryFeed entries] objectAtIndex:count];
listEntry = (GDataEntrySpreadsheetList *)entry;
customElements = [listEntry customElementDictionary];
enumerator = [customElements objectEnumerator];

while ((element = [enumerator nextObject]) != nil) {

kName = [element name];
kValue = [element stringValue];
NSLog(@”kName kValue %@”, kName, kValue);

Category: Google Docs  Comments off

First look at iPhone 3.2 SDK

iPhone 3.2 works for both iPad and iPhone platform.  The iPad simulator is damn small within my Macbook display.  Guess it’s part of Apple’s plan to encourage me to get a larger MacBook or a 20″+ display.

Quick look at the SDK shows some new APIs for displaying on iPad.  With the larger screen estate, much more effort on designing the work areas.  Need to read the updated UI guidelines for iPad.

Category: Xcode, iPad  Leave a Comment

iPhone OS 3.2 downloaded & installed

Even though iPhone OS 4.0 beta 3 just release, I myself not in a habit to using beta.  Been using 3.1 for quite some time and getting used to it.

Like the static analyzer and now it compiles faster than before.  Using LLVM GCC4.2 compiler and like it much for the speed.  Shows potential bugs which I need to optimized.