Chris
Chris

Reputation: 659

React-Native cant find main project file on build

Recently implemented cocoapods into a React Native project. Now RN is throw this error after a successful build....

enter image description here

No errors in Xcode during build time... but Xcode gives me these warnings

enter image description here

Corresponding RCTUIManager.m: https://pastebin.com/F7shCt8M

Xcode log:

2017-04-07 14:06:59.714 [info][tid:main][RCTBatchedBridge.m:72] Initializing <RCTBatchedBridge: 0x6000001a5400> (parent: <RCTBridge: 0x6080000c50f0>, executor: RCTJSCExecutor)
2017-04-07 14:07:00.409 [error][tid:com.facebook.react.JavaScript] Native module cannot be null.
2017-04-07 14:07:00.414 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Native module cannot be null.
2017-04-07 14:07:00.430 [error][tid:com.facebook.react.JavaScript] Requiring module "215", which threw an exception.
2017-04-07 14:07:00.435 [warn][tid:com.facebook.react.JavaScript] Unable to symbolicate stack trace: Native module cannot be null.
2017-04-07 14:07:00.436 [warn][tid:com.facebook.react.JavaScript] Unable to symbolicate stack trace: undefined is not a constructor (evaluating 'new XMLHttpRequest()')
2017-04-07 14:07:00.441 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Requiring module "215", which threw an exception.
2017-04-07 14:07:00.533 [info][tid:main][RCTRootView.m:275] Running application zelosApp ({
    initialProps =     {
    };
    rootTag = 1;
})
2017-04-07 14:07:00.535 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
2017-04-07 14:07:00.538 [warn][tid:com.facebook.react.JavaScript] Unable to symbolicate stack trace: undefined is not a constructor (evaluating 'new XMLHttpRequest()')
2017-04-07 14:07:00.539 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

Podfile: https://pastebin.com/CAqehNMZ

index.ios.js: https://pastebin.com/j5nbaRaf

enter image description here

Not sure what the problem is here... Any ideas?

Upvotes: 0

Views: 1512

Answers (1)

YSK
YSK

Reputation: 1614

To summarize the comments: the React-related warnings are unrelated as they're about React rather than your project.

The error likely indicates that you have not linked a native library to your project. This should be done using react-native link.

There's a known issue with the latest react-native-maps component (v0.14) that breaks compilation following a react-native link. See https://github.com/airbnb/react-native-maps/issues/1193 for the solution:

open AirMaps project inside Libraries folder
remove reference of RCTConvert+MapKit.h/m
add reference to RCTConvert+AirMap.h/m (from node_modules/react-native-maps/lib/ios/AirMaps)

Upvotes: 1

Related Questions