A hybrid Cordova mobile app with Push and Analytics in minutes

5 min read

A hybrid Cordova mobile app with Push and Analytics in minutes

As promised while introducing “Tutorials to get your mobile development up and running“, we are continuing our efforts to add more mobile solution tutorials. After quickly scaffolding a native iOS-Swift and Androidmobile app with Push and Analytics, it’s time to bring in the hybrid mobile app development flavor to the game with Cordova – Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies – HTML5, CSS3, and JavaScript for cross-platform development.

Following the solution tutorial, you will learn how easy it is to quickly create a Hybrid Cordova application with high-value mobile services like push notifications and mobile analytics on IBM Cloud.

The tutorial walks you through the creation of a mobile starter application, adding mobile services, setting up client SDKs, downloading the scaffolded code and then further enhancing the application.

Objectives

  • Create a mobile project with Push Notifications and Mobile Analytics services.

  • Learn how to obtain APNs and FCM credentials.

  • Download the code and complete required setup.

  • Instrumenting the app to use mobile analytics.

  • Configure, send, and monitor push notifications.

  • Monitoring the app with mobile analytics.

    Objectives

Products

This tutorial uses the following products:

Before you begin

  • Cordova CLIExternal link icon for executing Cordova commands.

  • Cordova-iOS PrerequisitesExternal link icon and Cordova-Android PrerequisitesExternal link icon

  • Google account to log into Firebase console for Sender ID and Server API Key.

  • Apple DevelopersExternal link icon account to send remote notifications from Push Notifications service instance on IBM Cloud (the provider) to iOS devices and applications.

  • Xcode and Android Studio for importing and further enhancing your code.

Create Cordova mobile project from starter kit

The IBM Cloud Mobile Dashboard allows you to fast-track your mobile app development by creating your project from a Starter Kit.

  1. Navigate to Mobile Dashboard.

  2. Click on Starter Kits and scroll down to select the Basic Starter Kit.

    mobile starter kit

  3. Enter a project name, this can be your app name as well.

  4. Select Cordova as your language and check the mobile services in the right pane.

    Cordova

  5. Click on Create Project to scaffold a Cordova (Javascript) App.

  6. A new Project will be created under Projects tab on the left pane.

    Note: Push Notifications, and Mobile Analytics Services should be added to the Basic Starter.

In the next step, you will download the scaffolded code and complete the required setup.

Click here for complete solution tutorial

 

Be the first to hear about news, product updates, and innovation from IBM Cloud