[!IMPORTANT]
This project is in DEVELOPER PREVIEW while we gather feedback on interfaces and use cases. Please file issues and feature requests. Expect breaking API changes as we incorporate feedback.
The AWS IoT Device SDK for Swift connects your Swift applications and devices to the AWS IoT platform. It handles the complexities of secure communication, authentication, and device management so you can focus on your IoT solution. The SDK makes it easy to use AWS IoT services like Device Shadows, Jobs, and Fleet Provisioning.
Supported Platforms: macOS 12+, iOS 16+, tvOS 16+, Linux
The primary purpose of the AWS IoT Device SDK for Swift is to simplify the process of connecting devices to AWS IoT Core and interacting with AWS IoT services on various platforms. The SDK provides:
Integrated service clients for AWS IoT Core services
Secure device connections to AWS IoT Core using MQTT protocol including MQTT 5.0
# 1. Create a workspace directory to hold all the SDK files
mkdir sdk-workspace
cd sdk-workspace
# 2. Clone the repository. You can select the version of the SDK you desire to use.
git clone https://github.com/aws/aws-iot-device-sdk-swift.git
cd aws-iot-device-sdk-swift
# 3. Install using swift
swift build
Getting Started
To get started with the AWS IoT Device SDK for Swift:
Add the SDK to your project - See the Installation section for dependency details
Choose your connection method - The SDK supports multiple authentication methods including X.509 certificates, AWS credentials, and custom authentication. MQTT5 User Guide provides more guidance
Follow a complete example - Check out the Samples directory
Learn MQTT5 features - For advanced usage and configuration options, see the MQTT5 User Guide
Samples
Check out the Samples directory for working code examples that demonstrate:
The samples provide ready-to-run code with detailed setup instructions for each authentication method and use case.
Mac-Only TLS Behavior
Note: On Mac, after a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. When a stored private key from the Mac Keychain is used, the following is logged at the “info” log level:
static: certificate has an existing certificate-key pair that was previously imported into the Keychain.
Using key from Keychain instead of the one provided.
Getting Help
The best way to interact with our team is through GitHub.
Open discussion: Share ideas and solutions with the SDK community
Search issues: Find created issues for answers based on a topic
Create an issue: New feature request or file a bug
If you have a support plan with AWS Support, you can also create a new support case.
Resources
Check out our resources for additional guidance too before opening an issue:
AWS IoT Device SDK for Swift
The AWS IoT Device SDK for Swift connects your Swift applications and devices to the AWS IoT platform. It handles the complexities of secure communication, authentication, and device management so you can focus on your IoT solution. The SDK makes it easy to use AWS IoT services like Device Shadows, Jobs, and Fleet Provisioning.
Supported Platforms: macOS 12+, iOS 16+, tvOS 16+, Linux
Topics:
Features
The primary purpose of the AWS IoT Device SDK for Swift is to simplify the process of connecting devices to AWS IoT Core and interacting with AWS IoT services on various platforms. The SDK provides:
Supported AWS IoT Core services
Installation
Add the AWS IoT Device SDK for Swift package as a dependency to your application.
Minimum Requirements
Use the SDK as a Dependency
If you want to consume the AWS IoT Device SDK package in your Swift package, add it as a dependency in your
Package.swiftfile:Building from source
Getting Started
To get started with the AWS IoT Device SDK for Swift:
Add the SDK to your project - See the Installation section for dependency details
Choose your connection method - The SDK supports multiple authentication methods including X.509 certificates, AWS credentials, and custom authentication. MQTT5 User Guide provides more guidance
Follow a complete example - Check out the Samples directory
Learn MQTT5 features - For advanced usage and configuration options, see the MQTT5 User Guide
Samples
Check out the Samples directory for working code examples that demonstrate:
The samples provide ready-to-run code with detailed setup instructions for each authentication method and use case.
Mac-Only TLS Behavior
Note: On Mac, after a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. When a stored private key from the Mac Keychain is used, the following is logged at the “info” log level:
Getting Help
The best way to interact with our team is through GitHub.
If you have a support plan with AWS Support, you can also create a new support case.
Resources
Check out our resources for additional guidance too before opening an issue:
License
This library is licensed under the Apache 2.0 License.