XIB File Internationalization

In a previous post I discussed options for internationalizing iOS apps. In this addendum to that article I’m sharing an amazing discovery that has saved me so much work and time. You can actually take all of the strings out of a XIB file using the ibtool command in the terminal. You then translate the […]

Creating custom gesture recognisers for iOS

A custom gesture recognisers allows you to simplify the job of detecting specific touch patterns on a iPhone or iPad. Although some basic gestures (long tap, double tap, pinching and zooming, and so on) are already available from Apple out of the box, more complex finger movements must be detected by yourselves. By implementing your […]

Objective-C load and initialize

These two static methods of an ObjC class allow you to run initialization logic where you can set up any static state. Both methods are only invoked if implemented and do not need to be declared in the interface of your classes. The differences between them are as follows: In an application, or in a […]

Custom SQLite build and iPad

I have built my own SQLite3 library in order to enable support for full text search for my iDEX app, I compiled and tested on iPhone (iOS 3 and 4) with no problem, but then I switched to the iPad target of the same project under iOS 3.2, where the application would crash as soon […]

Base SDK, Deployment Target, Weak linking and import

With the new release of Xcode for iOS 4, I was disappointed to find out that it’s not possible to select versions of the iPhone SDK prior to 3.2 from the usual build drop-down box. So I decided to take the annoying opportunity to find out more about how to create applications that use a […]

Internationalise your iPhone apps with Xcode

There are only a few simple steps to follow in order to make an iPhone app easily adapt itself to the language and cultural context of the device, and with Xcode you can quickly add the features that make your code internationalised. But let me set the scene first by briefly clarifying what is meant […]

iPhone and memory leaks: two watch-out tips

The time I spent believing that my buffered input stream class had a leak because of two silly mistakes somewhere else could have easily been better employed. So I am happy to share my findings and spare other developers the same frustration. No rocket science here, just two simple anti-patterns.

iPhone/iPad Simulator screenshots

I just found out about a convenient way of taking screenshots from the iPhone Simulator (which, incidentally, is also an iPad Simulator). Just run your application and when you get to the screen you need to save, press Control + Command + C. The ‘screenful’ will be copied to your clipboard. One easy option at […]

Buffered stream reading in Cocoa

Strangely enough, there is no way in the Cocoa or Cocoa Touch frameworks to read a stream of bytes as a sequence of characters line by line. The option of creating a string from a file, with methods such as stringWithContentsOfFile of NSString, and then generating an array of lines with componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet] certainly seems […]