【问题标题】:White Screen after SplashScreenSplashScreen 后出现白屏
【发布时间】:2018-11-18 14:48:52
【问题描述】:

在我的设备上启动我的应用程序后,它只会加载预加载器,然后只显示一个白屏。但这仅在 Android 上的 IOS 上发生,一切正常。

This is the log in Xcode:
2018-11-18 15:38:01.238190+0100 SmartEye[1537:205446] Apache Cordova native platform version 4.5.5 is starting.
2018-11-18 15:38:01.239075+0100 SmartEye[1537:205446] Multi-tasking -> Device: YES, App: YES
2018-11-18 15:38:01.249803+0100 SmartEye[1537:205446] CDVWKWebViewEngine: trying to inject XHR polyfill
2018-11-18 15:38:01.305007+0100 SmartEye[1537:205446] CDVWKWebViewEngine will reload WKWebView if required on resume
2018-11-18 15:38:01.305136+0100 SmartEye[1537:205446] Using Ionic WKWebView
2018-11-18 15:38:01.306279+0100 SmartEye[1537:205446] [CDVTimer][console] 0.131011ms
2018-11-18 15:38:01.306450+0100 SmartEye[1537:205446] [CDVTimer][handleopenurl] 0.087023ms
2018-11-18 15:38:01.308654+0100 SmartEye[1537:205446] [CDVTimer][intentandnavigationfilter] 2.170086ms
2018-11-18 15:38:01.308774+0100 SmartEye[1537:205446] [CDVTimer][gesturehandler] 0.075936ms
2018-11-18 15:38:01.308877+0100 SmartEye[1537:205446] CDVIonicKeyboard: resize mode 1
2018-11-18 15:38:01.309925+0100 SmartEye[1537:205446] [CDVTimer][keyboard] 1.048923ms
2018-11-18 15:38:01.315583+0100 SmartEye[1537:205446] [CDVTimer][splashscreen] 5.586028ms
2018-11-18 15:38:01.321968+0100 SmartEye[1537:205446] [CDVTimer][statusbar] 6.287098ms
2018-11-18 15:38:01.322043+0100 SmartEye[1537:205446] [CDVTimer][TotalPluginStartup] 16.053081ms
2018-11-18 15:38:01.778979+0100 SmartEye[1537:205446] Ionic Native: deviceready event fired after 77 ms

可能是因为我使用了 Cordova 的 ZeroConf 插件,但是在文档中写的是它与 IOS 兼容。

【问题讨论】:

    标签: ios angular xcode cordova ionic-framework


    【解决方案1】:

    在您的 config.xml 文件中更新这些值;

    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="1500" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
     <platform name="ios">
        <preference name="AutoHideSplashScreen" value="false" />
        <preference name="loadUrlTimeoutValue" value="700000" />
    

    【讨论】:

    • 它在 Android 上运行,为什么我应该在 Android 上编辑首选项?
    • 谢谢你有空就试试看:D
    • 用这些改变。
    • 你如何构建你的应用程序? ionic cordova build ios --release?
    • 我用 ionic cordova build ios 构建它 -- --buildFlag="-UseModernBuildSystem=0"
    猜你喜欢
    • 1970-01-01
    • 2021-03-18
    • 1970-01-01
    • 2017-06-15
    • 1970-01-01
    • 2016-06-09
    • 2020-07-12
    • 2021-07-16
    • 1970-01-01
    相关资源
    最近更新 更多