[TIMOB-28303] Xcode 12.3: Unable to build an app with modules that include third-party SDKs
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Unresolved |
Affected Version/s | Release 9.3.0 |
Fix Version/s | Release 9.3.1 |
Components | n/a |
Labels | ios, xcode |
Reporter | Michael Gangolf |
Assignee | Vijay Singh |
Created | 2020-12-19T12:41:54.000+0000 |
Updated | 2021-01-05T14:43:59.000+0000 |
Description
I'm filing this ticket since multiple people on Slack are reporting build errors with the latest Xcode 12.3:
https://ti-slack.slack.com/archives/C03CVQX2A/p1608033847217400
https://ti-slack.slack.com/archives/C03CVQX2A/p1608193731266100
The error is:
error: Building for iOS Simulator, but the linked and embedded framework 'SDWebImage.framework' was built for iOS + iOS Simulator
or
Modules
Ti.Animation
[TRACE] error: Building for iOS Simulator, but the linked and embedded framework 'Lottie.framework' was built for iOS + iOS Simulator. (in target 'app' from project 'app')
AV.ImageView
[TRACE] error: Building for iOS Simulator, but the linked and embedded framework 'SDWebImage.framework' was built for iOS + iOS Simulator. (in target 'app' from project 'app'
According to Stackoverflow https://stackoverflow.com/a/65306886/5193915 you have to set: Validate Workspace to Yes
Another solutions would be removing archiitectures from the modules
simulator
lipo -info Lottie.framework/Lottie
lipo -remove armv7 Lottie.framework/Lottie -output Lottie.framework/Lottie
lipo -remove arm64 Lottie.framework/Lottie -output Lottie.framework/Lottie
device:
lipo -info Lottie.framework/Lottie
lipo -remove i386 Lottie.framework/Lottie -output Lottie.framework/Lottie
lipo -remove x86_64 Lottie.framework/Lottie -output Lottie.framework/Lottie
A downgrade to Xcode 12.2 is the best solution at the moment
PR: https://github.com/appcelerator/titanium_mobile/pull/12354 *tl;dr:* For all users that cannot wait for this to be released: Just copy the file from the PR to
~/Library/Application Support/Titanium/mobilesdk/osx/YOUR_SDK_VERSION/iphone/iphone/Titanium.xcodeproj/project.pbxproj
. Note 1: The title of this ticket should be renamed to "Unable to build an app with modules that include third-party SDKs", since apps without external SDKs will not have this issue. Also, if the third-party SDK is already built as an .xcframework (thats what Apple tries to push with this new error/warning), the app will not have any issues. So once all modules are updated to use .xcframework versions of their external SDK's, we'll not need this build setting anymore. Note that modules themselves already compile to a .xcframework since SDK 9.2.0 (which is REALLY great), so this only affects third-party vendors. Note 2: The description mentions "Xcode 13.2", which is probably a typo, because it's 12.3 like in the title.Thanks! Fixed the title + description
This is a massive breaking change for many users -- PLEASE get this PR approved and committed and a back port for 9.3.0.GA and 9.2.2.GA or 9.3.1.GA and 9.2.3.GA -- Hans has kindly posted a quick fix in slack but this is a big blow to anyone whose Xcode has updated automatically.
FR Passed. Waiting for Jenkins build.
Merged to master for 10.0.0 target, backports merged to 9_2_X and 9_3_X branches (for potential 9.3.1 release).