A Swift wrapper for AWS Cognito Identity Provider that abstracts AWS SDK types from the Whoop iOS app, providing a clean, type-safe interface without direct exposure to AWS-specific implementations.
This package serves as an abstraction layer between the Whoop iOS app and the AWS Cognito SDK. By encapsulating all AWS types internally, it allows the main application to work with custom, domain-specific types while keeping AWS implementation details hidden. This provides:
- Type Safety: Custom types that match the app's domain model
- Decoupling: The main app doesn't depend on AWS SDK types
- Maintainability: Changes to AWS SDK can be isolated to this package
Add this package as a dependency in your Package.swift:
dependencies: [
.package(url: "https://github.com/WhoopInc/ios-aws-wrapper.git", from: "1.0.0")
]Then add it to your target dependencies:
.target(
name: "YourTarget",
dependencies: [
.product(name: "WhoopAWSWrapper", package: "ios-aws-wrapper")
]
)The package exposes a public protocol WhoopCognitoClientProtocol with custom types that abstract AWS SDK methods
- Type Abstraction: All AWS SDK types are encapsulated internally
- Custom HTTP Client: Support for injecting custom
URLSessioninstances - Error Handling: Proper error propagation from AWS SDK