Summary:
This will require people who use CocoaPods to update their Podfiles. You can see an example of a Podfile set up to use the Cxx bridge here: https://github.com/mhorowitz/native-navigation-boilerplate/blob/master/ios/Podfile
If this doesn't work, you can continue to use the old bridge by adding a dependency of 'BatchedBridge' to the React subspecs in your Podfile, but this will stop working once the old bridge is removed.
Reviewed By: javache
Differential Revision: D4981920
fbshipit-source-id: 7c4f3bf1c3f9af3f934f03ec003a05d0cd3cb259

If I do this, I suppose I need to do a 'pod install', either now or at some point...
But I get this error from pod install:ArgumentError - Malformed version number string https://registry.npmjs.org/react-native/-/react-native-0.45.1.tgz

Cocoapods requires a numeric version (Googling tells me that).
But node_modules/react-native/React.podspec seems to pull the version from node_modules/react-native/package.json. And that has:

If I do this, I suppose I need to do a 'pod install', either now or at some point...
But I get this error from pod install:ArgumentError - Malformed version number string https://registry.npmjs.org/react-native/-/react-native-0.45.1.tgz

Cocoapods requires a numeric version (Googling tells me that).
But node_modules/react-native/React.podspec seems to pull the version from node_modules/react-native/package.json. And that has:

This comment has been minimized.

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'MapAppMobile' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
#use_frameworks!
# Third party deps
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/Yoga.podspec'
pod 'React', path: '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
pod 'GoogleMaps' # <~~ remove this line if you do not want to support GoogleMaps on iOS
pod 'react-native-maps', path: '../node_modules/react-native-maps/react-native-maps.podspec'
pod 'react-native-google-maps', path: '../node_modules/react-native-maps/react-native-google-maps.podspec' # <~~ if you need GoogleMaps support on iOS
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "react-native-google-maps"
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
end
target 'MapAppMobile-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'MapAppMobileTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'MapAppMobile-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MapAppMobile-tvOS
target 'MapAppMobile-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end

edited

Edited 1 time

AshokICreate edited Jun 11, 2017 (most recent)

i am getting below errors .

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'MapAppMobile' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
#use_frameworks!
# Third party deps
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/Yoga.podspec'
pod 'React', path: '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
pod 'GoogleMaps' # <~~ remove this line if you do not want to support GoogleMaps on iOS
pod 'react-native-maps', path: '../node_modules/react-native-maps/react-native-maps.podspec'
pod 'react-native-google-maps', path: '../node_modules/react-native-maps/react-native-google-maps.podspec' # <~~ if you need GoogleMaps support on iOS
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "react-native-google-maps"
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
end
target 'MapAppMobile-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'MapAppMobileTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'MapAppMobile-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MapAppMobile-tvOS
target 'MapAppMobile-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end

This comment has been minimized.

Any updates on this so we can move forward with 0.45? I'm starting a new project, and hate to start with 0.44 and then do an upgrade later. In the last project, I ended up dropping a dependency that asked for CocoaPods and went without it, sacrificing a bit, just because of this.

Any updates on this so we can move forward with 0.45? I'm starting a new project, and hate to start with 0.44 and then do an upgrade later. In the last project, I ended up dropping a dependency that asked for CocoaPods and went without it, sacrificing a bit, just because of this.

This comment has been minimized.

Have you tried the recommendation in the summary: "If this doesn't work, you can continue to use the old bridge by adding a dependency of 'BatchedBridge' to the React subspecs in your Podfile, but this will stop working once the old bridge is removed." This should allow you to remove the DoubleConversion, GLog, and Folly podspecs from your Podfile.

Have you tried the recommendation in the summary: "If this doesn't work, you can continue to use the old bridge by adding a dependency of 'BatchedBridge' to the React subspecs in your Podfile, but this will stop working once the old bridge is removed." This should allow you to remove the DoubleConversion, GLog, and Folly podspecs from your Podfile.

This comment has been minimized.

If you are having issues with CocoaPods and the CxxBridge, please comment on issue #14326 or if it seems to be a new problem, open a new issue. It will be easier if all the discussion is in one place. Thanks!

If you are having issues with CocoaPods and the CxxBridge, please comment on issue #14326 or if it seems to be a new problem, open a new issue. It will be easier if all the discussion is in one place. Thanks!