0

I have implemented mobile-first non-secure direct update feature by following this document in IONIC project.

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/direct-update/

When I push an update using MFP server, It gives a popup in application to download it. It's working fine in Android.

In IOS, After finishing of update, changes are not getting reflected in application. On next adapter call it again shows me update popup and it's going in loop.

Error after finish of update :-

Failed to load webpage with error: The URL can’t be shown

If I kill the application and open again, it's started working with pushed changes.

Mobilefirst plugin works fine with cordova project but with ionic project it gives above error. And plugin cordova-plugin-ionic-webview cause this issue.

MobileFirst server version :- 8.0.0.00-20180220-083852
MobileFirst Cordova(plugin) version :- 8.0.0.00-20180227-121751
iPhone IOS version :-10.3.2
Ionic version :- 3.8.0
Cordova version :- 6.5.0

Permissions in config :-

 <access origin="*" />
 <allow-navigation href="http://*/*" />
 <allow-navigation href="*" />
 <allow-intent href="http://*/*" />
 <allow-intent href="https://*/*" />
parth.hirpara
  • 542
  • 3
  • 19

2 Answers2

0

Ionic packs "WKWebview" which on iOS causes direct update not to work. This is a known limitation.

The resolution is to run the following command:

cordova plugin add https://github.com/apache/cordova-plugins.git#master:wkwebview-engine-localhost

More details here.

Vivin K
  • 2,681
  • 1
  • 11
  • 14
-1

Update your ionic project with latest Cordova MFP Plugin by running following command.

ionic cordova plugin add cordova-plugin-mfp@latest.

This should resolve the issue which you are facing.

Vittal Pai
  • 3,317
  • 25
  • 36
  • cordova-plugin-mfp plugin is already latest. Is it a know issue of Mobilefirst with any cordova-plugin-mfp? – parth.hirpara Jan 31 '18 at 12:11
  • 1
    Your cordova mfp plugin version is `8.0.2017102403` which is not latest. Latest MFP plugin is `8.0.2018012409` which you can check [here](https://www.npmjs.com/package/cordova-plugin-mfp) – Vittal Pai Feb 01 '18 at 06:39
  • I have installed latest version of server as well mfp-cordova plugin but facing same error. . – parth.hirpara Mar 15 '18 at 12:40