iPhone APInsanity: Unity Updates to Avoid Rejections, Compatibility Causing False Positive Dejection
To catch everyone up, Apple is using a new static analysis tool to find and reject apps using private APIs, and in so doing flagged a bunch of them caused by some calls inside the Unity game development engine (and the Three20 framework, perhaps among others). Now 9to5Mac brings word of Unity's latest update:
Unity iPhone 1.5.1 includes improved XCode support and improved AssetBundle support, but more importantly Native APIs (NSGetEnviron and exc_server functions) have been removed to comply with new Apple requirements.
“The main reason for this is to avoid problems with applications breaking when Apple releases new versions of the iPhone OS,” the company explains.
On the flip side, it's possible the same static analysis tool is also generating false positives when it comes to apps using Apple's own recommended backward compatibility guidelines.
According to Apple's Dev Center:
By using “weak linking” in your Xcode project, you can include frameworks you’ll need for the newer features, and check for API availability when your application is running. This technique provides you with the broadest possible audience for your application.
Yet developer Juicy Bits Software speculates that:
we’ve been bitten yet again by the static analysis tool. 3D Camera Lite runs on iPhone OS 3.0 or later, and we check the OS version before calling any of the new 3.1 APIs…
So, basically, Apple's not acknowledging the OS check, and rejecting based on 3.1 APIs being used for apps that run on earlier versions of the iPhone OS that don't include those APIs as public.
If correct, that's certainly "frustrating" as they put it, and yet another sore point Apple will need to address and quickly.
[Thanks to Jordan for the Juicy Bits tip!]