Skip to content

Instantly share code, notes, and snippets.

@mgwedd
Created July 16, 2019 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgwedd/3346f8c311442592c1a0237f83fe18d7 to your computer and use it in GitHub Desktop.
Save mgwedd/3346f8c311442592c1a0237f83fe18d7 to your computer and use it in GitHub Desktop.
func publishMessage(message: String!, topic: String!) {
let dataManager = AWSIoTDataManager(forKey: "kDataManager")
dataManager.publishString(message, onTopic: topic, qoS: .messageDeliveryAttemptedAtLeastOnce) // Set QoS as needed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment