FIX for iOS Missing pushToken OneSignal

I’ve seen a few posts on this in the forum already, but they are archived and nobody posted the answer in clear form.

If you are getting nil pushTokens on iOS for OneSignal and can’t figure out why, the solution is very easy**.**

I hit myself on the head about 10 times before figuring it out.

laZdkDX.png

undefined.png

All that happened is that you forgot to redownload your provisioning profiles after updating your app ids to support push notifications. Apple will tell you something is wrong by giving your provisioning profile an “invalid” sign as seen in the image above. Simply redownload the provisioning by editing it then clicking generate. Sync it with Xcode, restart Corona and boom it works.

I hope this helps somebody and saves them a bit of time. :smiley: