TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Push notification application. Server side.

Forums > Server-side Swift

Hi,

I'd like to build an application which sends notifications with the content derived at the specific time. The content of the message is stored in the MariaDB.

I do understand the logic between APNs and the iPhone, I'm also familiar with the configuration side.

But, how I can code (what technology? php? js? other?) my server to send the notifications to APNs? My server is linux based. I'm guessing I have to use linux scheduling service to contact APNs at the time I want.

Could someone put me in the right direction?

Thx

5      

Hi,

so this post is already pretty old, but thought I might answer it for other folks..

To send push notifications from your server, you need to communicate with the Apple APNs servers. In practice this means that your server will send JSON data to the APNs and that will in turn send out the push notifications.

You can basically use any language that will let you do POST request. As for the scheduling, it could be a simpler script that reads something from the DB, is scheduled via CRON and does the request to APNs. Alternatively you could use something more sophisticated like a task queue - for example Celery.

5      

Hacking with Swift is sponsored by String Catalog.

SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!

Localize My App

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.