IOS extension and limited API

I share the structure between the application and the extension of the action. The structure uses an API that is not available for extensions.

My question is: will the application be rejected if I store API links, such as UIApplication.sharedApplicationwithout actually calling them (setting "Require only API for application extensions - no"), or do I need to completely remove any links from the code (t .e using #ifdef)?

+4
source share
2 answers

Yes, it will be rejected even if it refers to restricted APIs. We are conducting the same process to remove such calls on our system; alternatively, you can have two goals for your framework, one safe for one and one with #ifdef protection.

Apple docs: ( https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html )

If you have a custom infrastructure that contains such APIs, you can safely reference it from your application, but cannot use this code with applications containing extensions. The App Store rejects any application extension that refers to such structures or that otherwise uses inaccessible APIs. "

+3

iOS 9. Apple , API , .

- -

, , #ifdef . , Apple , API ( UUID ).

, , UIKit, , OS X.

-3

All Articles