I am writing a dynamic framework used both by an iOS application target and an iOS extension target. The framework is marked with the "allow app extension API only" flag.
The following swift code from the framework will fail to compile:
The Objective-C version, using NS_EXTENSION_UNAVAILABLE will compile:
@available(iOSApplicationExtension, unavailable) should behave like NS_EXTENSION_UNAVAILABLE. Methods or classes marked as available in extensions should be allowed to use APIs not available for extensions.