[英]iOS react-native-code-push app working in debug / release mode but white screen with archived TestFlight app
I'm trying to use Microsoft Code Push to update the JS bundle without submitting the app to iTunes again.我正在尝试使用 Microsoft 代码推送来更新 JS 包,而无需再次将应用程序提交到 iTunes。
On debug and release mode, the app can successfully load the bundle via Code Push and install updates at the next startup.在调试和发布模式下,应用程序可以通过代码推送成功加载包并在下次启动时安装更新。
Unlike the debug / release Xcode app, when I archive the app and install it from TestFlight, I'm experiencing a white blank screen just after the native splashscreen.与调试/发布 Xcode 应用程序不同,当我归档应用程序并从 TestFlight 安装它时,我在本机启动画面之后遇到了一个白色的空白屏幕。 No crashes appears in the App Center. App Center 中没有出现崩溃。
I didn't used Cocoapod before adding Code Push support so I don't trust the Podfile and I'm a total newbie on this part.在添加代码推送支持之前,我没有使用 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
I had a similar problem I just resolved with my test flight build.我有一个类似的问题,我刚刚用我的试飞版本解决了这个问题。 I was able to deploy my app to my device locally with the react-native run-ios command and receive codepush updates, but whenever I released the build for testflight, that app did not receive the updates.我能够使用 react-native run-ios 命令在本地将我的应用程序部署到我的设备并接收 codepush 更新,但是每当我发布 testflight 的构建时,该应用程序都没有收到更新。 The problem was my that my codepush target version did not match the version in XCode, you can fix this by changing the version under General -> Identity -> Version to match the target versions in code push.问题是我的 codepush 目标版本与 XCode 中的版本不匹配,您可以通过更改 General -> Identity -> Version 下的版本以匹配 code push 中的目标版本来解决此问题。 Or you can also change in CodePush the deployed target version to match the one from XCode.或者您也可以在 CodePush 中更改部署的目标版本以匹配来自 XCode 的版本。
Additionally you can configure the codepush target version in your deploy command by the -t flag and version number.此外,您可以通过 -t 标志和版本号在部署命令中配置 codepush 目标版本。 appcenter codepush release-react -t '0.1.0' ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.