On Xcode 13b5 I get linking against a dylib which is not safe for use in application extensions
warnings for all my dynamically linked Swift packages. I was able to reproduce this with a new project:
- Create a Swift package and set its product type to
dynamic
. - Create a watchOS app or iOS app extension.
- Import and link the Swift package as a local dependency.
- Build the app.
Result:
ld: warning: linking against a dylib which is not safe for use in application extensions: ~/Library/Developer/Xcode/DerivedData/MyApp-gtbdztwxcysffgeyceqelchgacqm/Build/Products/Debug-watchsimulator/PackageFrameworks/MyPackage.framework/MyPackage
The warnings don't appear in Xcode 12. Is this expected behavior or still a bug?