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 Mar 11 2024 16:56:55 GMT-0900 (Hawaii-Aleutian Daylight Time)