Skip to content

Instantly share code, notes, and snippets.

@mgwedd

mgwedd/awsiot-2.js Secret

Created Jul 16, 2019
Embed
What would you like to do?
// 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
You can’t perform that action at this time.