Make sure you install the following tools and libraries.
-
You should already have Node.js/npm and the Cordova package installed. If you don't, you can download and install Node from https://nodejs.org/en/download/.
-
The Ionic CLI tool is also required. You can find instructions to install Ionic Cordova and set up your Cordova app at http://ionicframework.com/docs/cli/.
- Make sure you are using Cordova version is 6.3.0 or below.
-
You should have Cocoapods installed. If you don't, you can download and install Cocoapods from http://cocoapods.org/
To create a Cordova application, use the Cordova Plugin for the IBM Bluemix Mobile Services Core SDK:
- Create a Cordova application
- Add Cordova platforms
- Add Cordova plugin
- Configure your platform
-
Run the following commands to create a new Cordova application. Alternatively you can use an existing application as well.
$ ionic start Domenow blank $ cd Domenow && ls
-
Edit the
config.xml
file and set the desired application name in the<name>
element instead of a default HelloCordova. -
Continue editing
config.xml
Run the following commands for the platforms that you want to add to your Cordova application:
ionic platform add ios
ionic platform add android
Run the following command from your Cordova application's root directory to add the bms-core plugin:
ionic plugin add cordova-plugin-console
ionic plugin add cordova-plugin-dialogs
ionic plugin add cordova-plugin-inappbrowser
ionic plugin add bms-push
You can check if the plugin installed successfully by running the following command, which lists your installed Cordova plugins:
ionic plugin list
Note: Before you begin, make sure that you are using Xcode 7 or above.
-
Run
cordova prepare ios
to prepare the Cordova application with the necessary CocoaPod dependencies. -
Build and run your application with Xcode or by running the following command:
ionic build ios
-
Build your Android project by running the following command:
ionic build android
Important: Before opening your project in Android Studio, you must first build your Cordova application through the Cordova commmand-line interface (CLI). Otherwise, you will encounter build errors.
-
bms-clientsdk-cordova-plugin-push https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push
-
bms-clientsdk-cordova-plugin-core https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core
- Initial release
Copyright 2017 MobileTarget.
You may not use this file except in compliance with the License.