This is a project to show different functionality of Twilio Notify and Ionic 2. It consists of a Node.js server and an Ionic app.
- Node.js
- A Twilio Account - Sign up here
- Access to the Notify Developer Preview - Apply here
- Ngrok for exposing your localhost to the public and Twilio
- For the iOS Application you will need a Apple Developer Account and Xcode installed
- For Android you will need a Google Developer Account and the Android Studio tools
- Install the Ionic (v2 or higher) command-line tool
npm install ionic cordova phonegap -g-
Get the necessary push credentials for iOS and Android. Guide for iOS | Guide for Android
-
Create a Twilio Notify Service
- Go into
server/and install the Node.js dependencies
cd server && npm install- Copy the
.env.exampleinto.env
cp .env.example .env-
Configure
.envwith the necessary values for your account -
Start the server by running
node .- Run in a separate window
ngrokto expose the server to the public and note down the URL for later
ngrok http 3000- Navigate in a separate terminal window into the
ionic/directory and install the dependencies
cd ionic && npm install
ionic state restore- Copy the config from the app
cp src/app/config.example.ts src/app/config.ts-
Configure the
config.tsfile by filling out theregistrationServerandsenderIDvalues. -
Build the app for the different platfroms by running
ionic build-
To deploy to iOS or Android open the respective projects in the
platform/folders. -
For more Ionic commands check out the documentation for the Ionic CLI
If you have any questions, feel free to shoot me an email to dkundel@twilio.com
MIT
Dominik Kundel dominik.kundel@gmail.com