If you're generating an iOS mobile app using a production certificate, you won't need to specify any preference, since the default value of the aps- environment preference in OutSystems is production.
Your application is now ready to receive push notifications. Configure and generate your mobile app and install it on your device. At this point, you can use the Pushwoosh interface to send notifications to your app and make sure that everything is properly configured. Note that you will not see a notification if the app is running. Instead, the event NotificationReceivedEvent is raised immediately.
To send notifications, you need a Pushwoosh API Access Token. Create one by accessing the Pushwoosh console, go to "API Access" and click "Generate new access token."
To send a notification to all devices, use the "SendPushNotificationToAll" action.
This action takes the following parameters:
PushwooshApplicationCode: The Pushwoosh Code that you obtained after creating the application in Pushwoosh.
ApiAccessToken: The Pushwoosh API Access Token obtained earlier.
Message: The message text you wish to send.
Badge: A number that is displayed on the iOS application icon.
For instance, if you use this action to send the message “Hello from OutSystems” to an application called “PushTest,” the following would be shown in iOS:
If your app is running, the notification doesn't show on the device. Instead, it is sent to the app, and the event NotificationReceivedEvent is raised. You'll need to define what you want the app to do in that situation.
Push notifications may take a while to become active. If you don't see the notifications coming through, wait some minutes before further troubleshooting.