Skip to content

IOS: App crashed on start React Native 0.76.2 / expo 52 #30

Description

@hzblj

Hi team,
After upgrading to a new version of React Native (expo), the app won't start.

Got fatal error here

public func devLauncherController(_ developmentClientController: EXDevLauncherController, didStartWithSuccess success: Bool) {
    guard let rctAppDelegate = (UIApplication.shared.delegate as? RCTAppDelegate) else {
      fatalError("The `UIApplication.shared.delegate` is not a `RCTAppDelegate` instance.")
    }
...
}

I found a problem with [WonderPush setupDelegateForApplication:application]; when I commented that this app works normally.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   self.moduleName = @"main";
  [WonderPush setClientId:@"---" secret:@"----"];
  // [WonderPush setupDelegateForApplication:application]; // –> Comment this and the app start
  [WonderPush setupDelegateForUserNotificationCenter];
  
  // You can add your custom initial props in the dictionary below.
  // They will be passed down to the ViewController used by React Native.
  self.initialProps = @{};

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

I also tried this from your documentation use like that and the app never starts only black screen is shown.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   self.moduleName = @"main";
  [WonderPush setClientId:@"---" secret:@"----"];
  [WonderPush setupDelegateForApplication:application];
  [WonderPush setupDelegateForUserNotificationCenter];
  
  // You can add your custom initial props in the dictionary below.
  // They will be passed down to the ViewController used by React Native.
  self.initialProps = @{};

  return YES;
}

I use the latest version of the SDK

"react-native-wonderpush": "2.3.0",
"react-native-wonderpush-fcm": "1.0.9",

ios

deploymentTarget: '15.1',
useFrameworks: 'static',

and still use newArchEnabled: false but gonna need to upgrade very soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions