Description
Target Integrity Error: Building for iOS Simulator, but the linked and embedded framework 'CouchbaseLiteSwift.framework' was built for iOS + iOS Simulator.
This started showing up after taking Xcode update. This means that we should start delivering XCFramework from now on. Or else as a workaround, users should strip out the unnecessary arch from the fat binary.
Workaround:
Go to the folder containing the framework and then do the below thinning.
// for simulator
|
lipo CouchbaseLiteSwift.framework/CouchbaseLiteSwift -thin x86_64 -output CouchbaseLiteSwift.framework/CouchbaseLiteSwift
|
|
// for device
|
lipo CouchbaseLiteSwift.framework/CouchbaseLiteSwift -thin arm64 -output CouchbaseLiteSwift.framework/CouchbaseLiteSwift
|
Apple suggestion:
If this is your library but you have a specific reason for it to be pre-compiled, please build it as an XCFramework. XCFrameworks correctly separate out binaries that have the right architectures for the different platforms you target.
Forums post:
https://developer.apple.com/forums/thread/130684
https://developer.apple.com/forums/thread/128797