#ios #cordova #hybrid-mobile-app #ios14 #cordova-ios
#iOS #кордова #гибрид-мобильное приложение #ios14 #cordova-ios
Вопрос:
Приложение Cordova IOS показывает белый экран в IOS 14. Но приложение работает ниже версии IOS 14. Я обновил свой Xcode до версии 12.0. Версия платформы Cordova для IOS — 6.1.0. Версия Cordova — 10.0.0. Ниже приведены сведения о плагине и настройки в config.xml досье.
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />
<plugin name="cordova-plugin-network-information" spec="^2.0.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
<plugin name="cordova-plugin-splashscreen" spec="^6.0.0" />
<plugin name="cordova-plugin-inappbrowser" spec="^4.0.0" />
<preference name="auto-hide-splash-screen" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="FadeSplashScreenDuration" value="0" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="2000" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="AllowInlineMediaPlayback" value="true" />
<preference name="orientation" value="portrait" />
<preference name="DisallowOverscroll" value="true" />
Я попытался удалить все плагины, кроме белого списка. Я удалил настройки, связанные с заставкой, и попробовал. Все еще приложение показывает белый экран.
Пожалуйста, помогите мне. Любая помощь должна быть оценена. Заранее спасибо.
Ответ №1:
Я нашел ответ.
Я удалил плагин splashscreen. По умолчанию splashscreen доступен в платформе Cordova IOS 6.1.0.
В корневой папке проекта проверьте наличие папки res. Если папка res недоступна, мы должны создать путь к папке res, подобный этому «res / screen / ios /» и загрузить изображения заставки в папку ios.
Затем добавьте это в свой config.xml
<splash src="res/screen/ios/screen-ipad-landscape-2x.png" />
<splash src="res/screen/ios/screen-ipad-landscape.png" />
<splash src="res/screen/ios/screen-ipad-portrait-2x.png" />
<splash src="res/screen/ios/screen-ipad-portrait.png" />
<splash src="res/screen/ios/screen-iphone-landscape-2x.png" />
<splash src="res/screen/ios/screen-iphone-landscape.png" />
<splash src="res/screen/ios/screen-iphone-portrait-2x.png" />
<splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" />
<splash src="res/screen/ios/screen-iphone-portrait.png" />
Ниже приведены отредактированные config.xml код, который сработал для меня.
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<splash src="res/screen/ios/screen-ipad-landscape-2x.png" />
<splash src="res/screen/ios/screen-ipad-landscape.png" />
<splash src="res/screen/ios/screen-ipad-portrait-2x.png" />
<splash src="res/screen/ios/screen-ipad-portrait.png" />
<splash src="res/screen/ios/screen-iphone-landscape-2x.png" />
<splash src="res/screen/ios/screen-iphone-landscape.png" />
<splash src="res/screen/ios/screen-iphone-portrait-2x.png" />
<splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" />
<splash src="res/screen/ios/screen-iphone-portrait.png" />
</platform>
<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />
<plugin name="cordova-plugin-network-information" spec="^2.0.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
<plugin name="cordova-plugin-inappbrowser" spec="^4.0.0" />
Приветствия.
Ответ №2:
Я понизил рейтинг до cordova-ios@5.1.1 .