title: Ionic app crashes on iOS 12.2 because of '_alwaysRunsAtForegroundPriority'
body: <p>On iOS 12.2 my app is terminated just after startup, with this message in xcode: </p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _alwaysRunsAtForegroundPriority.'</p>
  </blockquote>
  
  <p>Anyone who can point me in the right direction for this one? I see that there has been some warnings about this earlier: </p>
  
  <p><a href="https://stackoverflow.com/questions/54373661/how-to-resolve-app-validation-the-app-references-non-public-selectors-in-payloa/54473795?noredirect=1#comment95755945_54473795">How to resolve app validation &quot;The app references non-public selectors in Payload/MyApp.app/MyApp: _setAlwaysRunsAtForegroundPriority:&quot;?</a></p>
  
  <p>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 :) </p>
  
  <p>Thanks in advance for any help.</p>
  
  <p>Lars</p>
  
  <p><strong>Update Feb 2nd 2019:</strong> 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. </p>
  
  <p><strong>Update Feb 5th 2019:</strong>
  @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)</p>
  
  <p>I'll post my ionic info, if that can provide you with any helpful information. </p>
  
  <blockquote>
    <p>Ionic:</p>
    
    <p>ionic (Ionic CLI)  : 4.9.0 (/usr/local/lib/node_modules/ionic)<br>
    Ionic Framework    : ionic-angular 3.9.2    @ionic/app-scripts : 3.2.1</p>
    
    <p>Cordova:</p>
    
    <p>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)</p>
    
    <p>System:</p>
    
    <p>ios-deploy : 1.9.2    NodeJS     : v8.11.1 (/usr/local/bin/node)<br>
    npm        : 6.4.1    OS         : macOS Mojave    Xcode      : Xcode
    10.1 Build version 10B61</p>
  </blockquote>
  
  <p><strong>Update Feb 2nd (again)</strong> </p>
  
  <p>My plugins:</p>
  
  <p>cordova-android-firebase-gradle-release 1.0.2 "cordova-android-firebase-gradle-release"<br>
  cordova-android-play-services-gradle-release 1.4.3 "cordova-android-play-services-gradle-release"<br>
  cordova-android-support-gradle-release 1.4.4 "cordova-android-support-gradle-release"<br>
  cordova-plugin-app-version 0.1.9 "AppVersion"<br>
  cordova-plugin-background-mode 0.7.2 "BackgroundMode"<br>
  cordova-plugin-badge 0.8.7 "Badge"<br>
  cordova-plugin-camera 4.0.3 "Camera"<br>
  cordova-plugin-console 1.1.0 "Console"<br>
  cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"<br>
  cordova-plugin-device 2.0.2 "Device"<br>
  cordova-plugin-file 6.0.1 "File"<br>
  cordova-plugin-file-transfer 1.7.1 "File Transfer"<br>
  cordova-plugin-geolocation 4.0.1 "Geolocation"<br>
  cordova-plugin-ionic 5.2.9 "cordova-plugin-ionic"<br>
  cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"<br>
  cordova-plugin-ionic-webview 2.3.2 "cordova-plugin-ionic-webview"<br>
  cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"<br>
  cordova-plugin-mauron85-background-geolocation 3.0.0-alpha.49 "CDVBackgroundGeolocation"<br>
  cordova-plugin-network-information 2.0.1 "Network Information"<br>
  cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"<br>
  cordova-plugin-splashscreen 5.0.2 "Splashscreen"<br>
  cordova-plugin-vibration 3.1.0 "Vibration"<br>
  cordova-plugin-whitelist 1.3.3 "Whitelist"<br>
  cordova-support-google-services 1.1.0 "cordova-support-google-services"<br>
  cordova.plugins.diagnostic 4.0.7 "Diagnostic"<br>
  ionic-plugin-keyboard 2.2.1 "Keyboard"<br>
  phonegap-plugin-push 2.1.3 "PushPlugin"</p>