Tag Archives: iphone dev

Objective-C and Invalid UTF-8 Byte Sequences

I found out the following information the hard way. I hope it helps you in some way… Objective-C does not handle invalid UTF-8 byte sequences gracefully. NSString’s UTF8String method will simply return nil if it encounters any invalid chars (which could happen when deserializing a slightly corrupted file from disk, for example). The encoding conversion methods,   …Continue Reading


iOS Untrusted Server Certificate

Had a problem recently with iOS 3.0 where it did not trust my server’s SSL certificate. Newer versions do, so iOS 3.0 must simply not have the root certificates. There are two ways to solve this: one is to blindly accept all certificates. That’s bad – as you lose the identify protection that SSL provides (and   …Continue Reading


Ability to Downgrade iPhones

There are many legitimate reasons to downgrade iPhones. As a user, perhaps you just don’t like the new OS. As a developer, I have a need to test my App on all OS versions my users may reasonably use. I even have a spare iPhone I use just for testing. Alas, Apple only allow the   …Continue Reading


Why there won’t be a GPS Log HD

When you port your App to the iPad, one of the first choices you get is whether to create a separate product, or a fat (i.e. “universal”) binary. It seems that many folks on the App store, including several apps in the GPS/travel space have gone done the separate-product route. Perhaps I understand why they   …Continue Reading


Hardcore iPhone Memory Debugging

NSZombies is great for finding references to deallocated objects (a common crash issue). But it is less useful when trying to debug a crash in autorelease, especially if the object in question is very common. For that, you can enable malloc logging (in the simulator) and really trace where the object in question was allocated.   …Continue Reading


Android Marketplace is Very Limited

I’ve been learning more about Android recently. I like what I see. Seems like cool hardware, some cool Apps, and a good philosophy behind the whole thing (open source OS, “democratic” app approval process). However as far as making money is concerned, I’m really not convinced this is the place to do it. I’m not   …Continue Reading


iPad Simulator crashes if a UIDatePicker is in a UIPopoverController

Just had one of those afternoons, where you waste 2 hours trying to debug some really strange crash in fairly simple code only to find that the API is at fault. I have a UIDatePicker which I present in a (custom) UIAlertView used on the iPhone.   On the iPad it makes sense to use   …Continue Reading


Porting to iPad

Some useful resources for the task: iPad Programming Guide Thanks to Ray Wenderlitch for his excellent iPad porting tutorial Info from Apple on how to configure the universal binary: Follow these steps to build a universal application that will run on both iPad and iPhone: Set the Base SDK build setting (in the Architectures section)   …Continue Reading


Auto resize the Default.png when in a call & tethering

The iPhone can automatically resize the Default.png to take into account the status bar, even when the status bar is double in size. It even crops out a bit in the middle so your top and bottom toolbars still line up! To take advantage of this, make your Default.png 320×460, not 320×480.  Simple :) Thanks   …Continue Reading


Making FBDialog.h Modal

UPDATE: I submitted a patch for this issue to the latest version of the Facebook iOS SDK, and it was recently approved. FBConnect (now Facebook iOS SDK) for iPhone is a cool way to interact your App with Facebook. The FBDialog.h class is also a pretty cool way to display a HTML page to the   …Continue Reading