You can send your app users notifications from OneSignal. Your Dropsource project can detect notifications being received and opened, as well as accessing the information contained within them.
To test OneSignal notifications on iOS you will need to enter your Dropsource app testing Bundle ID into OneSignal – your Bundle ID for testing will be “com.dropsourcetesting.project-id” where “project-id” is the string of numbers you’ll see in your project URL after “project/”.
You will also need a push certificate – contact Dropsource support and we’ll provide that for you (note that you’ll need a different certificate for your production app before deploying it).
You can only test the notifications on a physical mobile device, not in the simulator.
If you haven’t already done so, create a project and configure it from the OneSignal dashboard.
Select iOS or Android.
On iOS you may find it helpful to create two separate apps in OneSignal – one for testing and one for production. The Bundle ID for your production app will be different as it will be tied to your Apple developer account. You can therefore e.g. create a project named “Dev” for testing (using the “com.dropsourcetesting.*” ID certificate) and one named “Prod” for release (using the certificate tied to your Apple Developer account) – in both cases add the certificate as the production option.
Select your SDK.
At this point on iOS you will be prompted to enter your certificate. Send Dropsource support a message via the Help button in the editor including the build ID for your latest project Mobile device build (not simulator). Note that you can move forward in OneSignal at this stage without the certificate and add it later.
Open your Dropsource app and in Settings on the left of the editor, Edit your OneSignal details.
Enter the App ID from your OneSignal Settings. On Android you’ll also need the Google Project Number you entered while configuring your OneSignal project (the Sender ID in your Firebase project).
Build your Dropsource app using the Test button at the top of the editor and open it in the simulator from My Builds in Android, on iOS build for a mobile device and open the app on the device, accepting notifications when prompted. Once your app has run, back in the OneSignal dashboard configuration screen, click Check Subscribed Users.
You should see confirmation that you have your first subscribed user. Once your configuration steps are complete you can close the configuration settings.
Your dashboard will indicate your new subscribed user.
In Messages, select New Message to send your first notification.
Select your audience and click Next.
Enter your notification content, including a title and message body.
Select your message options. You can set a variety of details on the notification UI and associated data, however to send a simple test message you can just click Next.
Select scheduling options for your notification and click Next.
Check through all of the details in the confirmation screen and, if you’re happy with your settings, click Send Message.
Test your Dropsource app on a mobile device to receive the notification. It should appear as soon as the app runs. If the app is open when the notification arrives it will appear over the screen. Otherwise, depending on your platform / OS version, it will appear in the notification bar / by swiping down to see your notifications, and clicking it will open your app / bring it to the front.
Your OneSignal dashboard will update with any clicks on notifications sent.
You can view various stats related to messages you’ve sent in the past, including conversion info.
Respond to notifications in your Dropsource app. If you need to detect notifications being received or clicked within your Dropsource app you can do so. Open Lifecycle on the left of the editor. Open the OneSignal Event you need.
In any Actions you add to a OneSignal notification Event, you can access the notification data via the Event Data. Typically you will save the data in Device Variables, then process or display it when an Event occurs in one of your app pages.
You can integrate your OneSignal notifications setup with an API to automate sending messages to your users. You can also create templates to reuse elements of your OneSignal notification messages, and can carry out A/B testing. Your Dropsource app can also build the notification message data into its processing, for example showing the user particular content when they respond to a notification.