简体   繁体   English

发布版本仅在IOS Xcode Flutter中加载应用程序的启动屏幕

[英]Release build loads only the splash screen of the app in IOS Xcode Flutter

When in debug mode app works fine. 在调试模式下,应用可以正常运行。 But during the release build it loads only the splash screen. 但是在发布版本期间,它仅加载初始屏幕。 But when I tick debug executable in release mode.The app is working fine. 但是当我在发布模式下勾选调试可执行文件时,该应用程序运行正常。 Please guide. 请指导。 Sorry for the format. 抱歉,该格式。 Apple rejects my app 苹果拒绝我的应用

Guideline 2.1 - Performance - App Completeness 准则2.1-性能-应用完整性

We discovered one or more bugs in your app when reviewed on iPad running iOS 12.4 on Wi-Fi. 在运行Wi-Fi的iOS 12.4的iPad上进行审核时,我们发现您的应用程序中存在一个或多个错误。

Specifically, your app only launched to a splash screen with no other content available to the user. 具体来说,您的应用仅启动至初始屏幕,而用户没有其他可用内容。

Next Steps 下一步

To resolve this issue, please run your app on a device to identify any issues, then revise and resubmit your app for review. 要解决此问题,请在设备上运行您的应用以识别任何问题,然后修改并重新提交您的应用以供审核。

Do clean of code by flutter clean 通过flutter clean清理代码

Install pods for iOS by cd ios then pod install . 通过cd ios pod install iOS的Pod,然后pod install

Then make release build for iOS by flutter build ios --release . 然后通过flutter build ios --release为iOS flutter build ios --release发布版本。

Now you can open iOS project in xcode and only splash screen issue will be fixed. 现在,您可以在xcode中打开iOS项目,并且只有启动画面问题会得到解决。

You should be write following command in terminal(Android Studio/Visual Code) 您应该在终端中编写以下命令(Android Studio / Visual Code)

rm -rf $HOME/Library/Developer/Xcode/DerivedData/*

# destroy entire flutter cache (will be redownloaded and rebuilt)
# rm -rf $HOME/Library/Flutter/bin/cache/*

# sometimes Flutter doesn't recompile the frameworks
rm -rf ios/Flutter/App.framework ios/Flutter/Flutter.framework

# remove the entire pub-cache
rm -rf ~/.pub-cache/*

# now, remove the build directory
rm -rf build

# now remove the .packages file
rm -f .packages

# now remove the plugins directory
rm -rf .flutter-plugins

pushd ios
pod deintegrate
rm -rf Pods Podfile.lock
rm -rf .symlinks/*
popd

flutter packages get

Same thing happened to me: 同样的事情发生在我身上:

flutter clean
flutter build ios --release

Was all I needed (didn't need to do the pod install ). 这就是我所需要的(不需要pod install )。

A few links that might also be helpful: 一些链接可能也有帮助:

https://github.com/flutter/flutter/issues/22765#issuecomment-449618558 https://github.com/flutter/flutter/issues/22765#issuecomment-449618558

Flutter app opens, but is stuck on splash-screen Flutter应用程序打开,但停留在初始屏幕上

You need to build initially from Android studio for iOS. 您最初需要从适用于iOS的Android Studio进行构建。

Initially clean your project - flutter clean 最初清理您的项目- flutter clean

Then run below line in terminal of Android studio. 然后在Android Studio的终端行下运行。

flutter build ios --release

Now, open XCode and clean project then make your archive. 现在,打开XCode并清理项目,然后进行存档。 Your issue of stuck in Splash is resolved. 您卡在Splash中的问题已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM