[英]Release build loads only the splash screen of the app in IOS Xcode Flutter
在調試模式下,應用可以正常運行。 但是在發布版本期間,它僅加載初始屏幕。 但是當我在發布模式下勾選調試可執行文件時,該應用程序運行正常。 請指導。 抱歉,該格式。 蘋果拒絕我的應用
准則2.1-性能-應用完整性
在運行Wi-Fi的iOS 12.4的iPad上進行審核時,我們發現您的應用程序中存在一個或多個錯誤。
具體來說,您的應用僅啟動至初始屏幕,而用戶沒有其他可用內容。
下一步
要解決此問題,請在設備上運行您的應用以識別任何問題,然后修改並重新提交您的應用以供審核。
通過flutter clean
清理代碼
通過cd ios
pod install
iOS的Pod,然后pod install
。
然后通過flutter build ios --release
為iOS flutter build ios --release
發布版本。
現在,您可以在xcode中打開iOS項目,並且只有啟動畫面問題會得到解決。
您應該在終端中編寫以下命令(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
同樣的事情發生在我身上:
flutter clean
flutter build ios --release
這就是我所需要的(不需要pod install
)。
一些鏈接可能也有幫助:
https://github.com/flutter/flutter/issues/22765#issuecomment-449618558
您最初需要從適用於iOS的Android Studio進行構建。
最初清理您的項目- flutter clean
然后在Android Studio的終端行下運行。
flutter build ios --release
現在,打開XCode並清理項目,然后進行存檔。 您卡在Splash中的問題已解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.