BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

Push notification application. Server side.

Forums > Server-side Swift


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?




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.


Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

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.