Code Monkey home page Code Monkey logo

eticket's Introduction

Ionic Push Base

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

Tutorial

Prerequisites

node -v
 - should be >= 6.0.0
npm -v
 - should be >= 3.0.0
  • For iOS, update XCode version to 8.0 or higher
  • Install cocoapods, required by latest version of phonegap-push-plugin
sudo gem install cocoapods
pod setup

Getting Started

  • 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

Android

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

iOS

    $ 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

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

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   

eticket

eticket's People

Contributors

aggarwalankush avatar

Watchers

Cheng THAO 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.