SwiftyAWSSNS

master

Swift AWS SNS endpoints based on Kitura HTTP client.
crspybits/SwiftyAWSSNS

SwiftyAWSSNS

let sns = SwiftyAWSSNS(accessKeyId: accessKeyId, secretKey: secretKey, region: region, platformApplicationArn: platformApplicationArn)
    
// Format of messages: https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html
// https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html

// Prepare your messageString

sns.publish(message: messageString, target: .endpointArn(endpoint)) { response in
    switch response {
    case .success:
        break
    case .error(let error):
        print("error: \(error)")
    }
}

// See the test cases for other examples of usage: createPlatformEndpoint, createTopic, and subscribe.

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

Last updated: Mon Nov 07 2022 20:51:16 GMT-0500 (GMT-05:00)