Now that AWSSDK Swift supports iOS and macOS as first class citizens, AWSSDK AppleOS has been deprecated. It will not receive any new updates. Please move to using AWSSDKSwift to keep up to date with changes.
AWSSDK AppleOS Core
A Core Framework for AWSSDKAppleOS
This is the underlying driver for executing requests to AWS, but you should likely use one of the libraries provided by the package above instead of this! The code for this is based on AWSSDKSwiftCore.
This client utilizes Swift NIO to power its interactions with AWS. It returns an
EventLoopFuture in order to allow non-blocking frameworks to use this code. This version of aws-adk-swift-core uses the NIOTransportServices to provide network connectivity. The NIOTransportServices package is reliant on Network.framework. This means it can support all Apple platforms but is not available for Linux. Please see the Swift NIO documentation for more details, and please let us know via an Issue if you have questions!
Including AWSSDKAppleOS in your project
AWSSDKAppleOS is built using the Swift Package Manager. If you are building a macOS console application then you can continue to use the SPM to build your application.
// swift-tools-version:5.0 import PackageDescription let package = Package( name: "MyAWSTool", platforms: [ .iOS("12.2"), .macOS(.v10_14), .tvOS("12.2") ], dependencies: [ .package(url: "https://github.com/swift-aws/aws-sdk-appleos", from: "1.0.0"), ], targets: [ .target( name: "MyAWSTool", dependencies: ["CloudFront", "ELB", "ELBV2", "IAM"]), .testTarget( name: "MyAWSToolTests", dependencies: ["MyAWSTool"]), ] )
If you are building a Cocoa app or an iOS target then you need to generate a xcodeproj file to include in your iOS/Cocoa app xcodeproj. You can generate a xcodeproj file as follows
swift package generate-xcodeproj. When including your project make sure you include all the frameworks you use in the Embedded Binaries section of the project settings.
aws-sdk-appleos-core is released under the MIT license. See LICENSE for details.
You may find interesting
v0.4.0 - 2019-09-17 08:06:53
AWSLoggingMiddlewarewhich logs raw requests sent to AWS and raw responses received back.
- Changed restjson protocol Content-Type header to be 'application/json'.
AWSResponsestruct which holds a processed response.
- Middleware now has the ability to edit the contents of a
- Separated service signing name from service endpoint name as these can sometimes be different.
- If response has a payload path then create top level objects to contain the response json or xml.
- Mac uses CommonCrypto for SHA256, HMAC and MD5 calculations.
AWSClient.signURL()to return a signed URL.
AWSErrorTypenow conforms to
- Add additional methods for decoding timestamps (HTTP date format and seconds from UNIX epoch time).
AWSClient.send()functions don't throw errors so have removed throws from them.
- Min/max collection length validation errors output the length and not the full collection.
- String pattern validation does not expect the whole string to match the pattern.
v0.3.1 - 2019-08-19 07:16:49
Update Package to use swift-aws version of Perfect-INIParser
v0.3.0 - 2019-08-18 11:39:02
- If dictionary decoder expects an array but doesn't find one then stick object found inside an array. Fixes issue in API Gateway where single element arrays are just returned as the element.
- AWSClient.init() has a new sessionToken parameter.
- Add session tokens to headers before constructing authorization header.
- XML Parser ignores newlines as well as whitespace in between XML nodes.
- Don't encode single or double quotation marks in XML
- Added general purpose validation code to be used by auto-generated validate() functions in aws-sdk-swift.
- Added AWSShape.idempotencyToken() for auto-generating idempotency tokens.
- Added support for OpenSSL 1.1 while still supporting earlier versions.
- New me-south-1 region is available.
- Added the ability to edit response bodies before they are decoded into an AWSShape.
v0.2.4 - 2019-07-19 16:21:42
- XML: when parsing don't add text nodes for whitespace, replicating default behaviour of Foundation XMLNode.
v0.2.3 - 2019-07-12 16:54:45
Use same XML code that is used in aws-sdk-swift-core
v0.2.2 - 2019-07-08 13:15:21
- Added regions eu-west-3, eu-north-1 and ap-east-1.
- XML attributes and namespaces are no longer stored in the children array of an XML element. This resolves some XML response parsing issues.
v0.2.1 - 2019-07-01 15:11:05
- Fixed issue parsing error XML
- Fixed XML encode performance issue
v0.2.0 - 2019-06-26 17:01:22
- Output an empty body when the payload body is nil
- Added collection encoding to shape member. Use this to make decisions on encoding arrays and dictionaries in XML and queries.
- XML decode dictionaries with enum keys
- Percent encode more characters placed in query body
- Add ability to flatten all arrays in query encoder, needed for EC2
v0.1.0 - 2019-06-18 06:56:51
Initial version of aws-sdk-appleos-core
- Based on NIO2.0 version of aws-sdk-swift-core
- Compiles for macOS, iOS, tvOS
- Added custom HttpClient that is setup to use NIOTransportServices
- Added custom version of XMLNode library for iOS, tvOS as it is not available for them