Git Product home page Git Product logo

ionic2-push-base's Introduction

Ionic 2 Push Base

This can be used as base template for Ionic 2 Push apps. It's working for both iOS and Android Push Notifications.

Tutorial

Getting Started

  • Clone this repository

  • Install Ionic, cordova and node_modules

    $ npm install -g ionic
    $ sudo npm install -g [email protected]
    $ npm install
  • Generate SENDER_ID using this tutorial ๐Ÿ‘

  • Replace YOUR_SENDER_ID in config.xml and app.ts with above SENDER_ID

Android

    $ ionic platform add android
    $ ionic build android
    $ ionic run android

iOS

    $ ionic platform add ios
    $ ionic build ios
Run using XCode

####Use device token printed in console for push notifications using below server code

Push Notifications Preview in lock screen and while using App

  • Android

    Notification on Lock Screen Notification While Using App
  • iOS

    Notification on Lock Screen Notification While Using App

Server Code

Push Notifications Server code ๐ŸŽ‰๐Ÿ‘ It has server code used to send Push Notification to iOS and Android device.

File Structure of App

ionic2-push-base/
|-- src/
|    |-- app/
|    |    โ”œโ”€โ”€ app.ts
|    |    โ””โ”€โ”€ app.module.ts
|    |    โ””โ”€โ”€ main.dev.ts
|    |    โ””โ”€โ”€ main.prod.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   

ionic2-push-base's People

Contributors

aggarwalankush avatar

Watchers

James Cloos avatar Johnson Chetty avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.