CC's blog

CC的技术博客 专注于 it 互联网的技术爱好者

在现有项目中集成 ReactNative 0.44

公司项目项目升级0.44 记录一下

podFile

platform :ios, '8.0'
def ingage_pods
    pod 'RNSound', :path => './node_modules/react-native-xsy-sound'
    pod 'RNSVG', :path => './node_modules/react-native-svg'
    pod 'RNFS', :path => './node_modules/react-native-fs'
    pod 'react-native-sqlite-storage', :path => './node_modules/react-native-sqlite-storage'
    pod 'RNDeviceInfo', :path => './node_modules/react-native-device-info'
    pod 'ToolTipLib', :path => './node_modules/react-native-xsy-tooltip'
    pod 'CodePush', :path => './node_modules/react-native-code-push',:subspecs => ['Core']
    pod 'RNZipArchive', :path => './node_modules/react-native-xsy-zip-archive'
    pod 'Toast', :path => './node_modules/react-native-xsy-toast'
    pod 'RNXSYUpgrade', :path => './node_modules/react-native-xsy-upgrade'
#从这一行开始下面都是reactnative需要导入的
    pod 'Yoga', :path => './node_modules/react-native/ReactCommon/yoga'
    pod 'React', :path => './node_modules/react-native', :subspecs => [
    'Core',
    'RCTActionSheet',
    'RCTAnimation',
    'RCTGeolocation',
    'RCTImage',
    'RCTLinkingIOS',
    'RCTNetwork',
    'RCTSettings',
    'RCTText',
    'RCTVibration',
    'RCTWebSocket',
    'DevSupport'
    ]
    
end
target 'ingage' do
    ingage_pods
end
  • 在完成导入可能会有头文件找不到,手动改一下就是了
  • 特别注意,如果有使用react-native-router-flux 需要手动安装指定版本的如下组件,这是个坑
 "react-addons-pure-render-mixin": "^15.5.0",
none

添加新评论