When the API becomes public, can the app still be declined to use it?

A co-worker and I are discussing how Apple treats applications that use a previously closed API. Imagine, if you will [NSAppleObject someMethod]

, which someMethod

was kept private undocumented method in iOS 7.1, but with iOS 8.2 it becomes publicly available. The app supports iOS 7.1.

I want to check for availability someMethod

with respondsToSelector

and, if available, use it. A colleague of mine claims that since this method was private in 7.1 and our application supports 7.1, Apple will not use it, although the API is now open.

As far as anyone can predict what Apple will and will not reject, is my colleague correct?

+3


source to share


1 answer


No, you will not be rejected. Apple simply runs a test in your application to see what APIs it uses. If the API is publicly available for your underlying app SDK, then you're fine. The fact that the public API was now private in your application was not previously used for deployment.

Also, how could Apple tell if your app is only using the public API on devices where the API is actually open.



If Apple has rejected an app to use an API that is public to your underlying SDK but closed to your deployment target, too many apps will be rejected for trying to use updated APIs while still supporting older versions of iOS. This would be a bad decision.

The big problem is that the previously private API would probably have been more complex or worked differently in iOS versions where it was closed. Therefore, the actual problem is that your application does not allow the use of the public API in versions of iOS where it is private, because the older private version may not work in the same way as in newer versions of iOS where it is public.

+7


source







All Articles