Dag Ågren c2fc3f696d Include better iOS example code. | %!s(int64=5) %!d(string=hai) anos | |
---|---|---|
.. | ||
BridgingHeader.h | %!s(int64=5) %!d(string=hai) anos | |
Decode85.swift | %!s(int64=5) %!d(string=hai) anos | |
DecryptNotification.swift | %!s(int64=5) %!d(string=hai) anos | |
PushNotificationDataObjects.swift | %!s(int64=5) %!d(string=hai) anos | |
PushNotificationReceiver.swift | %!s(int64=5) %!d(string=hai) anos | |
README.md | %!s(int64=5) %!d(string=hai) anos | |
SwiftGCM.swift | %!s(int64=5) %!d(string=hai) anos |
This code is the client-side decryption code from the Toot! iOS client, which uses the toot-relay web push proxy. It sets up keys and decrypts incoming notifications relayed over APNS from the web push proxy.
The code should compile stand-alone, but may contain some Mastodon-specific parts still. Use it as the basis of your own implementation!
This code includes a slightly edited copy of Luke Park's SwiftGCM code to handle aes-gcm decryption.