Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include Swift lib in LIBRARY_SEARCH_PATHS
Summary: changelog: Fix Xcode 13 build error in HelloWorld template Including `usr/lib/swift` fixes error: {F642876047} Reviewed By: p-sun Differential Revision: D30301799 fbshipit-source-id: b93eb51ec5dd929ddc46574fc11bc89934eadeaf
- Loading branch information
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
million thanks!!!!
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great is fixed my problem.
react native : 63
xcode: 13
macos: 11.6
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
guys, in particular @sammy-SC and @mikehardy: this fix to use SDKROOT is not really correct, the actual bug is Apple build of iphonesimulator lacks the
arm64
architecture, see more info at #31480 (comment)I've reported this to Apple, but if more people can do the same or someone have a faster access to Apple SDK guys, please ask this to be fixed.
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sammy-SC, @mikehardy see #31480 (comment), at least with Xcode 13.0 we just don't need these lines at all, being the problem
$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
.Would it be better to just have Podfile to delete the problematic
LIBRARY_SEARCH_PATHS
if Xcode is new enough? I don't have 12.5 or any other to confirm, but will see what I can do to verify.eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix is not working for RN 0.65 Release schema
#32301
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nithinyell that's a separate issue. I'll comment on your issue 32301
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, can confirm that
$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
in LIBRARY_SEARCH_PATH was a problem(Xcode 13, RN 0.66). After removing it my project was finally built successfullyeb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You saved my day. Many thanks! (y)
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a note for those interested, react-native version 0.67.0-rc.0 is already out (and seems to work fine, to me...) without all the path hackery and other workarounds, it has @barbieri's clean solution in there with the sole new requirement that you need to upgrade to cocoapods 1.11.2. However! Moving to 1.11.2 from 1.10.x cocoapods is trivial, it should not have a negative impact. If you are really suffering from build issues on Xcode, 0.67.0, even in it's rc.0 form should be a breath of fresh air.
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This answer helped
Quick Fix
https://stackoverflow.com/a/64071403/2457493
eb93886
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful! This also solved RN 0.64.2 in Xcode 13.2.1.
The alternative blank Swift.file strategy I read elsewhere did not fix it.