Use the existing push sdk as reference: https://github.com/aerogear/aerogear- ios android -sdk/ blob tree /master/ modules/ push/ src . What is does is quite simple: make a HTTP post request to the register endpoint of the UPS server and provide some information about the app. So the main work involved in this one includes:
1. Add a http client lib. I suggest we use https://github.com/Alamofire/Alamofire. 2. Get the push server configuration from the config file. 3. On app start, try to enable push notification service. If user approves, call the UPS device registration endpoint to register the device. 4. if the app is started via a push message, show the push message on app start in a dialog.
|
|