question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New React Native project won't build on Xcode 13.

See original GitHub issue

Description

Running a new React Native project on Xcode 13 beta throws the following error:

ld: warning: Could not find or use auto-linked library 'swift_Concurrency'
ld: warning: Could not find or use auto-linked library 'swiftFileProvider'
Undefined symbols for architecture x86_64:
  "__swift_FORCE_LOAD_$_swiftFileProvider", referenced from:
      __swift_FORCE_LOAD_$_swiftFileProvider_$_YogaKit in libYogaKit.a(YGLayoutExtensions.o)
     (maybe you meant: __swift_FORCE_LOAD_$_swiftFileProvider_$_YogaKit)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

/Users/admin/testpro/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'Flipper-Glog' from project 'Pods')
/Users/admin/testpro/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'Flipper-PeerTalk' from project 'Pods')
/Users/admin/testpro/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'YogaKit' from project 'Pods')
/Users/admin/testpro/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'boost-for-react-native' from project 'Pods')
/Users/admin/testpro/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'Flipper-DoubleConversion' from project 'Pods')

2021-06-16 14:18:52.665 xcodebuild[28989:583546] [MT] DVTPlugInManager: Required plug-in compatibility UUID 42E1F17B-27B3-4DE8-92A8-DC76BA4F5921 for DVTCoreGlyphs.framework (com.apple.dt.DVTCoreGlyphs) not present
** BUILD FAILED **

The following build commands failed:
        Ld /Users/admin/Library/Developer/Xcode/DerivedData/testpro-bhjbeszkrctxppesyqiyhzyvzilq/Build/Products/Debug-iphonesimulator/testpro.app/testpro normal (in target 'testpro' from project 'testpro')

React Native version:

System:
    OS: macOS 11.4
    CPU: (4) x64 Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
    Memory: 4.20 GB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.3.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 7.15.1 - /usr/local/bin/npm
    Watchman: 2021.06.07.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.0, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.0/13A5154h - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.2 => 0.64.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Initialize a project with npx react-native init testproject.
  2. Run the project with npx react-native run-ios.

Expected Results

I expected the application to build.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:22
  • Comments:29 (6 by maintainers)

github_iconTop GitHub Comments

56reactions
leotmcommented, Jun 20, 2021

Seems related to flipper, disabling it builds successfully for now as a temporary workaround

Podfile

- use_flipper!()
+ # use_flipper!()
pod install

ios/MyApp/AppDelegate.m

+ // #ifdef FB_SONARKIT_ENABLED
+ // #import <FlipperKit/FlipperClient.h>
+ // #import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
+ // #import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
+ // #import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
+ // #import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
+ // #import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

+ // static void InitializeFlipper(UIApplication *application) {
+ //   FlipperClient *client = [FlipperClient sharedClient];
+ //   SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
+ //   [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
+ //   [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
+ //   [client addPlugin:[FlipperKitReactPlugin new]];
+ //   [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
+ //   [client start];
+ // }
+ // #endif

...

+ // #ifdef FB_SONARKIT_ENABLED
+ //   InitializeFlipper(application);
+ // #endif

I’ve raised the issue here: https://github.com/facebook/flipper/issues/2477

55reactions
danidaryaweeshcommented, Oct 1, 2021

Doing the following fixed the issue for me in Xcode without disabling Flipper:

  1. Go to Build Settings --> Search for “Search paths” and then add $(SDKROOT)/usr/lib/swift to “Library search paths”
  2. Change “iOS deployment target” in Xcode to 11
  3. Remove pods and build again , then it should work

I’m using RN 0.64.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

ios - XCode 13 Build Error - Could not find or use auto-linked ...
Following this, your React Native application will build successfully and can now run as per normal on your simulator.
Read more >
Can't build react native app after… | Apple Developer Forums
This error message means the module was pre-compiled or from a vendor using a different Xcode version. In both cases, the correct thing...
Read more >
Troubleshooting - React Native
Open ~/Library/Developer/Xcode/DerivedData . and look for a folder named after your Xcode workspace (“RNTesterPods-AAAA” where “AAAA” is a ...
Read more >
How To Get Your iOS App Into TestFlight and Test It, for Xcode ...
How To Get Your iOS App Into TestFlight and Test It, for Xcode 13 ... With React Native, you're able to build an...
Read more >
[Solved]-Undefined symbol - appsloveworld
... __swift_FORCE_LOAD_$_swiftFileProvider React native on Build Xcode 13 beta. ... Create a only new Swift empty file (it's not necessary to create a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found