1

我正在使用 react native,我已经使用 pod 安装添加了 react-native-code-push,我按照文档 https://github.com/microsoft/react-native-code-push/blob/master/完成了所有步骤文档/设置-ios.md。能够构建应用程序,我能够成功运行应用程序但是当我尝试时

从“react-native-code-push”导入 codePush;

console.log ('codePush===', codePush) ,未定义,也无法打开调试菜单,重新加载,一切都停止工作

这是版本信息

包.json

 "react": "16.8.3",
  "react-native": "0.59.8",
 "react-native-code-push": "5.6.0",

吊舱文件:

  # React Native requirements
 pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # Needed for debugging
    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
    # 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 => '../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'

  # CodePush plugin dependency
  pod 'CodePush', :path => '../node_modules/react-native-code-push'

在此处输入图像描述

无法理解的问题,任何人都可以帮助解决这个问题,

4

0 回答 0