Fix issue with Swift version compatibility #29178
Closed
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.