Xcode 14.3 breaks linking to precompiled frameworks when compiling for real devices

The precompiled frameworks that we're using in our app aren't found by the linker in Xcode 14.3. It works fine in the simulator, but the app crashes on a real device with a dynamic library loading error.

The problem seems to be that Xcode 14.3 compiles the app so that it somehow looks in a folder called PackageFrameworks. The error messages showing the paths that the app tries are like this:

'/Users/{username}/Library/Developer/Xcode/DerivedData/{appname}/Build/Products/Debug-iphoneos/PackageFrameworks/librocksdb.framework/librocksdb' (errno=2)

Note that the library exists, but not at

Build/Products/Debug-iphoneos/PackageFrameworks/librocksdb.framework/librocksdb

But simply at

Build/Products/Debug-iphoneos/librocksdb.framework/librocksdb

This worked fine in Xcode 14.2. Clearing the whole derived data cache, as well as all of swiftpm's caches, didn't help.

To reproduce, include one of these precompiled frameworks in your code, compile and run your app on a real device:

Xcode 14.3 breaks linking to precompiled frameworks when compiling for real devices
 
 
Q