More Related Content Similar to Build,Run and manage MobileFirst apps with Eclipse (20) More from Vidyasagar Machupalli (20) Build,Run and manage MobileFirst apps with Eclipse1. © 2016 IBM Corporation 1© 2016 IBM Corporation
Build, run and manage MobileFirst apps
using Eclipse
What’s new in v8.0
5. © 2016 IBM Corporation 5Foundation
Simple, scalable and proven enterprise mobile middleware deployable on-premises
and on Cloud
MobileFirst Foundation
to protect from mobile-
specific threats
Mobile Analytics
App Lifecycle
Management
Backend Logic
Engine
Comprehensive
Security
to better understand
your users
to reduce time and
costs of operations and
incremental updates
to add server-side logic
to your app
essential backend
services that every app
needs
Push &
Offline Sync
6. © 2016 IBM Corporation 6Foundation
Before you begin
Be sure that you have the following prerequisites before you
start the procedure:
• A Mars Java™ EE version of Eclipse, or later.
• Java JRE version 7, or later.
• Node.js version 4.x, or later.
• The Cordova command-line interface, version 6.1.1, or later.
• The IBM MobileFirst Platform Command Line Interface (CLI).
• An internet connection.
7. © 2016 IBM Corporation 7Foundation
Access the MobileFirst Foundation backend
services via SDK, no matter which front-end
framework, codebase, or tools you choose
Providing Consistency with Choice
Your choice of front-end framework and tools
Development
Framework
IDE & Tools
Mobile
App Builder
MobileFirst
Studio
plugins for
Eclipse
Bring-
your-own
Develop in native or
hybrid and integrate
any front-end
framework
Build with any
development tools,
including Xcode,
Android Studio, and
Visual Studio, and
MobileFirst Studio
Plugins for Eclipse
PUSH NOTIFICATIONS
AUTHENTICATION
BUSINESS LOGIC
OFFLINE SYNC
MobileFirst
Foundation
MANAGEMENT
ANALYTICS
SECURITY
MobileFirst in Bluemix
Make good apps great
9. © 2016 IBM Corporation 9Foundation
MobileFirst “Studio” Plug-in
10. © 2016 IBM Corporation 10Foundation
Description
+ This plug-in,along with the third party ThyM plug-in,allow a user to manage their Cordova project and run
specific mfpdev cli commands in Eclipse
+ THyM: Allows the user to manage Cordova apps in Eclipse
+ Create a new Cordova project
+ Import an existing Cordova project
+ Add plugins to your Cordova project
+ Run your project on the appropriate platform
+ IBM MobileFirst Studio: Allows user to run specific mfpdev cli commands on their Cordova project in Eclipse
+ Open server console
+ Preview app
+ Register app
+ Encrypt app
+ Pull app
+ Push app
+ Update app
11. © 2016 IBM Corporation 11Foundation
Support
+ You can no longer create a Legacy Hybrid application with this “Studio”
+ You must be running Eclipse Mars or later
+ You must have cordova-cli 6.1.1 or later installed
• npm install –g cordova
+ You must have the IBM MobileFirst Platform CLI (mfpdev-cli) installed
• npm install –g mfpdev-cli
+ Any log output from cordova, cordova-plugin-mfp or mfpdev will be present
in the Eclipse console pane
• To enable debug level logs in the console:
- Open Eclipse Preferences
- Select MobileFirst Studio Plugins
- Click Enable debug mode, select Apply and then OK
12. © 2016 IBM Corporation 12Foundation
Install
+ Install IBM MobileFirst Studio and THyM 2.0 through the Eclipse Marketplace
• In Eclipse go to Help -> Eclipse Marketplace
• Search for IBM MobileFirst Studio Plug-in and be sure to install the 8.0 version
• Search for THyM and install the 2.0 version
• Must restart Eclipse after installing these
13. © 2016 IBM Corporation 13Foundation
Creating a Cordova project
+ Click File -> New -> Other
+ Expand Mobile and select Hybrid Mobile (Cordova)
Application Project
+ Fill out Project name and click Next
+ Select desired platform
• iOS must be at least 4.1.1
• Android must be at least 5.1.1
• Windows must be at least 4.3.2
*If you don’t have any of the
valid engines, click
Download and select what
you need
14. © 2016 IBM Corporation 14Foundation
Creating a Cordova project
+ Click Finish
+ You can see the log output in the Console pane
+ To install the cordova-plugin-mfp (or any other
plugin), right-click project and select Install
Cordova Plug-in
15. © 2016 IBM Corporation 15Foundation
Importing an Existing Cordova Project
+ Click File -> Import
+ Select Mobile -> Import Cordova Project
+ Click Browse… and select the root directory of the existing Cordova project
+ Ensure the project is selected in the Projects: section and click Finish
+ Note: you must have at least one platform added to the existing Cordova project
or you will get an error when trying to import
+ If the project doesn’t already have the cordova-plugin-mfp, you can add it the
same way as with a new Cordova project
16. © 2016 IBM Corporation 16Foundation
Add New Platform to Project
+ To add a new platform to an already existing project, right-click the
project and select Properties
+ Select Hybrid Mobile Engine
+ Download or select an already cached platform
+ Click OK
17. © 2016 IBM Corporation 17Foundation
Using the MobileFirst CLI Commands
+ Once you have created or imported a Cordova project and added
cordova-plugin-mfp, you can start using the MobileFirst CLI
Commands on your project
+ You access the available commands by right-clicking the project
and selecting IBM MobileFirst Platform Foundation
18. © 2016 IBM Corporation 18Foundation
Using the MobileFirst CLI Commands
+ Example console output from app register
19. © 2016 IBM Corporation 19Foundation
Using the MobileFirst CLI Commands
+ Just like with the mfpdev-cli, the server must be running when
executing these commands through Eclipse
+ If not, you will see some errors like this
20. © 2016 IBM Corporation 20Foundation
Limitations
+ You can’t run cordova prepare through THyM, which is a
command heavily used in a cordova project (updates web resources
for each platform) – again you need to resort back to cordova-cli for
that
• Note: you can do cordova build by running the app (right-click project and select
Run As…) which triggers a cordova prepare