{ by david linsin }

May 10, 2010

Don't Forget your Linker Flags

Last year, I worked on a Nine Men's Morris (Mühle) implementation for Android, called Doublemill. Since I'm an iPhone user, I decided to port the game to iPhone/iPod touch and the iPad. There are 3 versions: Doublemill Premium, Doublemill Lite and Doublemill for iPad.

Doublemill is out the door and available for download in the App Store - finally! It has been more than two weeks since my submission. The reason why it took so long, besides Apple, which takes up to a week at the moment to review Apps, is my stupidity!

I'm using Objective-C bindings for YAJL to create and parse JSON in Doublemill's multiplayer feature. It comes with a Category for NSString, which basically makes it a two liner to create a JSON representation of a string:



Okay it's not a two liner, but it's close! Anyways, in order to add this library to your project, one way is to download the build and add the static library to your Xcode project. It'll work seamlessly in the Simulator. If you want to deploy it to your iPhone or any iPhone, you need to add linker flags:

Under 'Other Linker Flags' in the Test target, add -ObjC and -all_load (So NSObject+YAJL category is loaded).


This is very common and no big deal actually. If you want to know more about why you need this, check out the Apple Developer Connection.

I added those flags for the my development environment and also for my beta testers. However, I totally missed this in my Xcode AppStore build configuration settings and since you cannot really test your final build, it went in review without those linker flags.

The reviewer at Apple found the bug, which even resulted in a crash of Doublemill. I'm grateful they found it, however I'm not really happy, that I had to wait another week to get Doublemill out the door. In the end it was my mistake and I'm sure in the future, I'll make sure to have those build profiles setup more carefully.

0 comments:


com_channels

  • mail(dlinsin@gmail.com)
  • jabber(dlinsin@gmail.com)
  • skype(dlinsin)

recent_postings

loading...