iOS 9 Ionic Cordova应用程序在iPhone上崩溃;适用于iPad [英] iOS 9 Ionic Cordova App Crashes on iPhone; works on iPad

查看:539
本文介绍了iOS 9 Ionic Cordova应用程序在iPhone上崩溃;适用于iPad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

Upgraded our application to iOS 9 from 8.4. The application builds and runs fine on iPad/iPad mini. However, it crashes when deployed to an iPhone.

以下是调试输出:


2015-09-23 11: 17:09.920 AnApplicaiton [6490:1359695] ***断言
失败 - [UIApplication
_cachedSystemAnimationFenceCreatingIfNecessary:],/ BuildRoot / Library / People / com.apple.xbs / Source / UIKit_Sim / UIKit-3505.16 /UIApplication.m:1697

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] ***由于未捕获的异常而终止
app 'NSInternalInconsistencyException',
原因:'访问_cachedSystemAnimationFence需要主
线程'

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

调试控制台完全相同到目前为止。

The debug console is identical up to this point.

推荐答案

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

I don't know the real reason but when the App has WebView and third party keyboard such as Swype, program crashes. I replicated the issue many times. So if your app uses WebView such as Cordova, iAd, Admob you will see these weird crashes. I don't know how to prevent this issue. It only happens on iOS and only on iPhones. My crash reports show iPhone 5s, iPhone 6, iPhone 6 Plus.

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

I think code given by @Kurt.F can fix the issue for now. Add following code to your AppDelegate.swift file. All credits go to @Kurt.F

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

    if extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier {
        return false
    }

    return true

}

这篇关于iOS 9 Ionic Cordova应用程序在iPhone上崩溃;适用于iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆