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 Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

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.