我正在尝试使用Microsoft Code Push来更新JS包,而无需再次将应用程序提交给iTunes .

在调试和发布模式下,应用程序可以通过代码推送成功加载捆绑包,并在下次启动时安装更新 .

与调试/发布Xcode应用程序不同,当我存档应用程序并从TestFlight安装它时,我在原生启动画面之后遇到了一个白色的空白屏幕 . App Center中不会出现崩溃 .

在添加Code Push支持之前我没有使用过Cocoapod,所以我不相信Podfile,而且我是这方面的新手 .

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

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 'yoga', path: '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
  pod 'React', path: '../node_modules/react-native', subspecs: [
    'DevSupport',
  ]
  pod 'AppCenter/Crashes', '~> 1.7.1'
  pod 'AppCenter/Analytics', '~> 1.7.1'
  pod 'AppCenterReactNativeShared', '~> 1.6.0'
  pod 'CodePush', :path => '../node_modules/react-native-code-push'

  platform :ios, '9.0'
  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

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

  # Pods for MyApp-tvOS

  target 'MyApp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

环境

  • react-native-code-push版本:5.4.0

  • react-native版本:0.53.3

  • iOS / Android / Windows版:iOS 10.2

  • 这是否在调试版本或发布版本上重现?不,它运作得很好

  • 这是在模拟器上还是仅在物理设备上重现?在模拟器上工作得很好