Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native 0.64-65 with XCode 13 build error - could not find auto-linked library swift_Concurrency or swiftFileProvider

enter image description here

Anyone else getting this since upgrading to XCode 13 Beta and macOS 12 Beta (Monterey)?

XCode 12.5 still builds successfully with RN 0.64.2 and 0.65.0-rc.2.

like image 594
Leo Avatar asked Dec 09 '22 23:12

Leo


2 Answers

Update: Fixed in React Native v0.66.0

We believe this fixed it (in main): eb93886


Another similar case here

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

Podfile

...

# use_flipper!()

...
pod install

ios/MyApp/AppDelegate.m

// Disable these parts for Flipper

#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

like image 178
Leo Avatar answered Dec 12 '22 11:12

Leo


Update: This works for XCode Version 13.0 (13A233), too.

For XCode Version 12.0.1 (12A7300),

I just added libswiftWebKit.tbd to

Link Binary with Libraries (from project, Build Phases)

and the build was successful.

See image below: enter image description here

like image 24
samridhgupta Avatar answered Dec 12 '22 12:12

samridhgupta