Skip to content

React Native 0.78 AppDelegate.Swift to AppDelegate.mm Migration #50537

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

Open
ahsanmunyr opened this issue Apr 7, 2025 · 6 comments
Open

React Native 0.78 AppDelegate.Swift to AppDelegate.mm Migration #50537

ahsanmunyr opened this issue Apr 7, 2025 · 6 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Version Info

Comments

@ahsanmunyr
Copy link

Description

Error: Failed to call into JavaScript module method RCTEventEmitter.receiveEvent(). Module has not been registered as callable. Registered callable JavaScript modules (n = 7): AppRegistry, HMRClient, GlobalPerformanceLogger, RCTDeviceEventEmitter, RCTLog, RCTNativeAppEventEmitter, Systrace. Did you forget to call registerCallableModule?, js engine: hermes

Steps to reproduce

AppDelegate.Swift to AppDelegate.mm Migration
Because im using some libraries React Native LottieFy SPlash screen, Clevertap, Push notification IOS and so on, which unable to migrate into swift code, then i delete the swift code and replace with AppDelegate.h and mm file, then i got these issues.

React Native Version

0.78

Affected Platforms

Build - MacOS

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.4
  CPU: (12) arm64 Apple M4 Pro
  Memory: 134.83 MB / 24.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.14.0
    path: /usr/local/bin/node
  Yarn: Not Found
  npm:
    version: 11.2.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2025.03.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13208083
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.2
    wanted: 0.78.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

Error: Failed to call into JavaScript module method RCTEventEmitter.receiveEvent(). Module has not been registered as callable. Registered callable JavaScript modules (n = 7): AppRegistry, HMRClient, GlobalPerformanceLogger, RCTDeviceEventEmitter, RCTLog, RCTNativeAppEventEmitter, Systrace. Did you forget to call `registerCallableModule`?, js engine: hermes

Reproducer

no link

Screenshots and Videos

Image

@react-native-bot
Copy link
Collaborator

Warning

Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 labels Apr 7, 2025
@react-native-bot
Copy link
Collaborator

Warning

Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@riteshshukla04
Copy link
Contributor

#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>

self.initialProps = @{};
self.dependencyProvider=[[RCTAppDependencyProvider alloc] init];

Did you add the above lines in AppDelegate.mm

@devanshsaini11
Copy link
Collaborator

@ahsanmunyr It will be great if you can provide a repro using this Reproducer Template so it can be validated quickly

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. Needs: Version Info
Projects
None yet
Development

No branches or pull requests

4 participants