I am trying to boot up a React Native 0.53.3 app with React 16.2.0 using simulator from Xcode 10.1 on High Sierra.
I previously had some issues that I have since resolved just to get the build to succeed: npm-shrinkwrap.json: Could not install from "node_modules/react-navigation/react-native-tab-view@github:react-navigation/react-native-tab-view
React Native: ":CFBundleIdentifier", Does Not Exist
Now all build succeed even though I continue to get the cfbundleridentifier error:
Check dependencies
** BUILD SUCCEEDED **
Installing build/Build/Products/Debug-iphonesimulator/NFIBEngage.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/NFIBEngage.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Even in Metro Bundler it succeeds:
Metro Bundler ready.
Loading dependency graph, done.
BUNDLE [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.
BUNDLE [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.
DELTA [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.
MAP [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.
So I was wondering why my app when launched in simulator would stay stuck in the splashscreen, that usually only happens when an index.ios.js has failed. So I looked at http://localhost:8081/debugger-ui/ and sure enough I saw the following errors:
Module AppRegistry is not a registered callable module (calling runApplication)
Unhandled JS Exception: Cannot read property 'invocationEventNone' of undefined
Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)
I don't know where its getting invocationEventNone from, its not anything written in the codebase, I checked.
As far as the `AppRegistry` module, it appears to look fine:
import {AppRegistry} from 'react-native';
import KeyboardManager from 'react-native-keyboard-manager';
import NFIBEngage from './App';
KeyboardManager.setToolbarPreviousNextButtonEnable(true);
AppRegistry.registerComponent('NFIBEngage', () => NFIBEngage);
Has anyone experienced something like this running versions similar to what I am running? What should I be investigating? How to resolve this?
I followed every solution in here: Module AppRegistry is not registered callable module (calling runApplication)
There was nothing in here that could help: React Native Module AppRegistry is not a registered callable module
This was not relevant: React Native(iOS) Module AppRegistry is not a registered callable module (calling runApplication)
Not relevant: React native AppRegistry is not a callable module
I then tried following the solution offered by iDevAmit here: React-Native: Module AppRegistry is not a registered callable module
but it appears my iOS which is what I am interested in running right now, is already linked according to this output:
rnpm-install info Platform 'ios' module appcenter is already linked
rnpm-install info Linking appcenter android dependency
rnpm-install info Platform 'android' module appcenter has been successfully linked
iOS App Secret is '00000000-0000-0000-0000-000000000000' set in ios/NFIBEngage/AppCenter-Config.plist
Added code to initialize iOS AppCenter SDK in ios/NFIBEngage/AppDelegate.m
Could not install dependencies using CocoaPods.
Please refer to the documentation to install dependencies manually.
Error Reason - Could not find "pod" command. Is CocoaPods installed?
Configuring AppCenter Analytics
rnpm-install info Platform 'ios' module appcenter-analytics is already linked
? For the Android app, should user tracking be enabled automatical
ly? (Use arrow keys)
❯ Enable Automatically
Enable in JavaScript iOS App Secret is '00000000-0000-0000-0000-000000000000' set in ios/NFIBEngage/AppCenter-Config.plist
? For the iOS app, should user tracking be enabled automatically?
(Use arrow keys)
❯ Enable Automatically
Enable in JavaScript
I did a Ctrl + C to get out and I do not know if the CocoaPods message is related as I have never used it. One time I tried a pod install and zsh could not find pod as a command.
Omar's solution does not work as it gave me Duplicate declaration "appName"
None of the other recommendations were applicable and upgrading React Native is not an option for this project.
In my Xcode 10.1 I have the current configuration inside of Project Settings -> Advanced button:
In this post: React Native IOS Build CFBundleIdentifier Does not Exist
I already have what SUMIT and priyanga recommended.
