• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

iOS Push Notifications Setup on iOS

S

Spiker

Guest
Hello everyone.

I would like to add push notifications on my iOS game and I am following the example here: https://help.yoyogames.com/hc/en-us/articles/216753838-Push-Notifications-iOS

but I am stuck on the "Server Implementation" part.

I have successfully setup my apple developer, iTunes, downloaded certificates converted them in a single ck.pem file but I don't know what to do next.

I have also placed this code on the GMS
Create Event of the first object:
var fireTime = date_inc_second(date_current_datetime(), 30);
push_1 = push_local_notification(fireTime, "Test ", "Sup! 30Secs Notification","");

Any Ideas??
 
Last edited by a moderator:
S

Spiker

Guest
By the way, I have also ticked "Enable Push Notification" in the iOS settings
 
E

ericbunese

Guest
Hey @Spiker, I'm not sure what your issue is.
There are two types of push notifications: local and remote.
You can call local notifications from within Game Maker, using the push_local_notification just as you did.
This type of notifcation is time based, and serves only as a notification from the game to the game (an example: you want to notify somebody that a given ammount of time has passed and a certain activity has been completed.)

Remote notifications require a server to receive the device tokens from all devices that run the game (via an API - http connection, something like that),which stores them and allows you to send a notification to One, Many or All of these devices.
You're going to need to host this server somewhere. There are several online tools you can pay that provide an API for you to send the device tokens from game maker.

I recommend using a simple server like this one created using node.js (https://www.npmjs.com/package/node-pushserver), all you have to do is install this somewhere and start storing the device tokens server-side, so that you can send a notification for all devices simultaneously.
If you only wanted to create local notifications, from Game Maker to Game Maker (later), you're all set.
 
Top