Ionic 2: Stop iOS app immediately restarting after using app switcher

I recently updated to the CLI 3 for Ionic 2 and now my app immediately restarts (splash screen etc) if I switch to another app then back again on iOS. Testing on iPhone 5 iOS 8.x. My app is very lightweight, only 2 pages FYI.

Q) Any ideas why this is happening and how I can stop it? I don’t know if the CLI is a red herring or not btw.

This does not happen on Android.

Things I’ve done:

  • Removed iOS platform
  • Re added iOS platform
  • rebuilt to phone (having deleted first)
  • reboot phone
  • only switching to lightweight app, e.g. photos or mail. i.e. not ram consuming.

Here’s my config.xml just in case:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.rareprominence.addvideo2" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>AddVideo2</name>
  <description>Add Video app to capture user generated content.</description>
  <author email="info@rareprominence.com" href="http://rareprominence.com">Rare Prominence</author>
  <content src="index.html"/>
  <plugin name="cordova-plugin-whitelist" spec="1"/>
  <plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
  <plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
  <plugin name="cordova-plugin-console" spec="1.0.5"/>
  <plugin name="cordova-plugin-statusbar" spec="2.2.1"/>
  <plugin name="cordova-plugin-device" spec="1.1.4"/>
  <plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
  <plugin name="cordova.plugins.diagnostic" spec="~3.4.1"/>
  <plugin name="cordova-plugin-camera" spec="~2.3.1">
    <variable name="CAMERA_USAGE_DESCRIPTION" value=" "/>
    <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" "/>
  </plugin>
  <plugin name="nl.x-services.plugins.videocaptureplus" spec="https://github.com/EddyVerbruggen/VideoCapturePlus-PhoneGap-Plugin.git"/>
  <plugin name="cordova-library-helper" spec="https://github.com/FlyingDonkeyDev/cordova-library-helper.git"/>
  <plugin name="cordova-plugin-headercolor" spec="~1.0"/>
  <plugin name="com.hutchind.cordova.plugins.streamingmedia" spec="~0.1.4"/>
  <plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine.git"/>
  <plugin name="cordova-plugin-media-capture" spec="~1.4.2">
    <variable name="CAMERA_USAGE_DESCRIPTION" value=" "/>
    <variable name="MICROPHONE_USAGE_DESCRIPTION" value=" "/>
    <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" "/>
  </plugin>
  <access origin="https://add.video/*"/>
  <access origin="https://qrmd3sah5f.execute-api.eu-west-1.amazonaws.com/signing/signing"/>
  <access origin="https://b5n1vv2t0g.execute-api.eu-west-1.amazonaws.com/prod/zencoder"/>
  <access origin="https://ssl.gstatic.com/*"/>
  <access origin="https://api.backand.com/*"/>
  <allow-navigation href="http://ionic.local/*"/>
  <allow-navigation href="http://192.168.1.20:8100"/>
  <allow-navigation href="http://192.168.0.64:8100"/>
  <allow-intent href="http://*/*"/>
  <allow-intent href="https://*/*"/>
  <allow-intent href="tel:*"/>
  <allow-intent href="sms:*"/>
  <allow-intent href="mailto:*"/>
  <allow-intent href="geo:*"/>
  <platform name="android">
    <allow-intent href="market:*"/>
    <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png"/>
    ...
  </platform>
  <platform name="ios">
    <allow-intent href="itms:*"/>
    <allow-intent href="itms-apps:*"/>
    <icon src="resources/ios/icon/icon.png" width="57" height="57"/>
    ...
  </platform>
  <preference name="HeaderColor" value="#1F1F1F"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="android-minSdkVersion" value="16"/>
  <preference name="BackupWebStorage" value="none"/>
  <preference name="ShowSplashScreen" value="true"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="30000"/>
  <preference name="AutoHideSplashScreen" value="false"/>
  <preference name="SplashShowOnlyFirstTime" value="false"/>
  <preference name="FadeSplashScreen" value="false"/>
  <preference name="windows-target-version" value="10.0"/>
  <feature name="StatusBar">
    <param name="ios-package" onload="true" value="CDVStatusBar"/>
  </feature>
  <feature name="SplashScreen">
    <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen"/>
  </feature>
  <engine name="windows" spec="~4.4.3"/>
  <engine name="ios" spec="~4.3.1"/>
</widget>

And here’s my system info:

Your system information:

Cordova CLI: 6.5.0 
Ionic Framework Version: 2.2.0
Ionic CLI Version: 3.0.0-beta.4
ios-deploy version: 1.9.1 
ios-sim version: 5.0.8 
OS: OS X El Capitan
Node Version: v6.10.0
Xcode version: Xcode 8.2.1 Build version 8C1002

For anyone having this problem, it’s the inclusion of the cordova-plugin-wkwebview-engine plugin.
Remove it from the project using the CLI with the command below and this will be resolved:

ionic cordova:plugin remove cordova-plugin-wkwebview-engine --save

I think this is a bug: