Setting up push notifications requires these steps:
- Install the AppPush extension
- Setup the Google API for Android, and/or Push certificates for iOS
- Setup and configure a Pushwoosh account
- Configure AppPush settings
- Test on a device
1. Installing the AppPush extension
Upload AppPush by logging into your WordPress admin, and going to Plugins => Add New => Upload. Upload the .zip file and activate.
You can also upload the unzipped plugin folder via FTP to wp-content/plugins.
2. Setup the Google API for Android, and certificates for iOS
iOS requires setting up extra certificates for push notifications. We recommend that you test first with Android, and once that is working, move on to iOS.
3. Pushwoosh Setup
Next, you will need to sign up for an account with Pushwoosh.
Please view our Pushwoosh setup docs here.
The free plan is limited, if you want access to rich pushes, custom urls, and other features, you must upgrade to the Premium plan.
Please note: If you are using AppPresser 2, you must select "Pushwoosh" as the SDK, not "AppPresser."
Why do I need Pushwoosh?
Push notifications require a 3rd party server to send the message to the devices. Using your WordPress server for this purpose is not ideal, and does not come with the added features provided by Pushwoosh.
4. Configure AppPush
Next, you must add the information from steps 2 & 3 to the AppPush settings.
5. Test on a Device
You should be all set, it's time to test on a device.
Build your app in Phonegap Build. For Android, you don't need to do anything extra, but for iOS you will need to upload the new push notification certificates, and then rebuild the app.
We recommend testing on Android first, and if it's working, move on to iOS. That way if you run into an issue, you will know if the problem is with your iOS certificates.
Once you have activated AppPush, you will have a new tab available in your AppPresser settings area. There you will have five fields.
- License Key
- Pushwoosh App Code
- Pushwoosh API Token
- Google API Project Number (Android only)
- Push Post Types.
The License key field will be where you provide the license key that you got with your AppPush purchase.
The Pushwoosh App Code and API token will be provided to you by your enrollment with Pushwoosh. You can find that information in your account there.
If you are developing for Android devices, you'll need to provide your API Project number which you can get from your account with Google.
Lastly you can specify which post types you'd like to be able to use your AppPush notifications.
Sending Push Notifications
Custom Push Notifications
For developers - how to send custom notifications using action hooks and filters.
Testing Push Notifications
Push notifications do not work in the iOS emulator, you need to test on a provisioned device. You can do this by scanning the QR code on Phonegap Build after building your app.
You can test Android on a device without any special provisioning. To test in the Android emulator is a little more complicated, you need to use Google APIs as the target.
Troubleshooting Push Notifications
If things are not working, please double check you did the following (see videos above for details on each step):
- Install AppPresser and the AppPush extension on your site
- Add Push Plugin to your Phonegap build files before building
- iOS - create push notification certificates, add them to Phonegap Build
- Android - setup GCM messaging API
- Get account at PushWoosh
- Configure iOS and Android in Pushwoosh
- Add PushWoosh app ID, Google API, and optionally PushWoosh API keys to the AppPush settings
Sometimes it takes up to an hour for your device to register, so please wait at least an hour before contacting us.
Sending Android push notifications in AppPresser
This is Android only, but Jeff Matson, one of our customers, wrote up a tutorial about setting up and sending push notifications with AppPresser and AppPush