How to send scheduled push notifications with Parse in iOS and Swift?

I am looking to send a scheduled Push notification within iOS using the Parse backend. In the Parse documentation, it says that iOS does not support scheduled push notifications and to check out the Javascript SDK. I went there and found this sample code which I copied and pasted into my project code

. As seen in the photo, there are several errors as if Xcode doesn’t recognize this at all. I am new to coding and have never used Parse’s Javascript. Am I missing an SDK? What do I need to do to get this code to work? A detailed answer would be appreciated. Thanks.

Note: I am not using cloud code or anything like that. I have successfully sent notifications to other users, but I would like to schedule them. I have done nothing besides copy and paste that code because I honestly don’t know what else I need, and i haven’t found an SDK to download that solves the problem. Thanks.

The code you listed is Javascript, so it wouldn’t compile in your Swift module.

You could use cloud code in Parse and run that Javascript to schedule the push. Take a look at the 1st answer in the stackoverflow entry here.

Another option would be to use the REST API to do the scheduling.Take a look at the parse docs here.

You probably know this already, but Parse is winding down and will be completely retired next January (see their announcement). Check out our tutorial here for some Parse alternatives.

Good luck!

1 Like

Parse.com has a document on how to do this. I followed the tutorial and managed to get it working. If you need some help email me at timbojill@gmail.com.