Friday, 23 May 2014

ExactTarget MobilePush setObjectForKey: object cannot be nil (key: app_version)

Recently I've been integrating the ExactTarget MobilePush SDKs into the Android and iOS code running behind my Cordova/Phonegap app. It hasn't been plain sailing due to documentation that isn't too brilliant, slow comms from the SalesForce team, and technical hurdles that are difficult to find answers to.

One problem was a crash when running my iOS app with the newly-integrated ExactTarget MobilePush iOS SDK. I kept getting this error:

Uncaught exception: *** setObjectForKey: object cannot be nil (key: app_version)

At first I thought this may have arisen because my app was yet to be provisioned by ExactTarget, and it was their code causing the error, and perhaps it might fix itself once I had received notification that I had been provisioned. Finally after a couple of days I received this notice, but alas the error persisted.

After more research I discovered that my app didn't have an Info.plist entry for "Bundle versions string, short" (or CFBundleShortVersionString in the source). Once I added this my error disappeared!

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!