-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Xcode Build fails upon adding new target #30234
Comments
I encountered the same problem and eventually fixed it myself. There are multiple "Library Search Paths" in the settings, you need to change to setting for your widget target in the "TARGETS" categary, If you change the path setting for the "PROJECT", then those errors displayed. |
Will test and close if solving, thanks |
Resolved, solution is to make the following changes to the WidgetExtension target not project. LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.2/$(PLATFORM_NAME)\"",
"\"$(inherited)\"",
); |
I might be missing it, but it doesn't look my widget target has the LIBRARY_SEARCH_PATHS. I do see two in the settings, but one is for the debug version of the app target, and one is for the release version of the app target. Not sure if I'm doing something wrong when adding the widget to the project. |
yes that works, but just noting that 'targets' don't have a setting of that value, you just gotta do it on the 'Project' level. |
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Upon adding a new target to a fresh react-native app (in my case an iOS 14 Widget). Xcode fails to build the app. With two errors:
Undefined symbol: _swift_getOpaqueTypeConformance
Undefined symbol: _swift_getTypeByMangledNameInContextInMetadataState
The latter error points to #29246. However the suggested fix did not help.
Originally posted by @hengkx in #29246 (comment)
Bumping the Swift version to 5.2 led to 23 further undefined symbol errors mostly of type FORCE_LOAD.. eg:
Undefined symbol: __swift_FORCE_LOAD_$_swiftObjectiveC
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
react-native init myProj
Widget Extension
Expected Results
The app should continue to build normally after adding a new target
Snack, code example, screenshot, or link to a repository:
n/a
The text was updated successfully, but these errors were encountered: