From 5f1a8789236ffb086ca736c7ed3b47d4307ad11a Mon Sep 17 00:00:00 2001 From: August Lilleaas Date: Fri, 19 Jun 2020 12:14:02 +0200 Subject: [PATCH] Fix issue with Swift version compatibility 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 --- template/ios/HelloWorld.xcodeproj/project.pbxproj | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/template/ios/HelloWorld.xcodeproj/project.pbxproj b/template/ios/HelloWorld.xcodeproj/project.pbxproj index 0a340e5af348..8ebf71423b63 100644 --- a/template/ios/HelloWorld.xcodeproj/project.pbxproj +++ b/template/ios/HelloWorld.xcodeproj/project.pbxproj @@ -420,11 +420,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; - LIBRARY_SEARCH_PATHS = ( - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -473,11 +468,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; - LIBRARY_SEARCH_PATHS = ( - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES;