Fix issue with Swift version compatibility#29178
Closed
augustl wants to merge 1 commit intofacebook:mainfrom
Closed
Fix issue with Swift version compatibility#29178augustl wants to merge 1 commit intofacebook:mainfrom
augustl wants to merge 1 commit intofacebook:mainfrom
Conversation
The project file is hardcoded to have Swift 5.0 in LIBRARY_SEARCH_PATHS. With my (admittedly limited) testing, just removing this flag has no effect on the build or runtime of a React Native app. With this flag in place, you can end up with binary incompatibility issues with libraries that are made using Swift 5.1 or newer. See: https://stackoverflow.com/questions/62467663/how-to-fix-ios-xcode-build-error-undefined-symbol-c-nsurlsession-datataskpub/62467664#62467664
Base commit: ff69028 |
Base commit: ff69028 |
Contributor
Author
|
I have no idea why this caused the build to fail with |
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Our app did not build when we added a dependency to our podspec that was built with swift 5.1.
After a lot of back and forth, we found the flag
LIBRARY_SEARCH_PATHS, and also found that simply clearing it out completely made the app build just fine, and did not cause any other issues with the building or running of our app.With the flag in place, we got weird errors such as:
It seems that there are some binary incompatibilities in how Swift 5.1 and newer generates symbols. What used to be NSURLSession.DataTaskPublisher is now URLSession.DataTaskPublisher. We think..
See also: https://stackoverflow.com/questions/62467663/how-to-fix-ios-xcode-build-error-undefined-symbol-c-nsurlsession-datataskpub/62467664#62467664
Changelog
[iOS] [Fixed] - Removed unneedded LIBRARY_SEARCH_PATHS from xcodebuild config
Test Plan
This is not a very testable change. There's an obvious risk of this flag being needed by some projects, even though it worked fine in our project.
So I'm not really able to provide a detailed test plan, unfortunately.