-
Notifications
You must be signed in to change notification settings - Fork 371
Properly support pods with static library and Swift Framework #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Change the default value of "Link Framework statically" in iOS Resolver settings to TRUE since it is very likely that some pod frameworks includes pre-built static libraries, and can cause unexpected crash in runtime if the app is build with with multiple targets (Unity 2019.3+).
The Xcode project generate from Unity may not be able to link Swift Standard Libaries properly if 1. Some pods include Swift frameworks 2. Podfile sets to link frameworks statically The workround attempts to fix this by 1. Add a Dummy.swift file to the Xcode project. 2. Enable `CLANG_ENABLE_MODULES` and `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build settings. 3. Change `SWIFT_VERSION` to the value specified in iOS Resolver settings. Default to "5". This workaround is turned OFF by default.
Test with Analytics testapp, FirebaseAnalytics 8.8.0 (.unitypackage. This depends on a pod containing static library) and Facebook Unity SDK (this depends on a pod containing Swift Framework). and Xcode Due to that Facebook SDK always append Verified in the following Unity versions
|
The Xcode project generate from Unity may not be able to link Swift Standard Libaries properly if 1. Some pods include Swift frameworks 2. Podfile sets to link frameworks statically The workround attempts to fix this by 1. Add a Dummy.swift file to the Xcode project. 2. Enable `CLANG_ENABLE_MODULES` and `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build settings. 3. Change `SWIFT_VERSION` to the value specified in iOS Resolver settings. Default to "5". This workaround is turned OFF by default.
Uh oh!
There was an error while loading. Please reload this page.
For more context b/196153528
A couple of changes:
Link Framework Statically
setting default value totrue
Link Framework Statically
istrue
. This workaround is turnedOFF
by default. It basically does the followinga. Add a
dummy.swift
file to Xcode projectb. Set
SWIFT_VERSION
build property. If Xcode project has multiple targets (generated by Unity 2019.3+), then also enableCLANG_ENABLE_MODULES
andALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES