WolfLink
WolfLink

Reputation: 3317

iPhone act as Provider to APNs (Apple Push Notifications without third party server)

So my client wants an app that works like this:

So I have been looking into the Apple Push Notification Service but I don't want to have a third party "provider" server. Would it be possible for an iPhone to act as a "provider"?

I have already looked at this question which sounds like what I want to do but I am not satisfied with the answer. More specifically:

Upvotes: 0

Views: 210

Answers (1)

Alex Skalozub
Alex Skalozub

Reputation: 2576

Would encrypting the APNs key with another key hardcoded into the app be secure enough?

I believe the main issue is you'll need to deliver APNS certificate and private key with your app, and renew it when needed (on all devices). Regardless of it being encrypted or not, if it is available for your app, it might become available for attacker (by dumping its plaintext representation from memory, or by disassembling your decryption code) and make it possible to impersonate your app. So no, it is not secure.

The tokens will always stay the same for a given app for a given device, right?

Not really. Documentation claims that a device token is not a unique ID that you can use to identify a device. Device tokens can change after updating the operating system on a device. As a result, apps should send their device token.

Will Apple accept such an app?

I believe there were no precedents because of the reasons above.

Upvotes: 2

Related Questions