Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ios: Fix a build failure with Xcode 13
Done with Xcode Version 13.0 (13A233). I got two errors while trying to build: Undefined symbol: __swift_FORCE_LOAD_$_swiftDataDetection Undefined symbol: __swift_FORCE_LOAD_$_swiftFileProvider The root cause is reportedly [1] a bug in Xcode. The line with `swift-5.0` in LIBRARY_SEARCH_PATHS, removed in this commit, leads to a "Mach-O universal binary" that mistakenly omits the arm64 architecture, which reportedly causes this compilation failure. facebook/react-native@a1c445a39, as yet unreleased, removes that line from LIBRARY_SEARCH_PATHS in the template app. [2] The other interesting line in LIBRARY_SEARCH_PATHS, the one with just `swift`, doesn't have that bug. But we go ahead and remove all of LIBRARY_SEARCH_PATHS, just because that commit says it wants to. They say they don't do that because it's supposedly not possible without also upgrading to CocoaPods v1.11, which has CocoaPods/CocoaPods@6985cbf7d. While RN figures out whether they can or should require a minimum CocoaPods version, I notice that we seem to have no trouble upgrading CocoaPods ourselves, so we might as well. [1] facebook/react-native#31480 [2] It also (with facebook/react-native@51bf55794) marks a `react-native` script named __apply_Xcode_12_5_M1_post_install_workaround, from facebook/react-native@ac4ddec54, as no longer needed. IOW, you don't have to call it from your Podfile anymore. But facebook/react-native@ac4ddec54 is also unreleased, so we've never had to worry about calling that script from our Podfile.
- Loading branch information