Ionic Push Notifications Base App for iOS and Android
This can be used as base template for Ionic Push apps. Itβs working for both iOS and Android Push Notifications.
node
and npm
node -v
- should be >= 6.0.0
npm -v
- should be >= 3.0.0
sudo gem install cocoapods
pod setup
Clone this repository
Install Ionic, cordova and node_modules
$ npm install -g ionic cordova
$ npm install
Generate SENDER_ID using this tutorial π
Replace YOUR_SENDER_ID in config.xml and app.ts with above SENDER_ID
$ ionic cordova platform add android
$ ionic cordova build android
$ ionic cordova run android
$ ionic cordova platform add ios
$ ionic cordova build ios
Run using XCode
####Use device token printed in console for push notifications using below server code
Android
iOS
Push Notifications Server code ππ
It has server code used to send Push Notification to iOS and Android device.
ionic-push-base/
|-- src/
| |-- app/
| | βββ app.ts
| | βββ app.module.ts
| | βββ main.ts
| |
| |-- pages/ * Contains all of our pages
β β βββ details/ * Push Details tab page
β β β βββ detail.html * DetailsPage template
β β β βββ detail.ts * DetailsPage code
β β β
β β βββ home/ * Home page
β β β βββ home.html * HomePage template
β β β βββ home.ts * HomePage code
β β β
β β βββ tabs/ * Tabs page
β β β βββ tabs.html * TabsPage template
β β β βββ tabs.ts * TabsPage code
β β β
β βββ theme/ * App theme files
| | βββ variables.scss * App Shared Sass Variables
| |
| |-- index.html
| |-- manifest.json
| |-- service-worker.js
|
βββ .editorconfig * Defines coding styles between editors
βββ .gitignore * Example git ignore file
βββ LICENSE * MIT License
βββ README.md * This file
βββ config.xml * Cordova configuration file
βββ ionic.config.json * Ionic configuration file
βββ package.json * Defines our JavaScript dependencies
βββ tsconfig.json * Defines the root files and the compiler options
βββ tslint.json * Defines the rules for the TypeScript linter