Framework built on Xcode9 are not working on Xcode8

I get the error message below, when linking a static framework built on Xcode9 beta on Xcode8.

I know FileProvider comes from iOS11, but I do not use it in my framework.

Early I think this is a bug of Xcode9 beta, but today this still happened with Xcode9 GM

framework not found FileProvider for architecture arm64


Have also committed this to the bug reporter.

Accepted Reply

You are right about the "Static Framework" thing. That I mean is my private framework target which build in Mach-O Type "Static Library".


— One possibility is that the deployment target got changed when you converted the framework project for Xcode 9. This might result in an incompatible build product.


Thanks a lot, you led me to the answer.

Though I don't see any build settings difference in diff, but the default behavior of build settings seems to get changed.

I found a workaround for this issue, by setting the framework target build setting CLANG_MODULES_AUTOLINK's value from default YES to NO.

After all, Xcode9 should not link the FileProvider.framework by automatically even I didn't use it.

Replies

It could be a bug or incompatibility, but there are some other subtle problems in your project(s) that may be affecting you.


Incidentally, there is no such thing as a "static framework". A framework is a dynamic library packaged as a bundle. Perhaps you mean a private framework (a framework embedded in an app bundle, so not shared between apps, which is very common), or a static library (which is a collection of object files, a "library" in the Unix sense, not in the Apple sense).


— One possibility is that the deployment target got changed when you converted the framework project for Xcode 9. This might result in an incompatible build product.


— Another possibility is that your are not producing the framework using Archive (from the Product menu), but are trying to use the build product from a Build or Run operation. The difference is that Build might not build all of the CPU architectures that a finished (Archive'd) framework needs — the variant for "arm64" might actually be missing.

You are right about the "Static Framework" thing. That I mean is my private framework target which build in Mach-O Type "Static Library".


— One possibility is that the deployment target got changed when you converted the framework project for Xcode 9. This might result in an incompatible build product.


Thanks a lot, you led me to the answer.

Though I don't see any build settings difference in diff, but the default behavior of build settings seems to get changed.

I found a workaround for this issue, by setting the framework target build setting CLANG_MODULES_AUTOLINK's value from default YES to NO.

After all, Xcode9 should not link the FileProvider.framework by automatically even I didn't use it.

Xcode code signing default dyn lib search path expects frameworks to be in Frameworks subdirectory of app bundle. I would keep it simple and move other. Framework up two directory levels. Your framework will find it and the app won’t just load it because it is in that directory if the app is only linked to your framework. I hit a problem in which one framework of two didn’t get signed correctly because of a multiple certificates on machine some were expired and the build of that one framework was incorrect while the other frameworks , Dynamic libraries and application binary we’re signed orrectly. Jenkins server rebooted to an old image. You can add a post build script to check signing and entitlements of the app tree. Deep code signing does usually help. Good luck David