Apple push notifications in Xojo iOS app

How to receive and manage Apple push notifications in Xojo iOS app?
Until now I used CoronaLab SDK and it allows easily to create apps to manage Apple push notifications sent by using my external server.

Someone need to create a declare for it!

It can be done with declares. I’m busy now but will post a project for this in several hours.

Looking forward to this!

In order to implement this right so that almost all of the push notification system is exposed, I have to create several other classes for the notifications, user settings, actions, time and timezone, etc so it is a little more involved than I had first thought. That means I am unfortunately not finished yet, but I anticipate that it will be ready tomorrow. Sorry for the inconvenience, but I don’t want to give you a half completed project!

I’m pretty much done with this, but one of the delegate methods is not behaving as described in the Apple docs. I’m trying to figure out if there is a way it can be overcome right now. (The problem is that the delegate method to inform the app that a local notification was delivered is not firing, which is not ideal since it’s then hard to know what actions should be performed.) Everything else seems to be working as far as I can tell, although I will need someone with an APN server already set up in order to test the remote notification methods.

I can test the remote notification

Me too!

Ok great! I’ll take another stab at the problem sometime today and post the project tonight.

Alright here you go. It currently doesn’t have support for custom alert actions, but everything else should work as far as I can tell. Also, I’m not sure what form the device token for remote notifications should be, so it is currently returned as an NSData object which will automatically convert to the underlying pointer when it is used in declares so that the NSData object can be used correctly. Let me know if you find any bugs and I will try to fix them :slight_smile:

Good work

Thanks. Have you been able to confirm if remote notifications work?

No, I was working on homeKit today

This afternoon I’ll make some test and then I’ll send you (privately) the results

Ok no problem. I look forward to it.

Hi Jason

Just bumping this old thread :-).

I want to add APN to my app. Is this project still valid or is there a newer version?


Gentle bump too :slight_smile:

It wasn’t possible before but maybe with the new beta. I’ll have to do some testing.

Thanks, at least saves me a rabbit hole if you say it wasn’t possible before. :slight_smile: That is the voice of knowledge on iOS.

Hey @Jason King , there’s another “push” for me to add APN to my app so I was just wondering whether you ever found the time to look any further into this?

Not yet unfortunately. Maybe this weekend. Maybe next week. My schedule is hectic right now.