我正在尝试使用 Microsoft Code Push 更新 JS 包,而无需再次将应用程序提交到 iTunes。
在调试和发布模式下,应用程序可以通过代码推送成功加载包并在下次启动时安装更新。
与调试/发布 Xcode 应用程序不同,当我归档应用程序并从 TestFlight 安装它时,我在本机启动画面之后遇到一个白色的空白屏幕。App Center 中没有出现崩溃。
在添加 Code Push 支持之前我没有使用 Cocoapod,所以我不信任 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
- 反应原生版本:0.53.3
- iOS/Android/Windows 版本:iOS 10.2
- 这会在调试版本或发布版本上重现吗?不,它工作得很好
- 这是在模拟器上重现,还是仅在物理设备上重现?在模拟器上效果很好