Description
I am integrating Viromedia in react-native, react-native 0.49.3 was recommended for the integration to work (refer to @ VikAdvani comment).
I am getting the following exception in Xcode
// terminal
...
2018-05-15 11:53:19.694807+0300 viroApp[3196:2202572] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[2]'
*** First throw call stack:
(0x183616d8c 0x1827d05ec 0x1835af750 0x1834e2a18 0x1834eec78 0x106011a08 0x10600ad08 0x107469260 0x107469220 0x10747aa84 0x10747a584 0x18323bfac 0x18323bb08)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Environment
OS: macOS High Sierra 10.13.4
Node: 8.11.1
Yarn: 1.5.1
npm: 6.0.0
Watchman: Not Found
Xcode: Xcode 9.3.1 Build version 9E501
Android Studio: 3.1 AI-173.4697961
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ^0.49.3 => 0.49.5
The app is using the boilerplate used in the react-native init app + npm install react-viro as shown below
package.json
..
"dependencies": {
"react": "16.3.1",
"react-native": "^0.49.3",
"react-viro": "^2.6.1"
},
"devDependencies": {
"babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
..
podfile inside ./ios/
platform :ios, '9.3'
target 'viroApp' do
use_frameworks!
pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
pod 'ViroKit', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'BatchedBridge',
'RCTImage',
'CxxBridge',
'RCTActionSheet',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
]
pod 'boost-for-react-native'
end
Xcode -> Build Settings
Bitcode = NO
Steps to Reproduce
It should run on a REAL DEVICE
$ react-native init viroApp
# cd project directory created ..
# cd to product root
# follow steps from @WikAdvanci https://github.com/viromedia/viro/issues/223
$ cd ios/
$ pod init
# update pod file with the above
$ pod install
// open Xcode and run
Screenshot is taken from Xcode, from viroApp > libraries > React.xcodeproj > React > CxxBridge > RCTCxxBridge.mm
Expected Behavior
Build without errors
Actual Behavior
terminating with uncaught exception of type NSException