OneSignal service offers to use Push Notifications for free and Unlimited! This is pretty good useful service and Cross Platform Native Plugins supports its integration seamlessly.
Workflow in Brief
- Enable the Add On Service in NPSettings and Save.
- Download and import OneSignal Package.
- Enter OneSignal's required credentials in NPSettings->AddOn Settings -> One Signal
- Move OneSignal folder to Standard Assets
Workflow in Detail
Enable the OneSignal Addon Service.
- Open NPSettings from Window -> VoxelBusters -> Native Plugins -> Select NPSettings.
- In Application Settings Tab, click on Application Settings.
- Click on Supported AddOn Service section.
- Enable check box next to "Uses One Signal"
- Click on Save button at bottom.
You may get an error (Type OneSignal not found) once you enable OneSignal. This means One Signal SDK is not added to your project.
- Download OneSignal SDK from Github.
- Import the Asset Package into Unity.
While Importing, You find PlayServicesResolver folder which may already exist in your project.
Sometimes PlayServicesResolver (maintained by Google) fails to keep the latest version and end up showing duplicate dll's. In that case, you may need to delete Assets/PlayServicesResolver folder and reimport this folder alone either from our plugin or from OneSignal.
Now, move Assets/OneSignal/src folder into Assets/Standard Assets/OneSignal folder.
All our plugins assets are in Standard Assets so that these files won't compile every time if your code changes. This makes Cross Platform Native Plugins overload-free to your project.
Enter OneSignal's required credentials in NPSettings->AddOn Settings -> One Signal
Creating Sender ID via FCM : Please refer here.
That's it! You are done with integrating One Signal!
Now, you can use our NotificationServices API for receiving notifications from OneSignal.