Right after doing the initial setup in my main.lua I used the following snippet to tag devices by platform. Just testing the tags.
if isIOS == true then
GameThrive.TagPlayer(“Platform”, “IOS”)
else
GameThrive.TagPlayer(“Platform”, “Android”)
end
And I got a nasty stack trace telling me that the plugin can’t get the Player_ID yet… Of course the backend needs some time to register the new device… So I run the same code again and no error… Now tagging happens nicely.
So as a best practice, it seems as though we need to either delay the tagging a little bit after the initial run of the app or perhaps play it safer by using GameThrive.IdsAvailableCallback(IdsAvailable) before attempting to tag. Would you agree?
How would you do this? Thanks for your suggestions.