简体   繁体   中英

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.

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.

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM