cordovaionic-frameworkibm-mobilefirstmobilefirst-adapters

Cordova MFP plugin


I am working on a project which require IBM MobileFirst as an integral part of the application so, trying to invoke the function Wl.send(), to make a connection to the database but seems in the new cordova-plugin-mfp it has been deprecated, please suggest me the alternate of this function or the new invoking procedure of this function.

here are my ionic info and plugin details with MobileFirst Veriosn 8.0

@ionic/cli-utils  : 1.10.2
ionic (Ionic CLI) : 3.10.3

local packages:

@ionic/app-scripts : 2.1.4
Ionic Framework    : ionic-angular 3.6.1

System:

Node : v6.10.3
npm  : 3.10.10
OS   : Windows 8.1
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-dialogs 1.3.3 "Notification"
cordova-plugin-globalization 1.0.7 "Globalization"
cordova-plugin-mfp 8.0.2017090705 "IBM MobileFirst Platform Foundation"
cordova-plugin-mfp-push 8.0.2017082110 "IBM MobileFirst Platform Foundation - Push Notifications"
cordova-plugin-okhttp 2.0.0 "OkHttp"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Below is the code we are using to connect to data base

   var resourceRequest = new WLResourceRequest("adapters/SQLAdapter/unprotected", WLResourceRequest.GET);

   console.log(resourceRequest);
   resourceRequest.send().then((response) => {
     console.log("Here I am in...");
       console.log(response.responseText);
     },(error) => { 
       console.log("error in function:-");
       console.log(error);
   });

Error in the code is :-

Error:--- ERROR TypeError: Cannot read property 'getItem' of undefined at __WLDAO.getItem (ibmmfpf-preview.js:8285) at getItemFromMap () – 

Solution

  • try to downgrade the cordova-plugin-mfp and then try to invoke it, seems they have not released the document. I am working with cordova-plugin-mfp

    8.0.2017072706

    try with it