Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppDelegate.mm unable to execute command: Illegal instruction: 4 #41915

Closed
pilarelisii opened this issue Dec 12, 2023 · 2 comments
Closed

AppDelegate.mm unable to execute command: Illegal instruction: 4 #41915

pilarelisii opened this issue Dec 12, 2023 · 2 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available

Comments

@pilarelisii
Copy link

Description

Captura de pantalla 2023-12-12 a la(s) 16 53 30

My AppDelegate.mm:
`#import "AppDelegate.h"
#import <Firebase.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTLinkingManager.h>

@interface UIResponder : RCTAppDelegate
@EnD

@implementation RCTAppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    [FIRApp configure];
    self.moduleName = @"main";

    // 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];
    }

  • (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    {
    #if DEBUG
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"];
    #else
    return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    #endif
    }

// Linking API

  • (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
    }

// Universal Links

  • (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id> * _Nullable))restorationHandler {
    BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
    return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result;
    }

// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries

  • (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
    {
    return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
    }

// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries

  • (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
    {
    return [super application:application didFailToRegisterForRemoteNotificationsWithError:error];
    }

// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries

  • (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
    {
    return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
    }

  • (RCTBridge *)createBridgeWithDelegate:(id)delegate launchOptions:(NSDictionary *)launchOptions {
    }

  • (UIViewController *)createRootViewController {
    }

  • (UIView *)createRootViewWithBridge:(RCTBridge *)bridge moduleName:(NSString *)moduleName initProps:(NSDictionary *)initProps {
    }

  • (BOOL)runtimeSchedulerEnabled {
    }
    @EnD
    `

**I tried **deleting DerivedData and Archives files.

Steps to reproduce

Run on Xcode, almost at the end of it.

React Native Version

0.72.6

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 13.0.1
  CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Memory: 156.54 MB / 16.00 GB
  Shell:
    version: 5.8.1
    path: /bin/zsh
Binaries:
  Node:
    version: 21.1.0
    path: /usr/local/bin/node
  Yarn: Not Found
  npm:
    version: 10.2.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2023.10.23.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10406996
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.20
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.6
    wanted: 0.72.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

.

Reproducer

.

Screenshots and Videos

No response

Copy link

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.72.7. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@github-actions github-actions bot added Newer Patch Available Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Dec 12, 2023
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available
Projects
None yet
Development

No branches or pull requests

2 participants