GameThrive -> OneSignal migration

So GameThrive has been updated and is now OneSignal and the old plugin is no longer being updated or tested with new versions of Corona so it’s time to migrate. There doesn’t appear to be any docs on the upgrade process so I’ll document my changes for others.

Note that this is for people who have already implemented GameThrive successfully and doesn’t deal with setup from scratch - OneSignal have a great doc on that here: http://documentation.onesignal.com/docs/corona-sdk-installation

  1. Get the new OneSignal plugin from the Corona Plugin Directory.

2. in build.settings…

Change your old

["plugin.GameThrivePushNotifications"] = {     publisherId = "com.gamethrive", },

To

["plugin.OneSignal"] = {     publisherId = "com.onesignal", },
  1. Where you do your initialisation change

    GameThrive = require(“plugin.GameThrivePushNotifications”) GameThrive.Init(“XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX”, “############”, DidReceiveRemoteNotification)

To

OneSignal = require("plugin.OneSignal") OneSignal.Init("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "############", DidReceiveRemoteNotification)
  1. Change all your references from GameThrive to OneSignal.

I used the OneSignal.TagPlayerWithTable() function, but it’s been deprecated, so I needed to update to the new OneSignal.SendTags()