Permalink
Browse files

BREAKING - Update podspecs to support and default to the C++ bridge

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
  • Loading branch information...
mhorowitz authored and facebook-github-bot committed May 3, 2017
1 parent dd45e7e commit 5aca739cc25949eebc04a0309c2944f92b5b5391
View
@@ -11,6 +11,8 @@ else
source[:tag] = "v#{version}"
end
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
Pod::Spec.new do |s|
s.name = "React"
s.version = version
@@ -41,13 +43,27 @@ Pod::Spec.new do |s|
s.subspec "Core" do |ss|
ss.dependency "Yoga", "#{package["version"]}.React"
ss.dependency "React/cxxreact"
ss.source_files = "React/**/*.{c,h,m,mm,S}"
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*", "React/DevSupport/*", "React/**/RCTTVView.*", "ReactCommon/yoga/*", "React/Cxx*/*"
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*", "React/DevSupport/*", "React/**/RCTTVView.*", "ReactCommon/yoga/*", "React/Cxx*/*", "React/Base/RCTBatchedBridge.mm", "React/Executors/*"
ss.framework = "JavaScriptCore"
ss.libraries = "stdc++"
end
s.subspec "BatchedBridge" do |ss|
ss.dependency "React/Core"
ss.dependency "React/cxxreact_legacy"
ss.source_files = "React/Base/RCTBatchedBridge.mm", "React/Executors/*"
end
s.subspec "CxxBridge" do |ss|
ss.dependency "Folly"
ss.dependency "React/Core"
ss.dependency "React/cxxreact"
ss.compiler_flags = folly_compiler_flags
ss.private_header_files = "React/Cxx*/*.h"
ss.source_files = "React/Cxx*/*.{h,m,mm}"
end
s.subspec "DevSupport" do |ss|
ss.dependency "React/Core"
ss.dependency "React/RCTWebSocket"
@@ -59,20 +75,40 @@ Pod::Spec.new do |s|
ss.source_files = "React/**/RCTTVView.{h, m}"
end
s.subspec "jschelpers" do |ss|
s.subspec "jschelpers_legacy" do |ss|
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
ss.framework = "JavaScriptCore"
end
s.subspec "cxxreact" do |ss|
ss.dependency "React/jschelpers"
s.subspec "cxxreact_legacy" do |ss|
ss.dependency "React/jschelpers_legacy"
ss.source_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.{cpp,h}"
ss.private_header_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end
s.subspec "jschelpers" do |ss|
ss.dependency "Folly"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/jschelpers/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jschelpers/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
ss.framework = "JavaScriptCore"
end
s.subspec "cxxreact" do |ss|
ss.dependency "React/jschelpers"
ss.dependency "boost"
ss.dependency "Folly"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/cxxreact/*.{cpp,h}"
ss.exclude_files = "ReactCommon/cxxreact/JSCTracing.cpp"
ss.private_header_files = "ReactCommon/cxxreact/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\"" }
end
s.subspec "ART" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/ART/**/*.{h,m}"
@@ -0,0 +1,17 @@
Pod::Spec.new do |spec|
spec.name = 'DoubleConversion'
spec.version = '1.1.5'
spec.license = { :type => 'BSD' }
spec.homepage = 'https://github.com/google/double-conversion'
spec.summary = 'Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles'
spec.authors = 'Google'
spec.prepare_command = 'mv src double-conversion'
spec.source = { :git => 'https://github.com/google/double-conversion.git',
:tag => "v#{spec.version}" }
spec.module_name = 'DoubleConversion'
spec.source_files = 'double-conversion/*.{h,cc}'
# Pinning to the same version as React.podspec.
spec.platform = :ios, '8.0'
end
@@ -0,0 +1,43 @@
Pod::Spec.new do |spec|
spec.name = 'Folly'
spec.version = '2016.09.26.00'
spec.license = { :type => 'Apache License, Version 2.0' }
spec.homepage = 'https://github.com/facebook/folly'
spec.summary = 'An open-source C++ library developed and used at Facebook.'
spec.authors = 'Facebook'
spec.source = { :git => 'https://github.com/facebook/folly.git',
:tag => "v#{spec.version}" }
spec.module_name = 'folly'
spec.dependency 'boost'
spec.dependency 'DoubleConversion'
spec.dependency 'GLog'
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
spec.header_mappings_dir = 'folly'
spec.source_files = 'folly/*.h',
'folly/Bits.cpp',
'folly/Conv.cpp',
'folly/Demangle.cpp',
# 'folly/File.cpp',
'folly/StringBase.cpp',
'folly/Unicode.cpp',
'folly/dynamic.cpp',
'folly/json.cpp'
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\"" }
# Pinning to the same version as React.podspec.
spec.platform = :ios, '8.0'
spec.subspec "detail" do |ss|
ss.header_dir = 'folly/detail'
ss.source_files = 'folly/detail/*.h',
'folly/detail/MallocImpl.cpp'
end
spec.subspec "portability" do |ss|
ss.header_dir = 'folly/portability'
ss.source_files = 'folly/portability/*.h',
'folly/portability/BitsFunctexcept.cpp'
end
end
@@ -0,0 +1,34 @@
Pod::Spec.new do |spec|
spec.name = 'GLog'
spec.version = '0.3.4'
spec.license = { :type => 'Google', :file => 'COPYING' }
spec.homepage = 'https://github.com/google/glog'
spec.summary = 'Google logging module'
spec.authors = 'Google'
spec.prepare_command = <<-CMD
echo '#!/bin/sh' > ./ios-cc.sh
echo 'exec "$(xcrun -find -sdk iphoneos cc)" -arch armv7 -isysroot "$(xcrun -sdk iphoneos --show-sdk-path)" "$@"' >> ./ios-cc.sh
chmod 755 ./ios-cc.sh
CC="`pwd`"/ios-cc.sh CXX="`pwd`"/ios-cc.sh ./configure --host arm-apple-darwin
CMD
spec.source = { :git => 'https://github.com/google/glog.git',
:tag => "v#{spec.version}" }
spec.module_name = 'glog'
spec.source_files = 'src/**/*.h',
'src/demangle.cc',
'src/logging.cc',
'src/raw_logging.cc',
'src/signalhandler.cc',
'src/symbolize.cc',
'src/utilities.cc',
'src/vlog_is_on.cc'
spec.public_header_files = 'src/glog/*.h'
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/src" }
# Pinning to the same version as React.podspec.
spec.platform = :ios, '8.0'
end

25 comments on commit 5aca739

@ptomasroos

This comment has been minimized.

Show comment
Hide comment
@ptomasroos

ptomasroos May 4, 2017

Contributor

Many thanks for updating the Podspec @mhorowitz :) Sometimes referred as the lonely child..

Contributor

ptomasroos replied May 4, 2017

Many thanks for updating the Podspec @mhorowitz :) Sometimes referred as the lonely child..

@mhorowitz

This comment has been minimized.

Show comment
Hide comment
@mhorowitz

mhorowitz May 4, 2017

Contributor

You're welcome @ptomasroos ! If you use CocoaPods, please test it. I have only been able to do limited testing.

Contributor

mhorowitz replied May 4, 2017

You're welcome @ptomasroos ! If you use CocoaPods, please test it. I have only been able to do limited testing.

@ptomasroos

This comment has been minimized.

Show comment
Hide comment
@ptomasroos

ptomasroos May 5, 2017

Contributor

Yes we do! Will give it a try @mhorowitz

Contributor

ptomasroos replied May 5, 2017

Yes we do! Will give it a try @mhorowitz

@skv-headless

This comment has been minimized.

Show comment
Hide comment
@skv-headless

skv-headless May 16, 2017

Contributor

I've updated my Podspec according to https://github.com/mhorowitz/native-navigation-boilerplate/blob/master/ios/Podfile have 25 errors

GLog errors:

  • /GLog/src/base/mutex.h:145:3: Need to implement mutex.h for your architecture, or #define NO_THREADS
  • /GLog/src/base/mutex.h:186:3: Unknown type name 'MutexType'
  • /Pods/Headers/Public/Folly/string.h:23:10: 'boost/type_traits.hpp' file not found

Yoga errors:

  • /ReactCommon/yoga/yoga/Yoga.h:13:10: Non-portable path to file '<Math.h>'; specified path differs in case from file name on disk
  • /Pods/Headers/Public/Folly/math.h:26:10: 'limits' file not found

DoubleConversation errors:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:70:9: No member named 'memcpy' in the global namespace; did you mean 'wmemcpy'?

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:71:9: No member named 'memmove' in the global namespace; did you mean 'wmemmove'?

Contributor

skv-headless replied May 16, 2017

I've updated my Podspec according to https://github.com/mhorowitz/native-navigation-boilerplate/blob/master/ios/Podfile have 25 errors

GLog errors:

  • /GLog/src/base/mutex.h:145:3: Need to implement mutex.h for your architecture, or #define NO_THREADS
  • /GLog/src/base/mutex.h:186:3: Unknown type name 'MutexType'
  • /Pods/Headers/Public/Folly/string.h:23:10: 'boost/type_traits.hpp' file not found

Yoga errors:

  • /ReactCommon/yoga/yoga/Yoga.h:13:10: Non-portable path to file '<Math.h>'; specified path differs in case from file name on disk
  • /Pods/Headers/Public/Folly/math.h:26:10: 'limits' file not found

DoubleConversation errors:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:70:9: No member named 'memcpy' in the global namespace; did you mean 'wmemcpy'?

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstring:71:9: No member named 'memmove' in the global namespace; did you mean 'wmemmove'?

@mhorowitz

This comment has been minimized.

Show comment
Hide comment
@mhorowitz

mhorowitz May 22, 2017

Contributor

@skv-headless those are surprising errors. If nothing else, I touched nothing in Yoga at all, and the code at https://github.com/facebook/react-native/blob/master/ReactCommon/yoga/yoga/Yoga.h#L13 and in the 0.45 rc branch has #include <math.h> in lower case. while your errors complain about it being upper-case. The mutex and limits errors imply some system header files are missing.

What version of Xcode and CocoaPods are you using, and what platform are you targeting?

Contributor

mhorowitz replied May 22, 2017

@skv-headless those are surprising errors. If nothing else, I touched nothing in Yoga at all, and the code at https://github.com/facebook/react-native/blob/master/ReactCommon/yoga/yoga/Yoga.h#L13 and in the 0.45 rc branch has #include <math.h> in lower case. while your errors complain about it being upper-case. The mutex and limits errors imply some system header files are missing.

What version of Xcode and CocoaPods are you using, and what platform are you targeting?

@javache

This comment has been minimized.

Show comment
Hide comment
@javache

javache May 25, 2017

Member

I've seen this issue too with Cocoapods when using use_libraries (i.e. with Swift). Cocoapods then puts everything on one include path and the system include for math.h ends up loading folly's Math.h

Member

javache replied May 25, 2017

I've seen this issue too with Cocoapods when using use_libraries (i.e. with Swift). Cocoapods then puts everything on one include path and the system include for math.h ends up loading folly's Math.h

@ptomasroos

This comment has been minimized.

Show comment
Hide comment
@ptomasroos

ptomasroos May 25, 2017

Contributor

@javache No offence but did you mean use_frameworks! ?

Contributor

ptomasroos replied May 25, 2017

@javache No offence but did you mean use_frameworks! ?

@javache

This comment has been minimized.

Show comment
Hide comment
@javache

javache May 26, 2017

Member

Yep, sorry, that one.

Member

javache replied May 26, 2017

Yep, sorry, that one.

@bernatfortet

This comment has been minimized.

Show comment
Hide comment
@bernatfortet

bernatfortet Jun 7, 2017

If you are using Cocoapods, you will have to update your Podfile by adding a dependency of ‘BatchedBridge’ or ‘CxxBridge’ to the React subspec depending on your choice.

Could you clarify how to add the dependency?

Thanks

bernatfortet replied Jun 7, 2017

If you are using Cocoapods, you will have to update your Podfile by adding a dependency of ‘BatchedBridge’ or ‘CxxBridge’ to the React subspec depending on your choice.

Could you clarify how to add the dependency?

Thanks

@mhorowitz

This comment has been minimized.

Show comment
Hide comment
Contributor

mhorowitz replied Jun 7, 2017

@bernatfortet

This comment has been minimized.

Show comment
Hide comment
@bernatfortet

bernatfortet Jun 7, 2017

So given a pods file, it would end up like this:

target 'myApp' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

  # Pods for myApp
  pod 'somePod'

...
addition:

  pod 'React', :path => '../../react-native', :subspecs => [
    'CxxBridge',
  ]

...



end

So given a pods file, it would end up like this:

target 'myApp' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

  # Pods for myApp
  pod 'somePod'

...
addition:

  pod 'React', :path => '../../react-native', :subspecs => [
    'CxxBridge',
  ]

...



end
@mhorowitz

This comment has been minimized.

Show comment
Hide comment
@mhorowitz

mhorowitz Jun 7, 2017

Contributor

Are you already using React Native and CocoaPods in your app? If not, https://github.com/lelandrichardson/native-navigation-boilerplate/blob/master/ios/Podfile#L12-L21 is a better example for how to get started. The additional CxxBridge subspec is the new thing, but you will likely need more than that, and you don't want to use a path like I did in my example, unless you're also doing development on React Native itself.

Contributor

mhorowitz replied Jun 7, 2017

Are you already using React Native and CocoaPods in your app? If not, https://github.com/lelandrichardson/native-navigation-boilerplate/blob/master/ios/Podfile#L12-L21 is a better example for how to get started. The additional CxxBridge subspec is the new thing, but you will likely need more than that, and you don't want to use a path like I did in my example, unless you're also doing development on React Native itself.

@dgruseck

This comment has been minimized.

Show comment
Hide comment
@dgruseck

dgruseck Jun 8, 2017

Hi, I'm having the same errors than @skv-headless.
I don't use use_frameworks!.
Any solutions for this?

Hi, I'm having the same errors than @skv-headless.
I don't use use_frameworks!.
Any solutions for this?

@sivakumar-cf

This comment has been minimized.

Show comment
Hide comment
@sivakumar-cf

sivakumar-cf Jun 8, 2017

Hi, I'm getting Xcode compile error on Folly/Math.h 'limits' file not found. I have added the CxxBridge as subspecs to React pod.

  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
 
   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 'React', :path => './../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',
    'RCTImage',
    'RCTNetwork',
    'DevSupport'
    ]

Cocoapods version: 1.2.1
Xcode version: 8.3.3

sivakumar-cf replied Jun 8, 2017

Hi, I'm getting Xcode compile error on Folly/Math.h 'limits' file not found. I have added the CxxBridge as subspecs to React pod.

  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
 
   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 'React', :path => './../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',
    'RCTImage',
    'RCTNetwork',
    'DevSupport'
    ]

Cocoapods version: 1.2.1
Xcode version: 8.3.3

@javache

This comment has been minimized.

Show comment
Hide comment
@javache

javache Jun 8, 2017

Member

@sivakumar-cf This issue is being tracked in #14326

Member

javache replied Jun 8, 2017

@sivakumar-cf This issue is being tracked in #14326

@peternann

This comment has been minimized.

Show comment
Hide comment
@peternann

peternann Jun 10, 2017

I'm trying to upgrade a project from RN0.43 and having issues here.
All I had before was 1 third-party pod reference in my ios/Podfile - Nothing more.

So I think I just add this to my basic ios/Podfile:

pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'BatchedBridge'
    ]

Correct? (Or do I need all the other subspecs?)

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:

  "version": "https://registry.npmjs.org/react-native/-/react-native-0.45.1.tgz"

I changed that to:

  "version": "0.45.1"

And pod install now runs happily.

I still have problems ("undefined is not an object (evaluating 'ReactInternals.ReactCurrentOwner')"?)

But I think the non-numeric version string above is a problem for Cocoapods.

I'm trying to upgrade a project from RN0.43 and having issues here.
All I had before was 1 third-party pod reference in my ios/Podfile - Nothing more.

So I think I just add this to my basic ios/Podfile:

pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'BatchedBridge'
    ]

Correct? (Or do I need all the other subspecs?)

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:

  "version": "https://registry.npmjs.org/react-native/-/react-native-0.45.1.tgz"

I changed that to:

  "version": "0.45.1"

And pod install now runs happily.

I still have problems ("undefined is not an object (evaluating 'ReactInternals.ReactCurrentOwner')"?)

But I think the non-numeric version string above is a problem for Cocoapods.

@AshokICreate

This comment has been minimized.

Show comment
Hide comment
@AshokICreate

AshokICreate Jun 11, 2017

i am getting below errors .

screen shot 2017-06-12 at 12 03 57 am

# 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

AshokICreate replied Jun 11, 2017

i am getting below errors .

screen shot 2017-06-12 at 12 03 57 am

# 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
@GantMan

This comment has been minimized.

Show comment
Hide comment
@GantMan

GantMan Jun 13, 2017

Contributor

@peternann's solution worked for me, but I lost Command + R at some point... any chance it could have been right here?

Contributor

GantMan replied Jun 13, 2017

@peternann's solution worked for me, but I lost Command + R at some point... any chance it could have been right here?

@jaimeagudo

This comment has been minimized.

Show comment
Hide comment
@jaimeagudo

jaimeagudo Jun 15, 2017

@GantMan make sure you have included 'DevSupport' like this

pod 'React', path: '../node_modules/react-native', :subspecs => [
  'DevSupport'
]

@GantMan make sure you have included 'DevSupport' like this

pod 'React', path: '../node_modules/react-native', :subspecs => [
  'DevSupport'
]
@GantMan

This comment has been minimized.

Show comment
Hide comment
@GantMan

GantMan Jun 15, 2017

Contributor

I did... I wound up just removing the 2 pod dependencies and going with linking the frameworks manually. Not ideal, but it fixed Command + R, and restored sanity.

Contributor

GantMan replied Jun 15, 2017

I did... I wound up just removing the 2 pod dependencies and going with linking the frameworks manually. Not ideal, but it fixed Command + R, and restored sanity.

@ragnorc

This comment has been minimized.

Show comment
Hide comment
@ragnorc

ragnorc Jul 4, 2017

Any fix for this? Unable to upgrade to 0.45 as I am using CocoaPods.

Any fix for this? Unable to upgrade to 0.45 as I am using CocoaPods.

@askarhu

This comment has been minimized.

Show comment
Hide comment
@askarhu

askarhu Jul 5, 2017

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.

@mhorowitz

This comment has been minimized.

Show comment
Hide comment
@mhorowitz

mhorowitz Jul 5, 2017

Contributor

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.

Contributor

mhorowitz replied Jul 5, 2017

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.

@ragnorc

This comment has been minimized.

Show comment
Hide comment
@ragnorc

ragnorc Jul 6, 2017

@mhorowitz Also tried using BatchedBridge but ended up having another error while building for ios. Don't remember which. Is it fixed in 0.46?

@mhorowitz Also tried using BatchedBridge but ended up having another error while building for ios. Don't remember which. Is it fixed in 0.46?

@mhorowitz

This comment has been minimized.

Show comment
Hide comment
@mhorowitz

mhorowitz Jul 7, 2017

Contributor

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!

Contributor

mhorowitz replied Jul 7, 2017

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!

Please sign in to comment.