react-native-code-push在React Native设置中不起作用

时间:2019-12-02 11:00:44

标签: ios reactjs react-native code-push react-native-code-push

我正在使用react native,我已经使用pod安装添加了react-native-code-push,我按照docs https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-ios.md的所有步骤进行操作。能够构建APP,我可以完整运行应用,但是当我尝试

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

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

这是版本信息

package.json

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

pod文件:

  # 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'

enter image description here

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

0 个答案:

没有答案