-
-
Save mgwedd/fae65225dcb3c738c5a85fd2dd0f9aed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialising AWS IoT And IoT DataManager | |
AWSIoT.register(with: configuration!, forKey: "kAWSIoT") // Same configuration var as above | |
let iotEndPoint = AWSEndpoint(urlString: "wss://XXXXXXXXXXXXX-ats.iot.your-region.amazonaws.com/mqtt") // Access from AWS IoT Core --> Settings | |
let iotDataConfiguration = AWSServiceConfiguration(region: you-region-here, // Use AWS typedef .Region | |
endpoint: iotEndPoint, | |
credentialsProvider: credentials) // credentials is the same var as created above | |
AWSIoTDataManager.register(with: iotDataConfiguration!, forKey: "kDataManager") | |
// Access the AWSDataManager instance as follows: | |
let dataManager = AWSIoTDataManager(forKey: "kDataManager") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment