rn项目 假如cocoapods_RN | cocoapods接入rn

配置信息

rn版本0.50.0

cocoapods:1.4

Podfile

platform :ios, '8.0'

$rn_node_moudles_dir = '../RN/node_modules'

$rn_react_pod_dir = $rn_node_moudles_dir+'/react-native'

def ymm_rn_debug_pod

# Your 'node_modules' directory is probably in the root of your project,

# but if not, adjust the `:path` accordingly

pod 'React', :path => $rn_react_pod_dir, :subspecs => [

'BatchedBridge', #if RN >= 0.43

#CxxBridge 代替 BatchedBridge

#'CxxBridge',

'Core',

'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43

'RCTNetwork',

'RCTWebSocket', # needed for debugging

'RCTActionSheet',

'RCTAnimation',

'RCTImage',

'RCTText',

# 'RCTActionSheet',

# 'RCTBlob',

# 'RCTSettings',

# 'RCTVibration',

# 'RCTLinkingIOS',

# 'RCTAnimation',

# 'RCTGeolocation',

# Add any other subspecs you want to use in your project

]

# Explicitly include Yoga if you are using RN >= 0.42.0

pod 'yoga', :path => $rn_react_pod_dir+'/ReactCommon/yoga'

# Third party deps podspec link

pod 'DoubleConversion', :podspec => $rn_react_pod_dir+'/third-party-podspecs/DoubleConversion.podspec'

pod 'GLog', :podspec => $rn_react_pod_dir+'/third-party-podspecs/GLog.podspec'

pod 'Folly', :podspec => $rn_react_pod_dir+'/third-party-podspecs/Folly.podspec'

end

用CxxBridge替换BatchedBridge

将podfile修改后,会出现问题

输入图片说明

s.subspec "jschelpers" do |ss|

ss.dependency "Folly", "2016.09.26.00"

+ ss.dependency "React/PrivateDatabase"

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 "PrivateDatabase" do |ss|

+ ss.source_files = "ReactCommon/privatedata/*.{cpp,h}"

+ ss.private_header_files = "ReactCommon/privatedata/*.h"

+ end

+

s.subspec "cxxreact" do |ss|

ss.dependency "React/jschelpers"

ss.dependency "boost"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值