My recent update of Tube Status unleashed some savage reviews & angry users and I was at a loss to explain why it had all gone horribly wrong for some but not others. Turns out I’d been tripped up by the simple deprecation of static property in the iAds framework…I am now in deprecation purgatory whilst the fixed version is in approval again (update: Apple turned the approval around in less than 24 hours, very impressive!).
iAds was introduced in iOS4 and later updated in iOS4.2, probably for iPad. The property
was introduced in iOS4 then quickly deprecated in 4.2, being replaced by
All very pedestrian and makes perfect sense. I had decided that Tube Status would move to iOS4 for a number of reasons, but because I am not completely evil I also decided the minimum iOS version you could run Tube Status 3.0 on would be iOS4.0. I set the Base SDK = iOS4.2 and the iOS Deployment Target = 4.0.
At some point during development, playing around with the deployment target I discovered ADBannerContentSizeIdentifier320x50 was now a deprecated property.
No worries, quick read of the docs confirmed this and in my case the property to use now is ADBannerContentSizeIdentifierPortrait, find, replace move on to something more interesting. Spot the problem? For users on iOS4.0 & 4.1 I have just introduced a property for them that literally doesn’t exist in the iAds framework they have installed, result is an ugly crash. I must be stupid yes? Maybe, but stupidity aside one is not warned of this potential problem in Xcode, remember my build settings:
Base SDK = iOS4.2
iOS Deployment Target = 4.0
And I have used ADBannerContentSizeIdentifierPortrait (a version 4.2 property). As far as Xcode is concerned it doesn’t seem to evaluate starting properties against your minimum deployment target (irrespective of whether the framework is weak linked or not). No warning is given.
The moral of the story is that had I tested on any 4.0 or 4.1 device I would have discovered the problem well before shipping. 20 other people also tested before release and it flew through Apples approval process as well. Which goes to show how easy something like this can slip through and why testing on the minimum & latest deployment target is a must.