iOS 9 Ionic Cordova应用程序在iPhone上崩溃;适用于iPad

Cordova v5.3.1 / Ionic v1.1.0(库v1.6.4)

从8.4升级我们的应用程序到iOS 9.该应用程序在iPad / iPad mini上构建并运行良好.但是,部署到iPhone时会崩溃.

以下是调试输出

2015-09-23 11:17:09.920 AnApplicaiton[6490:1359695] *** Assertion
failure in -[UIApplication
_cachedSystemAnimationFenceCreatingIfNecessary:],/buildroot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3505.16/UIApplication.m:1697

2015-09-23 11:17:09.926 AnApplication[6490:1359695] *** Terminating
app due to uncaught exception ‘NSInternalInconsistencyException’,
reason: ‘accessing _cachedSystemAnimationFence requires the main
thread’

到目前为止,调试控制台是完全相同的.

解决方法

我不知道真正的原因但是当App有WebView和第三方键盘如Swype时,程序崩溃了.我多次复制这个问题.因此,如果您的应用使用WebView,如Cordova,iAd,Admob,您将看到这些奇怪的崩溃.我不知道如何防止这个问题.它只发生在iOS上,只发生在iPhone上.我的崩溃报告显示iPhone 5s,iPhone 6,iPhone 6 Plus.

编辑:我认为@ Kurt.F给出的代码现在可以解决问题.将以下代码添加到AppDelegate.swift文件中.所有学分都归@ Kurt.F所有

func application(application: UIApplication,shouldAllowExtensionPointIdentifier extensionPointIdentifier: String) -> Bool {

    if extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier {
        return false
    }

    return true

}

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...