由于“_alwaysRunsAtForegroundPriority",Ionic 应用程序在 iOS 12.2 上崩溃 [英] Ionic app crashes on iOS 12.2 because of '_alwaysRunsAtForegroundPriority'

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

问题描述

在 iOS 12.2 上,我的应用在启动后立即终止,xcode 中显示以下消息:

On iOS 12.2 my app is terminated just after startup, with this message in xcode:

由于未捕获的异常NSUnknownKeyException"而终止应用,原因:[setValue:forUndefinedKey:]:此类不符合键 _alwaysRunsAtForegroundPriority 的键值编码."

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _alwaysRunsAtForegroundPriority.'

谁能为我指出正确的方向?我看到之前有一些警告:

Anyone who can point me in the right direction for this one? I see that there has been some warnings about this earlier:

如何解决应用验证问题"应用引用 Payload/MyApp.app/MyApp 中的非公共选择器:_setAlwaysRunsAtForegroundPriority:"?

该帖子的答案是,这是来自 webview 的安全警告,可以忽略.但是当它让我的应用程序崩溃时,它真的不能再被忽视了:)

The answer to that post is that it's a security warning from webview that can be ignored. But when it's crashing my app, it can't really be ignored anymore :)

提前感谢您的帮助.

拉尔斯

2019 年 2 月 2 日更新:看起来是导致错误的 cordova-plugin-background-mode .但我必须承认我不知道如何解决这个问题.当我从我的项目中删除该插件时它可以工作.但我需要那个插件,或者至少需要后台模式功能,所以我需要以某种方式解决这个问题.

Update Feb 2nd 2019: It looks like it's the cordova-plugin-background-mode that causes the error. But i must admit that i have no idea how to fix that. It works when i remove that plugin from my project. But i need that plugin, or at least the background-mode functionality, so i need to fix this, somehow.

2019 年 2 月 5 日更新:@coderroggie:我也有 cordova-plugin-ionic-webview 插件的 2.3.2 版本.奇怪的是,它仅在删除cordova-plugin-background-mode(版本0.7.2)时才对我有用

Update Feb 5th 2019: @coderroggie: I also have the version 2.3.2 of the cordova-plugin-ionic-webview plugin. It's strange that it works for me only when removing the cordova-plugin-background-mode (version 0.7.2)

如果可以为您提供任何有用的信息,我将发布我的 ionic 信息.

I'll post my ionic info, if that can provide you with any helpful information.

离子:

离子(离子 CLI):4.9.0(/usr/local/lib/node_modules/ionic)
离子框架:离子角 3.9.2 @ionic/app-scripts:3.2.1

ionic (Ionic CLI) : 4.9.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.1

科尔多瓦:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova平台:ios 4.5.5 Cordova 插件:科尔多瓦插件离子 5.2.9,科尔多瓦插件离子键盘 2.1.3,cordova-plugin-ionic-webview 2.3.2,(和其他 22 个插件)

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : ios 4.5.5 Cordova Plugins : cordova-plugin-ionic 5.2.9, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 22 other plugins)

系统:

ios 部署:1.9.2 NodeJS:v8.11.1 (/usr/local/bin/node)
npm:6.4.1 操作系统:macOS Mojave Xcode:Xcode10.1 构建版本 10B61

ios-deploy : 1.9.2 NodeJS : v8.11.1 (/usr/local/bin/node)
npm : 6.4.1 OS : macOS Mojave Xcode : Xcode 10.1 Build version 10B61

2 月 2 日更新(再次)

我的插件:

cordova-android-firebase-gradle-release 1.0.2 cordova-android-firebase-gradle-release"
cordova-android-play-services-gradle-release 1.4.3 cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 1.4.4 cordova-android-support-gradle-release"
cordova-plugin-app-version 0.1.9 "AppVersion"
科尔多瓦插件背景模式 0.7.2 背景模式"
科尔多瓦插件徽章 0.8.7 徽章"
科尔多瓦插件相机 4.0.3 相机"
科尔多瓦插件控制台 1.1.0 控制台"
cordova-plugin-customurlscheme 4.3.0 自定义 URL 方案"
cordova-plugin-device 2.0.2设备"
科尔多瓦插件文件 6.0.1 文件"
cordova-plugin-file-transfer 1.7.1 文件传输"
cordova-plugin-geolocation 4.0.1 地理位置"
科尔多瓦插件离子 5.2.9 科尔多瓦插件离子"
cordova-plugin-ionic-keyboard 2.1.3 cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.3.2 cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 LocalNotification"
cordova-plugin-mauron85-background-geolocation 3.0.0-alpha.49 "CDVBackgroundGeolocation"
cordova-plugin-network-information 2.0.1 网络信息"
cordova-plugin-safariviewcontroller 1.5.4 SafariViewController"
cordova-plugin-splashscreen 5.0.2启动画面"
科尔多瓦插件振动 3.1.0 振动"
cordova-plugin-whitelist 1.3.3 白名单"
科尔多瓦支持谷歌服务 1.1.0 科尔多瓦支持谷歌服务"
cordova.plugins.diagnostic 4.0.7诊断"
ionic-plugin-keyboard 2.2.1 键盘"
phonegap-plugin-push 2.1.3 PushPlugin"

cordova-android-firebase-gradle-release 1.0.2 "cordova-android-firebase-gradle-release"
cordova-android-play-services-gradle-release 1.4.3 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 1.4.4 "cordova-android-support-gradle-release"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-background-mode 0.7.2 "BackgroundMode"
cordova-plugin-badge 0.8.7 "Badge"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-ionic 5.2.9 "cordova-plugin-ionic"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.3.2 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-mauron85-background-geolocation 3.0.0-alpha.49 "CDVBackgroundGeolocation"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-vibration 3.1.0 "Vibration"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-support-google-services 1.1.0 "cordova-support-google-services"
cordova.plugins.diagnostic 4.0.7 "Diagnostic"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 2.1.3 "PushPlugin"

推荐答案

在插件中,底部有一个setValue",可以破坏应用程序.得到了 12.2 的构建.试试

In the plugin there's a 'setValue' towards the bottom that nukes the app. Got a build going for 12.2. Try

ionic cordova plugin add https://github.com/iowayankee/cordova-plugin-background-mode.git

package.json

package.json

    "cordova-plugin-background-mode": "git+https://github.com/iowayankee/cordova-plugin-background-mode.git",

config.xml

    <plugin name="cordova-plugin-background-mode" spec="git+https://github.com/iowayankee/cordova-plugin-background-mode.git" />

希望至少可以帮助某人进行构建

Hopefully helps someone at least get the build going

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

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