Apple Push Notifications

Does anybody have Apple Push Notifications working in their Xojo app? I thought I had read somewhere that there was an issue with entitlements in Xojo that made it difficult to implement APN but I can’t find that in a forum search so perhaps I just dreamt this… I want to add APN to my app so if anyone has this working and would like to share some declares, I would be very grateful. :slight_smile:

I’m too very interested in this theme.

Are so many case where you can use Apple Push Notifications. Any plans from Xojo to integrate this?

+1
Any ideas?

Everything is already available on the forum :

Apple push notifications in Xojo iOS app
iOS Push Notifications (code included)

Following these two threads I’ve been able to send remote notification to my iPad. Sender app and iPad app are developed with Xojo. I use APN to tell asynchronously my REST client there is new datas.

[quote=281587:@Pierre Vareilles]Everything is already available on the forum :

Apple push notifications in Xojo iOS app
iOS Push Notifications (code included)

Following these two threads I’ve been able to send remote notification to my iPad. Sender app and iPad app are developed with Xojo. I use APN to tell asynchronously my REST client there is new datas.[/quote]
You got my code in that thread to work? Interesting. How did you handle the problem with setting proper entitlements for the app to allow notifications? I could never get it to work with Xojo.

Interesting, you can publish this two sample apps?

There is no known issue with Xojo and entitlements- we use custom entitlements ourselves. We tested again in the iOS-focused 2016r2 cycle and updated case 41579.

Jason,

I’m not sure what you’re talking about. I just imported your ImprovediOSApplication class in my project. I implemented App events to bring back the device token and being notified when one notification is arriving. I send the token, device id and others informations to my server with one http post. That’s all.

I tested with Easy APNs Provider. Everything works fine ; Title, Content, Badge and Sound.

Marcel,

I can share the part which send notification. Not really useful if you take a look at the thread I mentioned above. For the iPad part Jason made 99,95% of the job. Thanks to him. You’ve just to find a way to bring back the device token and manage provisioning on the ipad to include APN.

Here you go

[quote=281675:@Pierre Vareilles]Jason,

I’m not sure what you’re talking about. I just imported your ImprovediOSApplication class in my project. I implemented App events to bring back the device token and being notified when one notification is arriving. I send the token, device id and others informations to my server with one http post. That’s all.

I tested with Easy APNs Provider. Everything works fine ; Title, Content, Badge and Sound.[/quote]
Excellent, I’m glad it works correctly. I was never able to properly test it because I couldn’t get provisioning to work for APN entitlements in Xojo at the time. Although that was a very long time ago.

FINALY :slight_smile: