简体   繁体   中英

Convert Phonegap Project to IBM Worklight Project

I have designed Phonegap app by using jQuery Mobile. Now iam having complete project from Phonegap+jQueryMobile.

Now iam learning IBM Worklight, So i need to convert this project into IBM Worklight project.

What are the steps i have to follow?

Cant i do straight forward?

Provide the steps to do the project in IBM Worklight..

You may select to upgrade straight to MobileFirst Platform 7.1 which introduced support for Cordova applications, meaning your upgrade path is even more minimal. See more here: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/hello-world/integrating-mfpf-sdk-in-cordova-applications/

You will only need to copy your web resources to the new app and that is all. All remains the same, with the added value of now beng

Alternatively, Worklight/MobileFirst Platform Classic Hybrid apps come bundled with Cordova, to the basic step to take is to simply copy over your web resources (HTML, JS, CSS) into the Hybrid project generated for you using MobileFirst Studio.

  1. Install the MobileFirst Studio plug-in for Eclipse.
  2. Create a new Hybrid project and application and add any required environment ("platforms" in Cordova lingo) such as Android or iPhone
  3. The application structure will be familiar to you.

    • Copy your HTML to the provided common\\index.html - be careful not to override it(!) but rather add the missing pieces to it:
    • the jQuery references are needed
    • the cordova.js reference is not needed
    • Copy the CSS to common\\css
    • Copy the JS to common\\js
    • Adjust any paths such as to the files of jQuery Mobile (easiest would be to place it in the common\\js folder, but you can later tweak this)

That should be about it in general. Now simply build your app by right-clicking the app folder and selecting Run As > Run on MobileFirst Development Server and preview your app.

If you have Cordova plug-ins that will be more challenging.

I suggest that you will first learn about developing MobileFirst apps before attempting to migrate an existing app. See more here: https://developer.ibm.com/mobilefirstplatform

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