7

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.

Leo
  • 10,407
  • 3
  • 45
  • 62

3 Answers3

12

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

Leo
  • 10,407
  • 3
  • 45
  • 62
11

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

samridhgupta
  • 1,695
  • 1
  • 18
  • 34
0

This was already fixed in this commit. I implemented the 2 minor changes manually and it worked for me: https://github.com/facebook/react-native/commit/eb938863063f5535735af2be4e706f70647e5b90

CatalinBerta
  • 1,604
  • 20
  • 20