Karthik Sridharan
Karthik Sridharan

Reputation: 541

How to use same code for Mobile and Web in IBM MFP 8.0

I am a fresher in IBM Mobile first. I need to know How to use one code for mobile and web application.

I have created an IBM MFP Cordova project. My client asking to use the sample Cordova project to the browser(web). I have tried to add the platform for the browser using

cordova platform add browser

But IBM MFP 8.0 plugin not working for the browser.

Please given solution.

Thanks, Karthik S.

Upvotes: 0

Views: 170

Answers (2)

maggix
maggix

Reputation: 3278

The MFP SDK is compatible with cordova browser platform since late 2017: https://mobilefirstplatform.ibmcloud.com/blog/2017/09/07/cordova-browser-compatibility-with-MFP/

Depending on whether you want to build a full cross-platform app (browser+app) from the same codebase, you may have to add some cordova hooks to replace some calls to certain functions, as for example the Analytics libraries or the JSONStore SDK are not available on the browser (or their names) differ.

We tried on a Ionic v1 application and the same code of the app works in browsers (Chrome, Firefox, Opera, Safari, Edge, but not IE).

Upvotes: 1

Srik
Srik

Reputation: 7965

At this moment, the MobileFirst plugin for Cordova does not yet support the browser platform. You can use the MobileFirst Web SDK for web apps.

Upvotes: 2

Related Questions