Let's code

Follow the below steps to create the example app:

  1. Now, create a new MyiOSPush app using the blank template, as shown, and go to the MyiOSPush folder:
$ ionic start MyiOSPush blank
$ cd MyiOSPush
  1. Install the Cordova plugin and Ionic Native wrapper for OneSignal:
$ ionic cordova plugin add onesignal-cordova-plugin$ npm install --save @ionic-native/onesignal

We need to add this ionic-native plugin to app.module.ts.

  1. We also need to install cocoapods. Go to Terminal, and install it as follows:
sudo gem install cocoapodspod repo update
  1. Open and edit ./src/app/app.module.ts with the following content:
import { BrowserModule } from '@angular/platform-browser';import { ErrorHandler, NgModule } from '@angular/core';import { IonicApp, ...
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.102.6