Archive for the Category »Xcode «

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.

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

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.

Import vcard using GData

Looking into importing vcard using GData.

Likely to be using some sort of contacts and address for a project.  What’s a better way than using an open standard such as vCard as payload.

Have done some code for GData for spreadsheet import and export.  Need to find some examples for this.  Could be a really useful code to have for managing contacts.  Also, will be using ABAddressBook API which is handy with vCard.

vCard is text based.  Simply put the contents of the vcard into one of the spreadsheet cell.  Then import as string and then convert to NSData for use when needed for address.

Also reading other iPhone books from library

Besides the Core Data book, I have also borrowed two other iPhone books for my bedtime reading.

Programming the iPhone User Experience expands on the required Apple HIG.  Good read, especially on parts of iPhone UI that you seldom use.

The iPhone Developer’s Cookbook has lots of sample code that I may use later.  Wish I had this book earlier.  Although a bit outdated, but still great as a reference.

OK and no point buying these books as you can get them from the library when you need them.

Clash of the iPhone & iPad SDKs

It seems like in the haste of installing 3.2 beta, together with the latest 3.1.3 can crash your Xcode build settings.

It is highly recommended that you install beta SDKs in separate folders as compared to the standard /Developer for the released SDKs.  Found this out the hard way, and now all my build codes are default to /Users as compared to the usual /3.1.3 The mixed up is too painful to comprehend. “Ouch” X!

Found some information regarding this at the Apple support. I will try to remove all traces of the beta.  Do comment if you have discover any work around.

Additional info from tuaw  here

Xcode 3.2 and iPhone SDK 3.1 for Mac OS X 10.6 Snow Leopard

Just download the latest iPhone SDK from Apple.  Got some problems in downloading? Try the work around as stated in iMerlion.  Do also try using Safari.  For some unknown reason, Firefox doesn’t work for me.

Tried out the Build & Analyze.  Correctly points out unused references and attempts to decrement reference count not owned.

[fetchRequest setEntity:entity];
[entity release];

Now I need to sort out the beta iPad SDK and current working SDKs.

iPad sdk aka iPhone SDK 3.2 beta

Finally able to download the big beta image from Apple. Installing it and will be trying out the new features of iPad. This will be fun!