diff --git a/.github/composite_actions/install_simulators_if_needed/action.yml b/.github/composite_actions/install_simulators_if_needed/action.yml index c8af3347b4..efcdc0b902 100644 --- a/.github/composite_actions/install_simulators_if_needed/action.yml +++ b/.github/composite_actions/install_simulators_if_needed/action.yml @@ -34,12 +34,20 @@ runs: echo "Installing simulators for $PLATFORM with Xcode 16.0.0..." + # Ensure we're using Xcode 16.0.0 for simulator downloads + echo "Switching to Xcode 16.0.0..." + sudo xcode-select -switch /Applications/Xcode_16.0.0.app/Contents/Developer + + # Verify the switch worked + echo "Current Xcode version:" + xcodebuild -version + # Show what's available before download echo "Simulators before download:" xcrun simctl list runtimes || true - # Download the platform - this will get the appropriate version for Xcode 16.0 - echo "Downloading $PLATFORM platform for Xcode 16.0..." + # Download the platform runtime for Xcode 16.0.0 + echo "Downloading $PLATFORM runtime for Xcode 16.0..." case $PLATFORM in iOS) sudo xcodebuild -downloadPlatform iOS || echo "Failed to download iOS platform" diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 8bbbca62f2..a4415baf26 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -40,7 +40,7 @@ jobs: run: amplify init --quickstart --frontend ios - name: Setup Ruby - uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0 + uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0 with: ruby-version: '3.2.1' bundler-cache: true @@ -59,5 +59,7 @@ jobs: - name: Run Tests - ${{ matrix.device }} with iOS ${{ matrix.version }} working-directory: ${{ github.workspace }}/canaries/example - run: bundle exec fastlane scan --device "${{ matrix.device }}" --deployment_target_version "${{ matrix.version }}" + run: | + export FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT=120 + bundle exec fastlane scan --device "${{ matrix.device }}" --deployment_target_version "${{ matrix.version }}" diff --git a/.github/workflows/deploy_package.yml b/.github/workflows/deploy_package.yml index cedeb1a066..0c0ebde854 100644 --- a/.github/workflows/deploy_package.yml +++ b/.github/workflows/deploy_package.yml @@ -67,7 +67,7 @@ jobs: token: ${{steps.retrieve-token.outputs.token}} - name: Setup Ruby - uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0 + uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0 with: ruby-version: '3.2.1' bundler-cache: true diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index 93a66c9618..843b80456e 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -63,7 +63,7 @@ jobs: token: ${{steps.retrieve-token.outputs.token}} - name: Setup Ruby - uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0 + uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0 with: ruby-version: '3.2.1' bundler-cache: true diff --git a/.github/workflows/deploy_unstable.yml b/.github/workflows/deploy_unstable.yml index 67adaf7d97..c0510498a1 100644 --- a/.github/workflows/deploy_unstable.yml +++ b/.github/workflows/deploy_unstable.yml @@ -63,7 +63,7 @@ jobs: token: ${{steps.retrieve-token.outputs.token}} - name: Setup Ruby - uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0 + uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0 with: ruby-version: '3.2.1' bundler-cache: true diff --git a/.github/workflows/release_doc.yml b/.github/workflows/release_doc.yml index dea8bbd525..7bd03d406a 100644 --- a/.github/workflows/release_doc.yml +++ b/.github/workflows/release_doc.yml @@ -36,7 +36,7 @@ jobs: token: ${{steps.retrieve-token.outputs.token}} - name: Setup Ruby - uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0 + uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0 with: ruby-version: '3.2.1' bundler-cache: true diff --git a/Amplify/Categories/API/Operation/RetryableGraphQLOperation.swift b/Amplify/Categories/API/Operation/RetryableGraphQLOperation.swift index d746ba4905..f60edfd970 100644 --- a/Amplify/Categories/API/Operation/RetryableGraphQLOperation.swift +++ b/Amplify/Categories/API/Operation/RetryableGraphQLOperation.swift @@ -72,7 +72,7 @@ public final class RetryableGraphQLOperation { } -public final class RetryableGraphQLSubscriptionOperation { +public final class RetryableGraphQLSubscriptionOperation where Payload: Decodable, Payload: Sendable { public typealias Payload = Payload public typealias SubscriptionEvents = GraphQLSubscriptionEvent diff --git a/Amplify/Categories/API/Response/GraphQLError.swift b/Amplify/Categories/API/Response/GraphQLError.swift index 7d1d21f104..a2f2f12e06 100644 --- a/Amplify/Categories/API/Response/GraphQLError.swift +++ b/Amplify/Categories/API/Response/GraphQLError.swift @@ -35,7 +35,7 @@ public struct GraphQLError: Decodable { extension GraphQLError { /// Both `line` and `column` are positive numbers describing the beginning of an associated syntax element - public struct Location: Decodable { + public struct Location: Decodable, @unchecked Sendable { /// The line describing the associated syntax element public let line: Int diff --git a/Amplify/Categories/API/Response/GraphQLResponse.swift b/Amplify/Categories/API/Response/GraphQLResponse.swift index 295dbc9459..897b4c468f 100644 --- a/Amplify/Categories/API/Response/GraphQLResponse.swift +++ b/Amplify/Categories/API/Response/GraphQLResponse.swift @@ -15,7 +15,7 @@ public typealias GraphQLResponse = Result> /// An error response from a GraphQL API -public enum GraphQLResponseError: AmplifyError { +public enum GraphQLResponseError: AmplifyError where ResponseType: Sendable, ResponseType: Decodable { /// An error response. The associated value will be an array of GraphQLError objects that contain service-specific /// error messages. https://graphql.github.io/graphql-spec/June2018/#sec-Errors diff --git a/Amplify/Categories/DataStore/DataStoreConflict.swift b/Amplify/Categories/DataStore/DataStoreConflict.swift index d2414cfaff..a3a1aab73a 100644 --- a/Amplify/Categories/DataStore/DataStoreConflict.swift +++ b/Amplify/Categories/DataStore/DataStoreConflict.swift @@ -6,7 +6,7 @@ // /// Information about a conflict that occurred attempting to sync a local model with a remote model -public struct DataStoreSyncConflict { +public struct DataStoreSyncConflict: @unchecked Sendable { public let localModel: Model public let remoteModel: Model public let errors: [GraphQLError]? diff --git a/Amplify/Categories/DataStore/Model/Internal/ModelListDecoder.swift b/Amplify/Categories/DataStore/Model/Internal/ModelListDecoder.swift index f3d30371f4..ae4e0b9661 100644 --- a/Amplify/Categories/DataStore/Model/Internal/ModelListDecoder.swift +++ b/Amplify/Categories/DataStore/Model/Internal/ModelListDecoder.swift @@ -15,7 +15,7 @@ import Foundation /// application making any change to these `public` types should be backward compatible, otherwise it will be a breaking /// change. public struct ModelListDecoderRegistry { - public static var listDecoders = AtomicValue(initialValue: [ModelListDecoder.Type]()) + nonisolated(unsafe) public static var listDecoders = AtomicValue(initialValue: [ModelListDecoder.Type]()) /// Register a decoder during plugin configuration time, to allow runtime retrievals of list providers. public static func registerDecoder(_ listDecoder: ModelListDecoder.Type) { diff --git a/Amplify/Categories/DataStore/Model/Internal/ModelProviderDecoder.swift b/Amplify/Categories/DataStore/Model/Internal/ModelProviderDecoder.swift index 8470cba587..5228e3e8a6 100644 --- a/Amplify/Categories/DataStore/Model/Internal/ModelProviderDecoder.swift +++ b/Amplify/Categories/DataStore/Model/Internal/ModelProviderDecoder.swift @@ -15,7 +15,7 @@ import Foundation /// application making any change to these `public` types should be backward compatible, otherwise it will be a breaking /// change. public struct ModelProviderRegistry { - static var decoders = AtomicValue(initialValue: [ModelProviderDecoder.Type]()) + nonisolated(unsafe) static var decoders = AtomicValue(initialValue: [ModelProviderDecoder.Type]()) /// Register a decoder during plugin configuration time, to allow runtime retrievals of model providers. public static func registerDecoder(_ decoder: ModelProviderDecoder.Type) { diff --git a/Amplify/Categories/DataStore/Model/Internal/ModelRegistry.swift b/Amplify/Categories/DataStore/Model/Internal/ModelRegistry.swift index ff3fd6ef1c..2f0b53f339 100644 --- a/Amplify/Categories/DataStore/Model/Internal/ModelRegistry.swift +++ b/Amplify/Categories/DataStore/Model/Internal/ModelRegistry.swift @@ -16,11 +16,11 @@ public struct ModelRegistry { /// ModelDecoders are used to decode untyped model data, looking up by model name private typealias ModelDecoder = (String, JSONDecoder?) throws -> Model - private static var modelTypes = [ModelName: Model.Type]() + nonisolated(unsafe) private static var modelTypes = [ModelName: Model.Type]() - private static var modelDecoders = [ModelName: ModelDecoder]() + nonisolated(unsafe) private static var modelDecoders = [ModelName: ModelDecoder]() - private static var modelSchemaMapping = [ModelName: ModelSchema]() + nonisolated(unsafe) private static var modelSchemaMapping = [ModelName: ModelSchema]() public static var models: [Model.Type] { concurrencyQueue.sync { diff --git a/Amplify/Categories/DataStore/Model/Internal/Schema/ModelField+Association.swift b/Amplify/Categories/DataStore/Model/Internal/Schema/ModelField+Association.swift index 4ebe4bcb5a..44e64679f8 100644 --- a/Amplify/Categories/DataStore/Model/Internal/Schema/ModelField+Association.swift +++ b/Amplify/Categories/DataStore/Model/Internal/Schema/ModelField+Association.swift @@ -86,7 +86,7 @@ import Foundation /// /// - Warning: Although this has `public` access, it is intended for internal & codegen use and should not be used /// directly by host applications. The behavior of this may change without warning. -public enum ModelAssociation { +public enum ModelAssociation: @unchecked Sendable { case hasMany(associatedFieldName: String?, associatedFieldNames: [String] = []) case hasOne(associatedFieldName: String?, associatedFieldNames: [String] = [], targetNames: [String]) case belongsTo(associatedFieldName: String?, targetNames: [String]) diff --git a/Amplify/Categories/DataStore/Model/Temporal/Date+Operation.swift b/Amplify/Categories/DataStore/Model/Temporal/Date+Operation.swift index 5bf0f19b4f..1230604ec6 100644 --- a/Amplify/Categories/DataStore/Model/Temporal/Date+Operation.swift +++ b/Amplify/Categories/DataStore/Model/Temporal/Date+Operation.swift @@ -17,7 +17,7 @@ import Foundation /// /// let yesterday = Temporal.Date.now() - .days(1) /// let sixMonthsAgo = Temporal.Date.now() - .months(6) -public struct DateUnit { +public struct DateUnit: @unchecked Sendable { let calendarComponent: Calendar.Component let value: Int diff --git a/Amplify/Categories/DataStore/Model/Temporal/Temporal+Cache.swift b/Amplify/Categories/DataStore/Model/Temporal/Temporal+Cache.swift index cb3b7b051f..f9642a72a2 100644 --- a/Amplify/Categories/DataStore/Model/Temporal/Temporal+Cache.swift +++ b/Amplify/Categories/DataStore/Model/Temporal/Temporal+Cache.swift @@ -12,7 +12,7 @@ extension Temporal { // of the formatter cache dictionary. // // DateFormatter itself is thread safe. - private static var formatterCache: [String: DateFormatter] = [:] + nonisolated(unsafe) private static var formatterCache: [String: DateFormatter] = [:] @usableFromInline /// The `Calendar` used for date operations. @@ -26,7 +26,7 @@ extension Temporal { }() /// Pointer to lock to ensure exclusive access. - private static let lock: UnsafeMutablePointer = { + nonisolated(unsafe) private static let lock: UnsafeMutablePointer = { let pointer = UnsafeMutablePointer.allocate(capacity: 1) pointer.initialize(to: os_unfair_lock()) return pointer diff --git a/Amplify/Categories/DataStore/Model/Temporal/TemporalFormat.swift b/Amplify/Categories/DataStore/Model/Temporal/TemporalFormat.swift index d9cc9ca6f7..3f245dd920 100644 --- a/Amplify/Categories/DataStore/Model/Temporal/TemporalFormat.swift +++ b/Amplify/Categories/DataStore/Model/Temporal/TemporalFormat.swift @@ -7,7 +7,7 @@ import Foundation -public struct TemporalFormat { +public struct TemporalFormat: @unchecked Sendable { let dateFormat: String let dateTimeFormat: String let timeFormat: String diff --git a/Amplify/Categories/DataStore/Model/Temporal/Time+Operation.swift b/Amplify/Categories/DataStore/Model/Temporal/Time+Operation.swift index 83166eb39a..d35cc04582 100644 --- a/Amplify/Categories/DataStore/Model/Temporal/Time+Operation.swift +++ b/Amplify/Categories/DataStore/Model/Temporal/Time+Operation.swift @@ -19,7 +19,7 @@ import Foundation /// - Attention: **Don't** use `TimeUnit` to calculate dates, use `DateUnit` instead. /// Also make sure to use the most applicable `Unit`, e.g. don't use `.minutes(60)` if you really want `.hours(1)`. /// There are not always 24 hours in a day, 60 minutes in an hour, etc. -public struct TimeUnit { +public struct TimeUnit: @unchecked Sendable { public let calendarComponent: Calendar.Component public let value: Int diff --git a/Amplify/Categories/DataStore/Subscribe/DataStoreQuerySnapshot.swift b/Amplify/Categories/DataStore/Subscribe/DataStoreQuerySnapshot.swift index 79afac3de6..724baad0af 100644 --- a/Amplify/Categories/DataStore/Subscribe/DataStoreQuerySnapshot.swift +++ b/Amplify/Categories/DataStore/Subscribe/DataStoreQuerySnapshot.swift @@ -9,7 +9,7 @@ import Foundation /// A snapshot of the items from DataStore, the changes since last snapshot, and whether this model has /// finished syncing and subscriptions are active -public struct DataStoreQuerySnapshot where M: Model, M: Sendable { +public struct DataStoreQuerySnapshot: @unchecked Sendable { /// All model instances from the local store public let items: [M] diff --git a/Amplify/Categories/DataStore/Subscribe/MutationEvent+Schema.swift b/Amplify/Categories/DataStore/Subscribe/MutationEvent+Schema.swift index 7f6f92af7a..94cbf9bbbc 100644 --- a/Amplify/Categories/DataStore/Subscribe/MutationEvent+Schema.swift +++ b/Amplify/Categories/DataStore/Subscribe/MutationEvent+Schema.swift @@ -24,7 +24,7 @@ extension MutationEvent { // MARK: - ModelSchema - public static let schema = defineSchema { definition in + nonisolated(unsafe) public static let schema = defineSchema { definition in let mutation = MutationEvent.keys definition.listPluralName = "MutationEvents" diff --git a/Amplify/Categories/Geo/Types/Geo+Country.swift b/Amplify/Categories/Geo/Types/Geo+Country.swift index baa30d1457..d9db466c23 100644 --- a/Amplify/Categories/Geo/Types/Geo+Country.swift +++ b/Amplify/Categories/Geo/Types/Geo+Country.swift @@ -9,7 +9,7 @@ import Foundation public extension Geo { /// Country codes for use with Amplify Geo. - struct Country { + struct Country: @unchecked Sendable { public let code: String public let description: String } diff --git a/Amplify/Categories/Hub/HubCategoryBehavior+Combine.swift b/Amplify/Categories/Hub/HubCategoryBehavior+Combine.swift index f3ae451dd5..6424640287 100644 --- a/Amplify/Categories/Hub/HubCategoryBehavior+Combine.swift +++ b/Amplify/Categories/Hub/HubCategoryBehavior+Combine.swift @@ -15,7 +15,7 @@ typealias HubSubject = PassthroughSubject /// Maintains a map of Subjects by Hub Channel. All downstream subscribers will /// attach to the same Subject. private struct HubSubjectMap { - static var `default` = HubSubjectMap() + nonisolated(unsafe) static var `default` = HubSubjectMap() var subjectsByChannel = AtomicValue<[HubChannel: HubSubject]>(initialValue: [:]) } diff --git a/Amplify/Categories/Hub/HubChannel.swift b/Amplify/Categories/Hub/HubChannel.swift index 0979ac95c3..65fb2286a8 100644 --- a/Amplify/Categories/Hub/HubChannel.swift +++ b/Amplify/Categories/Hub/HubChannel.swift @@ -33,7 +33,7 @@ public enum HubChannel { case custom(String) /// Convenience property to return an array of all non-`custom` channels - static var amplifyChannels: [HubChannel] = { + nonisolated(unsafe) static var amplifyChannels: [HubChannel] = { let categoryChannels = CategoryType .allCases .sorted { $0.displayName < $1.displayName } diff --git a/Amplify/Categories/Predictions/Error/PredictionsError+ClientError.swift b/Amplify/Categories/Predictions/Error/PredictionsError+ClientError.swift index d801ad26ff..c79bdaa132 100644 --- a/Amplify/Categories/Predictions/Error/PredictionsError+ClientError.swift +++ b/Amplify/Categories/Predictions/Error/PredictionsError+ClientError.swift @@ -30,7 +30,7 @@ extension PredictionsError { } } -extension PredictionsError.ClientError { +extension PredictionsError.ClientError: @unchecked Sendable { public static let imageNotFound = Self( description: "Something was wrong with the image file, make sure it exists.", recoverySuggestion: "Try choosing an image and sending it again." diff --git a/Amplify/Categories/Predictions/Error/PredictionsError+ServiceError.swift b/Amplify/Categories/Predictions/Error/PredictionsError+ServiceError.swift index 173705b27d..4d3393ce89 100644 --- a/Amplify/Categories/Predictions/Error/PredictionsError+ServiceError.swift +++ b/Amplify/Categories/Predictions/Error/PredictionsError+ServiceError.swift @@ -8,7 +8,7 @@ import Foundation extension PredictionsError { - public struct ServiceError: Equatable { + public struct ServiceError: Equatable, @unchecked Sendable { public static func == (lhs: PredictionsError.ServiceError, rhs: PredictionsError.ServiceError) -> Bool { lhs.description == rhs.description && lhs.recoverySuggestion == rhs.recoverySuggestion diff --git a/Amplify/Categories/Predictions/Models/Emotion+Kind.swift b/Amplify/Categories/Predictions/Models/Emotion+Kind.swift index 543d497456..d109c825a4 100644 --- a/Amplify/Categories/Predictions/Models/Emotion+Kind.swift +++ b/Amplify/Categories/Predictions/Models/Emotion+Kind.swift @@ -8,7 +8,7 @@ extension Predictions.Emotion { /// Different emotion types returned as a result of /// identify() API call - public struct Kind: Equatable { + public struct Kind: Equatable, @unchecked Sendable { let id: UInt8 public static let unknown = Self(id: 0) diff --git a/Amplify/Categories/Predictions/Models/Entity+Kind.swift b/Amplify/Categories/Predictions/Models/Entity+Kind.swift index 1d66a50ac7..6d4d839bbf 100644 --- a/Amplify/Categories/Predictions/Models/Entity+Kind.swift +++ b/Amplify/Categories/Predictions/Models/Entity+Kind.swift @@ -8,7 +8,7 @@ extension Predictions.Entity { /// Different entity types detected in a text as a result of /// interpret() API - public struct Kind: Equatable, Hashable { + public struct Kind: Equatable, Hashable, @unchecked Sendable { let id: UInt8 public static let unknown = Self(id: 0) diff --git a/Amplify/Categories/Predictions/Models/Gender.swift b/Amplify/Categories/Predictions/Models/Gender.swift index 0889c9b767..7521f54e2c 100644 --- a/Amplify/Categories/Predictions/Models/Gender.swift +++ b/Amplify/Categories/Predictions/Models/Gender.swift @@ -8,7 +8,7 @@ extension Predictions { /// Describes gender of an entity identified as a result of /// identify() API - public struct Gender { + public struct Gender: @unchecked Sendable { let id: UInt8 public static let unknown = Self(id: 0) diff --git a/Amplify/Categories/Predictions/Models/LabelType.swift b/Amplify/Categories/Predictions/Models/LabelType.swift index 0aff10defa..bbd123c77b 100644 --- a/Amplify/Categories/Predictions/Models/LabelType.swift +++ b/Amplify/Categories/Predictions/Models/LabelType.swift @@ -6,7 +6,7 @@ // extension Predictions { - public struct LabelType: Equatable { + public struct LabelType: Equatable, @unchecked Sendable { let id: UInt8 public static let all = Self(id: 0) diff --git a/Amplify/Categories/Predictions/Models/Landmark.swift b/Amplify/Categories/Predictions/Models/Landmark.swift index 4a00fdeba6..b101f2bd23 100644 --- a/Amplify/Categories/Predictions/Models/Landmark.swift +++ b/Amplify/Categories/Predictions/Models/Landmark.swift @@ -26,7 +26,7 @@ extension Predictions { extension Predictions.Landmark { /// different types of facial features - public struct Kind { + public struct Kind: @unchecked Sendable { let id: UInt8 public static let allPoints = Self(id: 0) diff --git a/Amplify/Categories/Predictions/Models/Language.swift b/Amplify/Categories/Predictions/Models/Language.swift index 484ef1ac1e..6d53fc30ac 100644 --- a/Amplify/Categories/Predictions/Models/Language.swift +++ b/Amplify/Categories/Predictions/Models/Language.swift @@ -9,7 +9,7 @@ import Foundation extension Predictions { // swiftlint:disable file_length type_body_length - public struct Language: Equatable, Decodable { + public struct Language: Equatable, Decodable, @unchecked Sendable { public let code: String public init(code: String) { diff --git a/Amplify/Categories/Predictions/Models/PartOfSpeech.swift b/Amplify/Categories/Predictions/Models/PartOfSpeech.swift index a7db69909c..9a0a3ef9bd 100644 --- a/Amplify/Categories/Predictions/Models/PartOfSpeech.swift +++ b/Amplify/Categories/Predictions/Models/PartOfSpeech.swift @@ -9,7 +9,7 @@ import Foundation extension Predictions { /// Part of speech identified in a text from interpret() API - public struct PartOfSpeech: Equatable { + public struct PartOfSpeech: Equatable, @unchecked Sendable { let description: String public static let adjective = Self(description: "adjective") diff --git a/Amplify/Categories/Predictions/Models/Sentiment+Kind.swift b/Amplify/Categories/Predictions/Models/Sentiment+Kind.swift index dbe46443db..6df87dc4dd 100644 --- a/Amplify/Categories/Predictions/Models/Sentiment+Kind.swift +++ b/Amplify/Categories/Predictions/Models/Sentiment+Kind.swift @@ -8,7 +8,7 @@ import Foundation extension Predictions.Sentiment { - public struct Kind: Equatable, Hashable { + public struct Kind: Equatable, Hashable, @unchecked Sendable { let id: UInt8 public static let unknown = Self(id: 0) diff --git a/Amplify/Categories/Predictions/Models/TextFormatType.swift b/Amplify/Categories/Predictions/Models/TextFormatType.swift index 7fa380acf9..601d2809d5 100644 --- a/Amplify/Categories/Predictions/Models/TextFormatType.swift +++ b/Amplify/Categories/Predictions/Models/TextFormatType.swift @@ -8,7 +8,7 @@ extension Predictions { /// Describes different text formats passed a type parameter /// to identify(). - public struct TextFormatType: Equatable { + public struct TextFormatType: Equatable, @unchecked Sendable { let id: UInt8 public static let all = Self(id: 0) diff --git a/Amplify/Categories/Predictions/Request/Identify/Identify+Celebrities.swift b/Amplify/Categories/Predictions/Request/Identify/Identify+Celebrities.swift index 05cf69b606..996159d0ef 100644 --- a/Amplify/Categories/Predictions/Request/Identify/Identify+Celebrities.swift +++ b/Amplify/Categories/Predictions/Request/Identify/Identify+Celebrities.swift @@ -12,7 +12,7 @@ extension Predictions.Identify { } extension Predictions.Identify.Request where Output == Predictions.Identify.Celebrities.Result { - public static let celebrities = Self( + nonisolated(unsafe) public static let celebrities = Self( kind: .detectCelebrities(.lift) ) } diff --git a/Amplify/Categories/Predictions/Request/Identify/Identify+Entities.swift b/Amplify/Categories/Predictions/Request/Identify/Identify+Entities.swift index ad2fe77840..9673de9d54 100644 --- a/Amplify/Categories/Predictions/Request/Identify/Identify+Entities.swift +++ b/Amplify/Categories/Predictions/Request/Identify/Identify+Entities.swift @@ -12,7 +12,7 @@ extension Predictions.Identify { } extension Predictions.Identify.Request where Output == Predictions.Identify.Entities.Result { - public static let entities = Self( + nonisolated(unsafe) public static let entities = Self( kind: .detectEntities(.lift) ) } diff --git a/Amplify/Categories/Predictions/Request/Identify/Identify+Text.swift b/Amplify/Categories/Predictions/Request/Identify/Identify+Text.swift index 4db181e3bf..34417a99c0 100644 --- a/Amplify/Categories/Predictions/Request/Identify/Identify+Text.swift +++ b/Amplify/Categories/Predictions/Request/Identify/Identify+Text.swift @@ -12,7 +12,7 @@ extension Predictions.Identify { } extension Predictions.Identify.Request where Output == Predictions.Identify.Text.Result { - public static let text = Self( + nonisolated(unsafe) public static let text = Self( kind: .detectText(.lift) ) } diff --git a/Amplify/Categories/Storage/Result/StorageListResult.swift b/Amplify/Categories/Storage/Result/StorageListResult.swift index 31b82903c8..1adee4ea08 100644 --- a/Amplify/Categories/Storage/Result/StorageListResult.swift +++ b/Amplify/Categories/Storage/Result/StorageListResult.swift @@ -49,8 +49,6 @@ public struct StorageListResult { public let nextToken: String? } -extension StorageListResult: Sendable { } - extension StorageListResult { /// - Tag: StorageListResultItem @@ -124,5 +122,3 @@ extension StorageListResult { } } } - -extension StorageListResult.Item: Sendable { } diff --git a/Amplify/Core/Configuration/AmplifyOutputsData.swift b/Amplify/Core/Configuration/AmplifyOutputsData.swift index 8362306eda..008b6dcfaa 100644 --- a/Amplify/Core/Configuration/AmplifyOutputsData.swift +++ b/Amplify/Core/Configuration/AmplifyOutputsData.swift @@ -267,7 +267,7 @@ public struct AmplifyOutputsData: Codable { // MARK: - Configure /// Represents helper methods to configure with Amplify CLI Gen2 configuration. -public struct AmplifyOutputs { +public struct AmplifyOutputs: @unchecked Sendable { /// A closure that resolves the `AmplifyOutputsData` configuration @_spi(InternalAmplifyConfiguration) diff --git a/Amplify/Core/Support/AmplifyTesting.swift b/Amplify/Core/Support/AmplifyTesting.swift index 9bd2e82d7c..8283b63f0d 100644 --- a/Amplify/Core/Support/AmplifyTesting.swift +++ b/Amplify/Core/Support/AmplifyTesting.swift @@ -11,7 +11,7 @@ import Foundation enum AmplifyTesting { /// Instance factory to use during testing. - private static var instanceFactory: InstanceFactory? + nonisolated(unsafe) private static var instanceFactory: InstanceFactory? /// Indicates if XCTest is running. private static var isTesting: Bool { diff --git a/Amplify/Core/Support/JSONValue.swift b/Amplify/Core/Support/JSONValue.swift index afb1a243ad..2048b21864 100644 --- a/Amplify/Core/Support/JSONValue.swift +++ b/Amplify/Core/Support/JSONValue.swift @@ -60,6 +60,8 @@ extension JSONValue: Codable { extension JSONValue: Equatable { } +extension JSONValue: @unchecked Sendable { } + extension JSONValue: ExpressibleByArrayLiteral { public init(arrayLiteral elements: JSONValue...) { self = .array(elements) diff --git a/Amplify/DevMenu/Amplify+DevMenu.swift b/Amplify/DevMenu/Amplify+DevMenu.swift index 6d17a7cfda..6b214d20d2 100644 --- a/Amplify/DevMenu/Amplify+DevMenu.swift +++ b/Amplify/DevMenu/Amplify+DevMenu.swift @@ -10,7 +10,7 @@ import Foundation /// Extension of `Amplify` for supporting Developer Menu feature extension Amplify { #if os(iOS) && !os(visionOS) - static var devMenu: AmplifyDevMenu? + nonisolated(unsafe) static var devMenu: AmplifyDevMenu? @MainActor public static func enableDevMenu(contextProvider: DevMenuPresentationContextProvider) { diff --git a/Amplify/DevMenu/Trigger/LongPressGestureRecognizer.swift b/Amplify/DevMenu/Trigger/LongPressGestureRecognizer.swift index d08ac4b08d..6b1ac74b33 100644 --- a/Amplify/DevMenu/Trigger/LongPressGestureRecognizer.swift +++ b/Amplify/DevMenu/Trigger/LongPressGestureRecognizer.swift @@ -10,7 +10,7 @@ import Foundation import UIKit /// A class for recognizing long press gesture which notifies a `TriggerDelegate` of the event -class LongPressGestureRecognizer: NSObject, TriggerRecognizer, UIGestureRecognizerDelegate { +class LongPressGestureRecognizer: NSObject, @preconcurrency TriggerRecognizer, UIGestureRecognizerDelegate { weak var triggerDelegate: TriggerDelegate? weak var uiWindow: UIWindow? diff --git a/Amplify/DevMenu/View/DetailViewFactory.swift b/Amplify/DevMenu/View/DetailViewFactory.swift index f1acce0674..199fd7067d 100644 --- a/Amplify/DevMenu/View/DetailViewFactory.swift +++ b/Amplify/DevMenu/View/DetailViewFactory.swift @@ -11,6 +11,7 @@ import SwiftUI /// A factory to create detail views based on `DevMenuItemType` class DetailViewFactory { + @MainActor static func getDetailView(type: DevMenuItemType) -> AnyView { switch type { case .deviceInformation: diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AWSAPIPlugin+GraphQLBehavior.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AWSAPIPlugin+GraphQLBehavior.swift index ae2d999245..158b7f634b 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AWSAPIPlugin+GraphQLBehavior.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AWSAPIPlugin+GraphQLBehavior.swift @@ -9,8 +9,8 @@ import Amplify public extension AWSAPIPlugin { - func query(request: GraphQLRequest, - listener: GraphQLOperation.ResultListener?) -> GraphQLOperation { + func query(request: GraphQLRequest, + listener: GraphQLOperation.ResultListener?) -> GraphQLOperation where R: Decodable, R: Sendable { let operation = AWSGraphQLOperation(request: request.toOperationRequest(operationType: .query), session: session, mapper: mapper, @@ -20,7 +20,7 @@ public extension AWSAPIPlugin { return operation } - func query(request: GraphQLRequest) async throws -> GraphQLTask.Success { + func query(request: GraphQLRequest) async throws -> GraphQLTask.Success where R: Decodable, R: Sendable { let operation = AWSGraphQLOperation(request: request.toOperationRequest(operationType: .query), session: session, mapper: mapper, @@ -31,8 +31,8 @@ public extension AWSAPIPlugin { return try await task.value } - func mutate(request: GraphQLRequest, - listener: GraphQLOperation.ResultListener?) -> GraphQLOperation { + func mutate(request: GraphQLRequest, + listener: GraphQLOperation.ResultListener?) -> GraphQLOperation where R: Decodable, R: Sendable { let operation = AWSGraphQLOperation(request: request.toOperationRequest(operationType: .mutation), session: session, mapper: mapper, @@ -42,7 +42,7 @@ public extension AWSAPIPlugin { return operation } - func mutate(request: GraphQLRequest) async throws -> GraphQLTask.Success { + func mutate(request: GraphQLRequest) async throws -> GraphQLTask.Success where R: Decodable, R: Sendable { let operation = AWSGraphQLOperation(request: request.toOperationRequest(operationType: .mutation), session: session, mapper: mapper, @@ -53,7 +53,7 @@ public extension AWSAPIPlugin { return try await task.value } - func subscribe( + func subscribe( request: GraphQLRequest, valueListener: GraphQLSubscriptionOperation.InProcessListener?, completionListener: GraphQLSubscriptionOperation.ResultListener? diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient+HandleRequest.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient+HandleRequest.swift index 63842c547b..4c33552ae3 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient+HandleRequest.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient+HandleRequest.swift @@ -7,7 +7,7 @@ import Foundation -import Combine +@preconcurrency import Combine import Amplify extension AppSyncRealTimeClient { diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift index 7f3d75abbc..1bd5c8160e 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift @@ -8,7 +8,7 @@ import Foundation import Amplify -import Combine +@preconcurrency import Combine @_spi(WebSocket) import AWSPluginsCore /** @@ -48,7 +48,7 @@ actor AppSyncRealTimeClient: AppSyncRealTimeClientProtocol { /// WebSocketClient offering connections at the WebSocket protocol level internal var webSocketClient: AppSyncWebSocketClientProtocol /// Writable data stream convert WebSocketEvent to AppSyncRealTimeResponse - internal let subject = PassthroughSubject, Never>() + internal nonisolated let subject = PassthroughSubject, Never>() var isConnected: Bool { self.state.value == .connected diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift index d7e4c6ef42..cf2a6aa2cd 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift @@ -7,7 +7,7 @@ import Foundation -import Combine +@preconcurrency import Combine import Amplify @_spi(WebSocket) import AWSPluginsCore diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift index d7d9cadc29..257bcfd274 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift @@ -7,7 +7,7 @@ import Foundation -import Combine +@preconcurrency import Combine @_spi(WebSocket) import AWSPluginsCore protocol AppSyncWebSocketClientProtocol: AnyObject { diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift index 19f1368dd6..a999f484d4 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncListProvider.swift @@ -6,7 +6,7 @@ // import Foundation -import Amplify +@preconcurrency import Amplify import AWSPluginsCore public class AppSyncListProvider: ModelListProvider { diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelDecoder.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelDecoder.swift index dab2e44756..ee7f69c91c 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelDecoder.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelDecoder.swift @@ -32,7 +32,10 @@ public struct AppSyncModelDecoder: ModelProviderDecoder { } } - public static func decode(modelType: ModelType.Type, decoder: Decoder) -> AnyModelProvider? { + public static func decode( + modelType: ModelType.Type, + decoder: Decoder + ) -> AnyModelProvider? where ModelType: Model, ModelType: Sendable { if let metadata = try? Metadata(from: decoder) { if metadata.source == ModelProviderRegistry.DecoderSource.appSync { log.verbose("Creating not loaded model \(modelType.modelName) with metadata \(metadata)") diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelProvider.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelProvider.swift index cdcaa16d88..ab6535f2fc 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelProvider.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Core/AppSyncModelProvider.swift @@ -9,7 +9,7 @@ import Foundation import Amplify import AWSPluginsCore -public class AppSyncModelProvider: ModelProvider { +public class AppSyncModelProvider: ModelProvider where ModelType: Model, ModelType: Sendable { let apiName: String? let authMode: AWSAuthorizationType? diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLOperation.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLOperation.swift index 5f073bc15e..8ab7f7cb32 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLOperation.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLOperation.swift @@ -9,7 +9,7 @@ import Amplify import AWSPluginsCore import Foundation -final public class AWSGraphQLOperation: GraphQLOperation, @unchecked Sendable { +final public class AWSGraphQLOperation: GraphQLOperation, @unchecked Sendable where R: Decodable, R: Sendable { let session: URLSessionBehavior let mapper: OperationTaskMapper diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLSubscriptionTaskRunner.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLSubscriptionTaskRunner.swift index 01414ced0a..19640b1617 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLSubscriptionTaskRunner.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLSubscriptionTaskRunner.swift @@ -12,7 +12,9 @@ import InternalAmplifyCredentials import Combine -public class AWSGraphQLSubscriptionTaskRunner: InternalTaskRunner, InternalTaskAsyncThrowingSequence, InternalTaskThrowingChannel { +public class AWSGraphQLSubscriptionTaskRunner: InternalTaskRunner, + InternalTaskAsyncThrowingSequence, + InternalTaskThrowingChannel where R: Decodable, R: Sendable { public typealias Request = GraphQLOperationRequest public typealias InProcess = GraphQLSubscriptionEvent @@ -183,7 +185,7 @@ public class AWSGraphQLSubscriptionTaskRunner: InternalTaskRunner, } // Class is still necessary. See https://github.com/aws-amplify/amplify-swift/issues/2252 -final public class AWSGraphQLSubscriptionOperation: GraphQLSubscriptionOperation, @unchecked Sendable { +final public class AWSGraphQLSubscriptionOperation: GraphQLSubscriptionOperation, @unchecked Sendable where R: Decodable, R: Sendable { let pluginConfig: AWSAPICategoryPluginConfiguration let appSyncRealTimeClientFactory: AppSyncRealTimeClientFactoryProtocol @@ -383,7 +385,7 @@ fileprivate func encodeRequest(query: String, variables: [String: Any]?) -> Stri } } -fileprivate func toAPIError(_ errors: [Error], type: R.Type) -> APIError { +fileprivate func toAPIError(_ errors: [Error], type: R.Type) -> APIError where R: Decodable, R: Sendable { func errorDescription(_ hasAuthorizationError: Bool = false) -> String { "Subscription item event failed with error" + (hasAuthorizationError ? ": \(APIError.UnauthorizedMessageString)" : "") diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift index 7b8d1b21c9..f232f43534 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift @@ -7,10 +7,10 @@ import Foundation -import Amplify +@preconcurrency import Amplify import Combine -import InternalAmplifyCredentials -@_spi(WebSocket) import AWSPluginsCore +@preconcurrency import InternalAmplifyCredentials +@_spi(WebSocket) @preconcurrency import AWSPluginsCore protocol AppSyncRealTimeClientFactoryProtocol { func getAppSyncRealTimeClient( diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Support/Decode/GraphQLResponseDecoder.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Support/Decode/GraphQLResponseDecoder.swift index a80a16e4b3..75349b37ba 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Support/Decode/GraphQLResponseDecoder.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Support/Decode/GraphQLResponseDecoder.swift @@ -9,7 +9,7 @@ import Foundation import Amplify import AWSPluginsCore -class GraphQLResponseDecoder { +class GraphQLResponseDecoder where R: Decodable, R: Sendable { let request: GraphQLOperationRequest var response: Data diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/APISwiftCompatibility/API.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/APISwiftCompatibility/API.swift index 30ac29f279..fcc7bee8ca 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/APISwiftCompatibility/API.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/APISwiftCompatibility/API.swift @@ -1843,7 +1843,7 @@ public final class CreateBlogMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("createBlog", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(CreateBlog.selections)), ] @@ -1869,7 +1869,7 @@ public final class CreateBlogMutation: GraphQLMutation { public struct CreateBlog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -1985,7 +1985,7 @@ public final class CreateBlogMutation: GraphQLMutation { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -2032,7 +2032,7 @@ public final class CreateBlogMutation: GraphQLMutation { public struct File: GraphQLSelectionSet { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), @@ -2133,7 +2133,7 @@ public final class UpdateBlogMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("updateBlog", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(UpdateBlog.selections)), ] @@ -2159,7 +2159,7 @@ public final class UpdateBlogMutation: GraphQLMutation { public struct UpdateBlog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -2275,7 +2275,7 @@ public final class UpdateBlogMutation: GraphQLMutation { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -2322,7 +2322,7 @@ public final class UpdateBlogMutation: GraphQLMutation { public struct File: GraphQLSelectionSet { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), @@ -2423,7 +2423,7 @@ public final class DeleteBlogMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("deleteBlog", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(DeleteBlog.selections)), ] @@ -2449,7 +2449,7 @@ public final class DeleteBlogMutation: GraphQLMutation { public struct DeleteBlog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -2565,7 +2565,7 @@ public final class DeleteBlogMutation: GraphQLMutation { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -2612,7 +2612,7 @@ public final class DeleteBlogMutation: GraphQLMutation { public struct File: GraphQLSelectionSet { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), @@ -2711,7 +2711,7 @@ public final class CreatePostMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("createPost", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(CreatePost.selections)), ] @@ -2737,7 +2737,7 @@ public final class CreatePostMutation: GraphQLMutation { public struct CreatePost: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -2863,7 +2863,7 @@ public final class CreatePostMutation: GraphQLMutation { public struct Blog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -2960,7 +2960,7 @@ public final class CreatePostMutation: GraphQLMutation { public struct Comment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -3026,7 +3026,7 @@ public final class UpdatePostMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("updatePost", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(UpdatePost.selections)), ] @@ -3052,7 +3052,7 @@ public final class UpdatePostMutation: GraphQLMutation { public struct UpdatePost: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -3178,7 +3178,7 @@ public final class UpdatePostMutation: GraphQLMutation { public struct Blog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -3275,7 +3275,7 @@ public final class UpdatePostMutation: GraphQLMutation { public struct Comment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -3341,7 +3341,7 @@ public final class DeletePostMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("deletePost", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(DeletePost.selections)), ] @@ -3367,7 +3367,7 @@ public final class DeletePostMutation: GraphQLMutation { public struct DeletePost: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -3493,7 +3493,7 @@ public final class DeletePostMutation: GraphQLMutation { public struct Blog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -3590,7 +3590,7 @@ public final class DeletePostMutation: GraphQLMutation { public struct Comment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -3656,7 +3656,7 @@ public final class CreateCommentMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("createComment", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(CreateComment.selections)), ] @@ -3682,7 +3682,7 @@ public final class CreateCommentMutation: GraphQLMutation { public struct CreateComment: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("post", type: .object(Post.selections)), @@ -3798,7 +3798,7 @@ public final class CreateCommentMutation: GraphQLMutation { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -3924,7 +3924,7 @@ public final class UpdateCommentMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("updateComment", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(UpdateComment.selections)), ] @@ -3950,7 +3950,7 @@ public final class UpdateCommentMutation: GraphQLMutation { public struct UpdateComment: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("post", type: .object(Post.selections)), @@ -4066,7 +4066,7 @@ public final class UpdateCommentMutation: GraphQLMutation { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -4192,7 +4192,7 @@ public final class DeleteCommentMutation: GraphQLMutation { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Mutation"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("deleteComment", arguments: ["input": GraphQLVariable("input"), "condition": GraphQLVariable("condition")], type: .object(DeleteComment.selections)), ] @@ -4218,7 +4218,7 @@ public final class DeleteCommentMutation: GraphQLMutation { public struct DeleteComment: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("post", type: .object(Post.selections)), @@ -4334,7 +4334,7 @@ public final class DeleteCommentMutation: GraphQLMutation { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -4460,7 +4460,7 @@ public final class GetBlogQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("getBlog", arguments: ["id": GraphQLVariable("id")], type: .object(GetBlog.selections)), ] @@ -4486,7 +4486,7 @@ public final class GetBlogQuery: GraphQLQuery { public struct GetBlog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -4602,7 +4602,7 @@ public final class GetBlogQuery: GraphQLQuery { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -4649,7 +4649,7 @@ public final class GetBlogQuery: GraphQLQuery { public struct File: GraphQLSelectionSet { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), @@ -4750,7 +4750,7 @@ public final class ListBlogsQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("listBlogs", arguments: ["filter": GraphQLVariable("filter"), "limit": GraphQLVariable("limit"), "nextToken": GraphQLVariable("nextToken")], type: .object(ListBlog.selections)), ] @@ -4776,7 +4776,7 @@ public final class ListBlogsQuery: GraphQLQuery { public struct ListBlog: GraphQLSelectionSet { public static let possibleTypes = ["ModelBlogConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("items", type: .nonNull(.list(.object(Item.selections)))), GraphQLField("nextToken", type: .scalar(String.self)), @@ -4832,7 +4832,7 @@ public final class ListBlogsQuery: GraphQLQuery { public struct Item: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -4952,7 +4952,7 @@ public final class SyncBlogsQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("syncBlogs", arguments: ["filter": GraphQLVariable("filter"), "limit": GraphQLVariable("limit"), "nextToken": GraphQLVariable("nextToken"), "lastSync": GraphQLVariable("lastSync")], type: .object(SyncBlog.selections)), ] @@ -4978,7 +4978,7 @@ public final class SyncBlogsQuery: GraphQLQuery { public struct SyncBlog: GraphQLSelectionSet { public static let possibleTypes = ["ModelBlogConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("items", type: .nonNull(.list(.object(Item.selections)))), GraphQLField("nextToken", type: .scalar(String.self)), @@ -5034,7 +5034,7 @@ public final class SyncBlogsQuery: GraphQLQuery { public struct Item: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -5148,7 +5148,7 @@ public final class GetPostQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("getPost", arguments: ["id": GraphQLVariable("id")], type: .object(GetPost.selections)), ] @@ -5174,7 +5174,7 @@ public final class GetPostQuery: GraphQLQuery { public struct GetPost: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -5300,7 +5300,7 @@ public final class GetPostQuery: GraphQLQuery { public struct Blog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -5397,7 +5397,7 @@ public final class GetPostQuery: GraphQLQuery { public struct Comment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -5465,7 +5465,7 @@ public final class ListPostsQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("listPosts", arguments: ["filter": GraphQLVariable("filter"), "limit": GraphQLVariable("limit"), "nextToken": GraphQLVariable("nextToken")], type: .object(ListPost.selections)), ] @@ -5491,7 +5491,7 @@ public final class ListPostsQuery: GraphQLQuery { public struct ListPost: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("items", type: .nonNull(.list(.object(Item.selections)))), GraphQLField("nextToken", type: .scalar(String.self)), @@ -5547,7 +5547,7 @@ public final class ListPostsQuery: GraphQLQuery { public struct Item: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -5677,7 +5677,7 @@ public final class SyncPostsQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("syncPosts", arguments: ["filter": GraphQLVariable("filter"), "limit": GraphQLVariable("limit"), "nextToken": GraphQLVariable("nextToken"), "lastSync": GraphQLVariable("lastSync")], type: .object(SyncPost.selections)), ] @@ -5703,7 +5703,7 @@ public final class SyncPostsQuery: GraphQLQuery { public struct SyncPost: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("items", type: .nonNull(.list(.object(Item.selections)))), GraphQLField("nextToken", type: .scalar(String.self)), @@ -5759,7 +5759,7 @@ public final class SyncPostsQuery: GraphQLQuery { public struct Item: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -5883,7 +5883,7 @@ public final class GetCommentQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("getComment", arguments: ["id": GraphQLVariable("id")], type: .object(GetComment.selections)), ] @@ -5909,7 +5909,7 @@ public final class GetCommentQuery: GraphQLQuery { public struct GetComment: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("post", type: .object(Post.selections)), @@ -6025,7 +6025,7 @@ public final class GetCommentQuery: GraphQLQuery { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -6153,7 +6153,7 @@ public final class ListCommentsQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("listComments", arguments: ["filter": GraphQLVariable("filter"), "limit": GraphQLVariable("limit"), "nextToken": GraphQLVariable("nextToken")], type: .object(ListComment.selections)), ] @@ -6179,7 +6179,7 @@ public final class ListCommentsQuery: GraphQLQuery { public struct ListComment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("items", type: .nonNull(.list(.object(Item.selections)))), GraphQLField("nextToken", type: .scalar(String.self)), @@ -6235,7 +6235,7 @@ public final class ListCommentsQuery: GraphQLQuery { public struct Item: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("content", type: .nonNull(.scalar(String.self))), @@ -6365,7 +6365,7 @@ public final class SyncCommentsQuery: GraphQLQuery { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Query"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("syncComments", arguments: ["filter": GraphQLVariable("filter"), "limit": GraphQLVariable("limit"), "nextToken": GraphQLVariable("nextToken"), "lastSync": GraphQLVariable("lastSync")], type: .object(SyncComment.selections)), ] @@ -6391,7 +6391,7 @@ public final class SyncCommentsQuery: GraphQLQuery { public struct SyncComment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("items", type: .nonNull(.list(.object(Item.selections)))), GraphQLField("nextToken", type: .scalar(String.self)), @@ -6447,7 +6447,7 @@ public final class SyncCommentsQuery: GraphQLQuery { public struct Item: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("content", type: .nonNull(.scalar(String.self))), @@ -6573,7 +6573,7 @@ public final class OnCreateBlogSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onCreateBlog", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnCreateBlog.selections)), ] @@ -6599,7 +6599,7 @@ public final class OnCreateBlogSubscription: GraphQLSubscription { public struct OnCreateBlog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -6715,7 +6715,7 @@ public final class OnCreateBlogSubscription: GraphQLSubscription { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -6762,7 +6762,7 @@ public final class OnCreateBlogSubscription: GraphQLSubscription { public struct File: GraphQLSelectionSet { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), @@ -6861,7 +6861,7 @@ public final class OnUpdateBlogSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onUpdateBlog", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnUpdateBlog.selections)), ] @@ -6887,7 +6887,7 @@ public final class OnUpdateBlogSubscription: GraphQLSubscription { public struct OnUpdateBlog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -7003,7 +7003,7 @@ public final class OnUpdateBlogSubscription: GraphQLSubscription { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -7050,7 +7050,7 @@ public final class OnUpdateBlogSubscription: GraphQLSubscription { public struct File: GraphQLSelectionSet { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), @@ -7149,7 +7149,7 @@ public final class OnDeleteBlogSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onDeleteBlog", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnDeleteBlog.selections)), ] @@ -7175,7 +7175,7 @@ public final class OnDeleteBlogSubscription: GraphQLSubscription { public struct OnDeleteBlog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -7291,7 +7291,7 @@ public final class OnDeleteBlogSubscription: GraphQLSubscription { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["ModelPostConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -7338,7 +7338,7 @@ public final class OnDeleteBlogSubscription: GraphQLSubscription { public struct File: GraphQLSelectionSet { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), @@ -7435,7 +7435,7 @@ public final class OnCreatePostSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onCreatePost", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnCreatePost.selections)), ] @@ -7461,7 +7461,7 @@ public final class OnCreatePostSubscription: GraphQLSubscription { public struct OnCreatePost: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -7587,7 +7587,7 @@ public final class OnCreatePostSubscription: GraphQLSubscription { public struct Blog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -7684,7 +7684,7 @@ public final class OnCreatePostSubscription: GraphQLSubscription { public struct Comment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -7748,7 +7748,7 @@ public final class OnUpdatePostSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onUpdatePost", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnUpdatePost.selections)), ] @@ -7774,7 +7774,7 @@ public final class OnUpdatePostSubscription: GraphQLSubscription { public struct OnUpdatePost: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -7900,7 +7900,7 @@ public final class OnUpdatePostSubscription: GraphQLSubscription { public struct Blog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -7997,7 +7997,7 @@ public final class OnUpdatePostSubscription: GraphQLSubscription { public struct Comment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -8061,7 +8061,7 @@ public final class OnDeletePostSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onDeletePost", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnDeletePost.selections)), ] @@ -8087,7 +8087,7 @@ public final class OnDeletePostSubscription: GraphQLSubscription { public struct OnDeletePost: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -8213,7 +8213,7 @@ public final class OnDeletePostSubscription: GraphQLSubscription { public struct Blog: GraphQLSelectionSet { public static let possibleTypes = ["Blog"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("name", type: .nonNull(.scalar(String.self))), @@ -8310,7 +8310,7 @@ public final class OnDeletePostSubscription: GraphQLSubscription { public struct Comment: GraphQLSelectionSet { public static let possibleTypes = ["ModelCommentConnection"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("nextToken", type: .scalar(String.self)), GraphQLField("startedAt", type: .scalar(Int.self)), @@ -8374,7 +8374,7 @@ public final class OnCreateCommentSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onCreateComment", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnCreateComment.selections)), ] @@ -8400,7 +8400,7 @@ public final class OnCreateCommentSubscription: GraphQLSubscription { public struct OnCreateComment: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("post", type: .object(Post.selections)), @@ -8516,7 +8516,7 @@ public final class OnCreateCommentSubscription: GraphQLSubscription { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -8640,7 +8640,7 @@ public final class OnUpdateCommentSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onUpdateComment", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnUpdateComment.selections)), ] @@ -8666,7 +8666,7 @@ public final class OnUpdateCommentSubscription: GraphQLSubscription { public struct OnUpdateComment: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("post", type: .object(Post.selections)), @@ -8782,7 +8782,7 @@ public final class OnUpdateCommentSubscription: GraphQLSubscription { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -8906,7 +8906,7 @@ public final class OnDeleteCommentSubscription: GraphQLSubscription { public struct Data: GraphQLSelectionSet { public static let possibleTypes = ["Subscription"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("onDeleteComment", arguments: ["filter": GraphQLVariable("filter")], type: .object(OnDeleteComment.selections)), ] @@ -8932,7 +8932,7 @@ public final class OnDeleteCommentSubscription: GraphQLSubscription { public struct OnDeleteComment: GraphQLSelectionSet { public static let possibleTypes = ["Comment"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("post", type: .object(Post.selections)), @@ -9048,7 +9048,7 @@ public final class OnDeleteCommentSubscription: GraphQLSubscription { public struct Post: GraphQLSelectionSet { public static let possibleTypes = ["Post"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("id", type: .nonNull(.scalar(GraphQLID.self))), GraphQLField("title", type: .nonNull(.scalar(String.self))), @@ -9161,7 +9161,7 @@ public struct S3Object: GraphQLFragment { public static let possibleTypes = ["S3Object"] - public static let selections: [GraphQLSelection] = [ + nonisolated(unsafe) public static let selections: [GraphQLSelection] = [ GraphQLField("__typename", type: .nonNull(.scalar(String.self))), GraphQLField("bucket", type: .nonNull(.scalar(String.self))), GraphQLField("key", type: .nonNull(.scalar(String.self))), diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AWSAPICategoryPlugin+ReachabilityTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AWSAPICategoryPlugin+ReachabilityTests.swift index 2d005cbdf1..961b333a26 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AWSAPICategoryPlugin+ReachabilityTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AWSAPICategoryPlugin+ReachabilityTests.swift @@ -14,7 +14,7 @@ import AWSPluginsCore @testable import AWSAPIPlugin @testable import AWSPluginsTestCommon -class AWSAPICategoryPluginReachabilityTests: XCTestCase { +class AWSAPICategoryPluginReachabilityTests: XCTestCase, @unchecked Sendable { var apiPlugin: AWSAPIPlugin! diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift index c093ebb720..6af2cff8e2 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift @@ -7,7 +7,7 @@ import XCTest -import Combine +@preconcurrency import Combine import Amplify @_spi(WebSocket) import AWSPluginsCore @testable import AWSAPIPlugin diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderPaginationTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderPaginationTests.swift index 410077d90d..9b57dfee07 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderPaginationTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/AppSyncListProviderPaginationTests.swift @@ -7,7 +7,7 @@ import XCTest @testable import AWSPluginsCore -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AmplifyTestCommon @testable import AWSAPIPlugin diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/ListTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/ListTests.swift index ad28849701..85773518bc 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/ListTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Core/ListTests.swift @@ -6,7 +6,7 @@ // import XCTest -import Amplify +@preconcurrency import Amplify import AmplifyTestCommon @testable import AWSAPIPlugin diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockReachability.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockReachability.swift index 3befe8e8a1..deb799cfec 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockReachability.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockReachability.swift @@ -23,7 +23,7 @@ class MockNetworkReachabilityProvidingFactory: NetworkReachabilityProvidingFacto class MockReachability: NetworkReachabilityProviding { var allowsCellularConnection = true - static var iConnection = AmplifyReachability.Connection.wifi + nonisolated(unsafe) static var iConnection = AmplifyReachability.Connection.wifi var connection: AmplifyReachability.Connection { get { return MockReachability.iConnection diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift index 51c1feea3e..fc76f646e5 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift @@ -8,7 +8,7 @@ import Foundation import Amplify -import Combine +@preconcurrency import Combine @testable import AWSAPIPlugin @_spi(WebSocket) import AWSPluginsCore import InternalAmplifyCredentials diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSession.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSession.swift index 3e1a4e3b89..2a5fc0b494 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSession.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSession.swift @@ -12,7 +12,7 @@ import Foundation class MockURLSession: URLSessionBehavior { weak var sessionBehaviorDelegate: URLSessionBehaviorDelegate? - static let defaultOnReset: ((BasicClosure?) -> Void) = { $0?() } + nonisolated(unsafe) static let defaultOnReset: ((BasicClosure?) -> Void) = { $0?() } var onTaskForRequest: (URLRequest) -> URLSessionDataTaskBehavior var onReset: ((BasicClosure?) -> Void)? diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSessionTask.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSessionTask.swift index 1c06ec3212..ccd0dc629f 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSessionTask.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockURLSessionTask.swift @@ -11,7 +11,7 @@ import Foundation @testable import AmplifyTestCommon class MockURLSessionTask: URLSessionDataTaskBehavior { - static var counter = AtomicValue(initialValue: 0) + nonisolated(unsafe) static var counter = AtomicValue(initialValue: 0) /// Mimics a URLSessionTask's Session context, for dispatching events to the /// session delegate. Rather than use the mock session as a broker, the tests diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLMutateCombineTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLMutateCombineTests.swift index 51a53fd429..225aaf123d 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLMutateCombineTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLMutateCombineTests.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AWSAPIPlugin @testable import AmplifyTestCommon diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLQueryCombineTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLQueryCombineTests.swift index b25059ec02..fd21833ee1 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLQueryCombineTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/GraphQLQueryCombineTests.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AWSAPIPlugin @testable import AmplifyTestCommon diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/RESTCombineTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/RESTCombineTests.swift index e2c91d45c2..65d7f6479a 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/RESTCombineTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Operation/RESTCombineTests.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AWSAPIPlugin @testable import AmplifyTestCommon diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoder+DecodeDataTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoder+DecodeDataTests.swift index 332fcd44fd..c615c680e8 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoder+DecodeDataTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoder+DecodeDataTests.swift @@ -6,9 +6,9 @@ // import XCTest -@testable import Amplify -import AWSPluginsCore -@testable import AmplifyTestCommon +@testable @preconcurrency import Amplify +@preconcurrency import AWSPluginsCore +@testable @preconcurrency import AmplifyTestCommon @testable import AWSAPIPlugin @_implementationOnly import AmplifyAsyncTesting diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderLazyPostComment4V2Tests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderLazyPostComment4V2Tests.swift index fe72e229af..bcec0d1f11 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderLazyPostComment4V2Tests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderLazyPostComment4V2Tests.swift @@ -6,9 +6,9 @@ // import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify import AWSPluginsCore -@testable import AmplifyTestCommon +@testable @preconcurrency import AmplifyTestCommon @testable import AWSAPIPlugin // Decoder tests for ParentPost4V2 and ChildComment4V2 diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderPostComment4V2Tests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderPostComment4V2Tests.swift index 7bafe39ddf..f3d71bb329 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderPostComment4V2Tests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderPostComment4V2Tests.swift @@ -6,9 +6,9 @@ // import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify import AWSPluginsCore -@testable import AmplifyTestCommon +@testable @preconcurrency import AmplifyTestCommon @testable import AWSAPIPlugin // Decoder tests for ParentPost4V2 and ChildComment4V2 diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderTests.swift index 6d9144880b..d59487f416 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Decode/GraphQLResponseDecoderTests.swift @@ -6,7 +6,7 @@ // import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify import AWSPluginsCore @testable import AmplifyTestCommon @testable import AWSAPIPlugin diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/Result+AsyncTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/Result+AsyncTests.swift index 5ae473b899..5453232f75 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/Result+AsyncTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Support/Utils/Result+AsyncTests.swift @@ -51,4 +51,4 @@ class ResultAsyncTests: XCTestCase { } } -fileprivate class TestError: Error { } +fileprivate class TestError: Error, @unchecked Sendable { } diff --git a/AmplifyPlugins/Analytics/Sources/AWSPinpointAnalyticsPlugin/Configuration/AWSPinpointAnalyticsPluginConfiguration.swift b/AmplifyPlugins/Analytics/Sources/AWSPinpointAnalyticsPlugin/Configuration/AWSPinpointAnalyticsPluginConfiguration.swift index 44456d7c60..e29b66233f 100644 --- a/AmplifyPlugins/Analytics/Sources/AWSPinpointAnalyticsPlugin/Configuration/AWSPinpointAnalyticsPluginConfiguration.swift +++ b/AmplifyPlugins/Analytics/Sources/AWSPinpointAnalyticsPlugin/Configuration/AWSPinpointAnalyticsPluginConfiguration.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -@_spi(InternalAmplifyConfiguration) import Amplify +@_spi(InternalAmplifyConfiguration) @preconcurrency import Amplify import AWSPinpoint import AWSClientRuntime import Foundation diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+AppSyncSigner.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+AppSyncSigner.swift index 51f3e66db4..6c64e0ae61 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+AppSyncSigner.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+AppSyncSigner.swift @@ -34,7 +34,7 @@ extension AWSCognitoAuthPlugin { } } - private static var signer = { + nonisolated(unsafe) private static var signer = { return AWSSigV4Signer() }() diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/RefreshAuthorizationSession/UserPool/RefreshUserPoolTokens.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/RefreshAuthorizationSession/UserPool/RefreshUserPoolTokens.swift index a5d180b876..f5956b1b34 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/RefreshAuthorizationSession/UserPool/RefreshUserPoolTokens.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/RefreshAuthorizationSession/UserPool/RefreshUserPoolTokens.swift @@ -5,11 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify -import AWSPluginsCore import AWSCognitoIdentityProvider -import Foundation +import AWSPluginsCore +import Amplify import ClientRuntime +import Foundation struct RefreshUserPoolTokens: Action { @@ -28,7 +28,6 @@ struct RefreshUserPoolTokens: Action { return } - let authEnv = try environment.authEnvironment() let config = environment.userPoolConfiguration let client = try? environment.cognitoUserPoolFactory() let existingTokens = existingSignedIndata.cognitoUserPoolTokens @@ -37,29 +36,35 @@ struct RefreshUserPoolTokens: Action { for: existingSignedIndata.username, with: environment) - let asfDeviceId = try await CognitoUserPoolASF.asfDeviceID( - for: existingSignedIndata.username, - credentialStoreClient: authEnv.credentialsClient) + let deviceKey: String? = { + if case .metadata(let data) = deviceMetadata { + return data.deviceKey + } + return nil + }() - let input = await InitiateAuthInput.refreshAuthInput( - username: existingSignedIndata.username, - refreshToken: existingTokens.refreshToken, + let input = GetTokensFromRefreshTokenInput( + clientId: config.clientId, clientMetadata: [:], - asfDeviceId: asfDeviceId, - deviceMetadata: deviceMetadata, - environment: environment) + clientSecret: config.clientSecret, + deviceKey: deviceKey, + refreshToken: existingTokens.refreshToken + ) - logVerbose("\(#fileID) Starting initiate auth refresh token", environment: environment) + logVerbose( + "\(#fileID) Starting get tokens from refresh token", environment: environment) - let response = try await client?.initiateAuth(input: input) + let response = try await client?.getTokensFromRefreshToken(input: input) - logVerbose("\(#fileID) Initiate auth response received", environment: environment) + logVerbose( + "\(#fileID) Get tokens from refresh token response received", + environment: environment) guard let authenticationResult = response?.authenticationResult, - let idToken = authenticationResult.idToken, - let accessToken = authenticationResult.accessToken + let idToken = authenticationResult.idToken, + let accessToken = authenticationResult.accessToken, + let refreshToken = authenticationResult.refreshToken else { - let event = RefreshSessionEvent(eventType: .throwError(.invalidTokens)) await dispatcher.send(event) logVerbose("\(#fileID) Sending event \(event.type)", environment: environment) @@ -69,9 +74,9 @@ struct RefreshUserPoolTokens: Action { let userPoolTokens = AWSCognitoUserPoolTokens( idToken: idToken, accessToken: accessToken, - refreshToken: existingTokens.refreshToken, - expiresIn: authenticationResult.expiresIn + refreshToken: refreshToken ) + let signedInData = SignedInData( signedInDate: existingSignedIndata.signedInDate, signInMethod: existingSignedIndata.signInMethod, @@ -96,13 +101,14 @@ struct RefreshUserPoolTokens: Action { await dispatcher.send(event) } - logVerbose("\(#fileID) Initiate auth complete", environment: environment) + logVerbose("\(#fileID) Get tokens from refresh token complete", environment: environment) } } extension RefreshUserPoolTokens: DefaultLogger { public static var log: Logger { - Amplify.Logging.logger(forCategory: CategoryType.auth.displayName, forNamespace: String(describing: self)) + Amplify.Logging.logger( + forCategory: CategoryType.auth.displayName, forNamespace: String(describing: self)) } public var log: Logger { @@ -114,7 +120,7 @@ extension RefreshUserPoolTokens: CustomDebugDictionaryConvertible { var debugDictionary: [String: Any] { [ "identifier": identifier, - "existingSignedInData": existingSignedIndata + "existingSignedInData": existingSignedIndata, ] } } diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AmplifyCredentials.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AmplifyCredentials.swift index 3d93d21d79..c7b3505075 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AmplifyCredentials.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AmplifyCredentials.swift @@ -31,6 +31,8 @@ extension AmplifyCredentials: Codable { } extension AmplifyCredentials: Equatable { } +extension AmplifyCredentials: @unchecked Sendable { } + extension AmplifyCredentials: CustomDebugStringConvertible { var debugDescription: String { switch self { diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Environment/IDFactory.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Environment/IDFactory.swift index 0168f1f416..8847984985 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Environment/IDFactory.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Environment/IDFactory.swift @@ -10,5 +10,5 @@ import Foundation typealias EventIDFactory = () -> String enum UUIDFactory { - static let factory: EventIDFactory = { UUID().uuidString } + nonisolated(unsafe) static let factory: EventIDFactory = { UUID().uuidString } } diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift index 55efa75c81..65e6f980e7 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift @@ -29,6 +29,9 @@ protocol CognitoUserPoolBehavior { /// Throws RevokeTokenOutputError func revokeToken(input: RevokeTokenInput) async throws -> RevokeTokenOutput + /// Throws GetTokensFromRefreshTokenOutputError + func getTokensFromRefreshToken(input: GetTokensFromRefreshTokenInput) async throws -> GetTokensFromRefreshTokenOutput + // MARK: - User Attribute API's /// Throws GetUserAttributeVerificationCodeOutputError diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/AuthErrorConvertible.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/AuthErrorConvertible.swift index e811b761d9..0e743f7eb5 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/AuthErrorConvertible.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/ErrorMapping/AuthErrorConvertible.swift @@ -19,3 +19,5 @@ extension AuthError: AuthErrorConvertible { return self } } + +extension AuthError: @unchecked Sendable { } diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/hierarchical-state-machine-swift/StateMachine.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/hierarchical-state-machine-swift/StateMachine.swift index 6fd47e52ad..7abaf29ed6 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/hierarchical-state-machine-swift/StateMachine.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/hierarchical-state-machine-swift/StateMachine.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Combine +@preconcurrency import Combine /// Models, evolves, and processes effects for a system. /// diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/CustomEndpoint/EndpointResolving.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/CustomEndpoint/EndpointResolving.swift index 2caf2826e6..7b00191370 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/CustomEndpoint/EndpointResolving.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/CustomEndpoint/EndpointResolving.swift @@ -8,7 +8,7 @@ import Foundation import SmithyHTTPAPI -struct EndpointResolving { +struct EndpointResolving: @unchecked Sendable { let run: (String) throws -> SmithyHTTPAPI.Endpoint } diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/InitiateAuthInput+Amplify.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/InitiateAuthInput+Amplify.swift index 166bec220c..5d0a279287 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/InitiateAuthInput+Amplify.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Support/Utils/InitiateAuthInput+Amplify.swift @@ -93,27 +93,6 @@ extension InitiateAuthInput { environment: environment) } - static func refreshAuthInput(username: String, - refreshToken: String, - clientMetadata: [String: String], - asfDeviceId: String, - deviceMetadata: DeviceMetadata, - environment: UserPoolEnvironment) async -> InitiateAuthInput { - - let authParameters = [ - "REFRESH_TOKEN": refreshToken - ] - - return await buildInput(username: username, - authFlowType: .refreshTokenAuth, - authParameters: authParameters, - clientMetadata: clientMetadata, - asfDeviceId: asfDeviceId, - deviceMetadata: deviceMetadata, - environment: environment) - - } - static func buildInput(username: String, authFlowType: CognitoIdentityProviderClientTypes.AuthFlowType, authParameters: [String: String], diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift index 1dbc164dff..33aca27a08 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift @@ -5,10 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 // -import XCTest -import Amplify -import AWSPluginsCore import AWSCognitoIdentityProvider +import AWSPluginsCore +import Amplify +import XCTest @testable import AWSCognitoAuthPlugin @@ -20,18 +20,19 @@ class RefreshUserPoolTokensTests: XCTestCase { let action = RefreshUserPoolTokens(existingSignedIndata: .testData) - await action.execute(withDispatcher: MockDispatcher { event in + await action.execute( + withDispatcher: MockDispatcher { event in - guard let event = event as? RefreshSessionEvent else { - return - } + guard let event = event as? RefreshSessionEvent else { + return + } - if case let .throwError(error) = event.eventType { - XCTAssertNotNil(error) - XCTAssertEqual(error, .noUserPool) - expectation.fulfill() - } - }, environment: MockInvalidEnvironment() + if case let .throwError(error) = event.eventType { + XCTAssertNotNil(error) + XCTAssertEqual(error, .noUserPool) + expectation.fulfill() + } + }, environment: MockInvalidEnvironment() ) await fulfillment( @@ -45,25 +46,27 @@ class RefreshUserPoolTokensTests: XCTestCase { let expectation = expectation(description: "refreshUserPoolTokens") let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = { MockIdentityProvider( - mockInitiateAuthResponse: { _ in - return InitiateAuthOutput() + mockGetTokensFromRefreshTokenResponse: { _ in + return GetTokensFromRefreshTokenOutput() } ) } let action = RefreshUserPoolTokens(existingSignedIndata: .testData) - await action.execute(withDispatcher: MockDispatcher { event in + await action.execute( + withDispatcher: MockDispatcher { event in - guard let event = event as? RefreshSessionEvent else { return } + guard let event = event as? RefreshSessionEvent else { return } - if case let .throwError(error) = event.eventType { - XCTAssertNotNil(error) - XCTAssertEqual(error, .invalidTokens) - expectation.fulfill() - } - }, environment: Defaults.makeDefaultAuthEnvironment( - userPoolFactory: identityProviderFactory) + if case let .throwError(error) = event.eventType { + XCTAssertNotNil(error) + XCTAssertEqual(error, .invalidTokens) + expectation.fulfill() + } + }, + environment: Defaults.makeDefaultAuthEnvironment( + userPoolFactory: identityProviderFactory) ) await fulfillment( @@ -77,8 +80,8 @@ class RefreshUserPoolTokensTests: XCTestCase { let expectation = expectation(description: "refreshUserPoolTokens") let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = { MockIdentityProvider( - mockInitiateAuthResponse: { _ in - return InitiateAuthOutput( + mockGetTokensFromRefreshTokenResponse: { _ in + return GetTokensFromRefreshTokenOutput( authenticationResult: .init( accessToken: "accessTokenNew", expiresIn: 100, @@ -90,14 +93,17 @@ class RefreshUserPoolTokensTests: XCTestCase { let action = RefreshUserPoolTokens(existingSignedIndata: .testData) - await action.execute(withDispatcher: MockDispatcher { event in + await action.execute( + withDispatcher: MockDispatcher { event in - if let userPoolEvent = event as? RefreshSessionEvent, - case .refreshIdentityInfo = userPoolEvent.eventType { - expectation.fulfill() - } - }, environment: Defaults.makeDefaultAuthEnvironment( - userPoolFactory: identityProviderFactory) + if let userPoolEvent = event as? RefreshSessionEvent, + case .refreshIdentityInfo = userPoolEvent.eventType + { + expectation.fulfill() + } + }, + environment: Defaults.makeDefaultAuthEnvironment( + userPoolFactory: identityProviderFactory) ) await fulfillment( @@ -114,7 +120,7 @@ class RefreshUserPoolTokensTests: XCTestCase { let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = { MockIdentityProvider( - mockInitiateAuthResponse: { _ in + mockGetTokensFromRefreshTokenResponse: { _ in throw testError } ) @@ -128,15 +134,17 @@ class RefreshUserPoolTokensTests: XCTestCase { let action = RefreshUserPoolTokens(existingSignedIndata: .testData) - await action.execute(withDispatcher: MockDispatcher { event in + await action.execute( + withDispatcher: MockDispatcher { event in - if let userPoolEvent = event as? RefreshSessionEvent, - case let .throwError(error) = userPoolEvent.eventType { - XCTAssertNotNil(error) - XCTAssertEqual(error, .service(testError)) - expectation.fulfill() - } - }, environment: environment) + if let userPoolEvent = event as? RefreshSessionEvent, + case let .throwError(error) = userPoolEvent.eventType + { + XCTAssertNotNil(error) + XCTAssertEqual(error, .service(testError)) + expectation.fulfill() + } + }, environment: environment) await fulfillment( of: [expectation], @@ -144,4 +152,79 @@ class RefreshUserPoolTokensTests: XCTestCase { ) } + func testRefreshTokenRotation() async { + + let expectation = expectation(description: "refreshTokenRotation") + let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = { + MockIdentityProvider( + mockGetTokensFromRefreshTokenResponse: { _ in + return GetTokensFromRefreshTokenOutput( + authenticationResult: .init( + accessToken: "accessTokenNew", + expiresIn: 100, + idToken: "idTokenNew", + refreshToken: "refreshTokenRotated")) + } + ) + } + + let action = RefreshUserPoolTokens(existingSignedIndata: .testData) + + await action.execute( + withDispatcher: MockDispatcher { event in + + if let userPoolEvent = event as? RefreshSessionEvent, + case let .refreshIdentityInfo(signedInData, _) = userPoolEvent.eventType + { + XCTAssertEqual( + signedInData.cognitoUserPoolTokens.refreshToken, "refreshTokenRotated") + expectation.fulfill() + } + }, + environment: Defaults.makeDefaultAuthEnvironment( + userPoolFactory: identityProviderFactory) + ) + + await fulfillment( + of: [expectation], + timeout: 0.1 + ) + } + func testRefreshTokenMissing() async { + + let expectation = expectation(description: "refreshTokenMissing") + let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = { + MockIdentityProvider( + mockGetTokensFromRefreshTokenResponse: { _ in + return GetTokensFromRefreshTokenOutput( + authenticationResult: .init( + accessToken: "accessTokenNew", + expiresIn: 100, + idToken: "idTokenNew", + refreshToken: nil)) + } + ) + } + + let action = RefreshUserPoolTokens(existingSignedIndata: .testData) + + await action.execute( + withDispatcher: MockDispatcher { event in + + if let userPoolEvent = event as? RefreshSessionEvent, + case let .throwError(error) = userPoolEvent.eventType + { + XCTAssertEqual(error, .invalidTokens) + expectation.fulfill() + } + }, + environment: Defaults.makeDefaultAuthEnvironment( + userPoolFactory: identityProviderFactory) + ) + + await fulfillment( + of: [expectation], + timeout: 0.1 + ) + } } diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift index d33a7f05c0..7b28037a3d 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift @@ -136,7 +136,7 @@ private class MockSRPClientBehavior: SRPClientBehavior { return "UHexValue" } - static var authenticationKey: Result = .success(Data("AuthenticationKey".utf8)) + nonisolated(unsafe) static var authenticationKey: Result = .success(Data("AuthenticationKey".utf8)) static func generateAuthenticationKey( sharedSecretHexValue: String, uHexValue: String diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift index dda11d4521..29e78663e5 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift @@ -423,7 +423,7 @@ class AuthHubEventHandlerTests: XCTestCase { .notStarted) let mockIdentityProvider = MockIdentityProvider( - mockInitiateAuthResponse: { _ in + mockGetTokensFromRefreshTokenResponse: { _ in throw AWSCognitoIdentityProvider.NotAuthorizedException() }) diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/AWSCognitoUserPoolTokens+Mock.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/AWSCognitoUserPoolTokens+Mock.swift index 3bdd67555c..5ba6d11ea1 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/AWSCognitoUserPoolTokens+Mock.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/AWSCognitoUserPoolTokens+Mock.swift @@ -6,7 +6,7 @@ // import Foundation -@testable import AWSCognitoAuthPlugin +@testable @preconcurrency import AWSCognitoAuthPlugin extension AWSCognitoUserPoolTokens { diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/AuthTestData.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/AuthTestData.swift index 01a4bff480..cf085870ae 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/AuthTestData.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/AuthTestData.swift @@ -7,7 +7,7 @@ import Foundation -@testable import AWSCognitoAuthPlugin +@testable @preconcurrency import AWSCognitoAuthPlugin extension AuthenticationEvent { diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift index 469bddb54d..1c47ac158f 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift @@ -7,7 +7,7 @@ import Foundation -@testable import AWSCognitoAuthPlugin +@testable @preconcurrency import AWSCognitoAuthPlugin import AWSCognitoIdentityProvider // MARK: - Test Data diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SignOutState/SignOutStateTestData.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SignOutState/SignOutStateTestData.swift index 2036eb387f..da039ff184 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SignOutState/SignOutStateTestData.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SignOutState/SignOutStateTestData.swift @@ -7,7 +7,7 @@ import Foundation -@testable import AWSCognitoAuthPlugin +@testable @preconcurrency import AWSCognitoAuthPlugin import AWSCognitoIdentityProvider // MARK: - Test Data diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift index b229705b56..dc1b6e71a7 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift @@ -20,6 +20,9 @@ struct MockIdentityProvider: CognitoUserPoolBehavior { typealias MockInitiateAuthResponse = (InitiateAuthInput) async throws -> InitiateAuthOutput + typealias MockGetTokensFromRefreshTokenResponse = (GetTokensFromRefreshTokenInput) async throws + -> GetTokensFromRefreshTokenOutput + typealias MockConfirmSignUpResponse = (ConfirmSignUpInput) async throws -> ConfirmSignUpOutput @@ -88,6 +91,7 @@ struct MockIdentityProvider: CognitoUserPoolBehavior { let mockSignUpResponse: MockSignUpResponse? let mockRevokeTokenResponse: MockRevokeTokenResponse? let mockInitiateAuthResponse: MockInitiateAuthResponse? + let mockGetTokensFromRefreshTokenResponse: MockGetTokensFromRefreshTokenResponse? let mockGlobalSignOutResponse: MockGlobalSignOutResponse? let mockConfirmSignUpResponse: MockConfirmSignUpResponse? let mockRespondToAuthChallengeResponse: MockRespondToAuthChallengeResponse? @@ -116,6 +120,7 @@ struct MockIdentityProvider: CognitoUserPoolBehavior { mockSignUpResponse: MockSignUpResponse? = nil, mockRevokeTokenResponse: MockRevokeTokenResponse? = nil, mockInitiateAuthResponse: MockInitiateAuthResponse? = nil, + mockGetTokensFromRefreshTokenResponse: MockGetTokensFromRefreshTokenResponse? = nil, mockGlobalSignOutResponse: MockGlobalSignOutResponse? = nil, mockConfirmSignUpResponse: MockConfirmSignUpResponse? = nil, mockRespondToAuthChallengeResponse: MockRespondToAuthChallengeResponse? = nil, @@ -139,6 +144,7 @@ struct MockIdentityProvider: CognitoUserPoolBehavior { self.mockSignUpResponse = mockSignUpResponse self.mockRevokeTokenResponse = mockRevokeTokenResponse self.mockInitiateAuthResponse = mockInitiateAuthResponse + self.mockGetTokensFromRefreshTokenResponse = mockGetTokensFromRefreshTokenResponse self.mockGlobalSignOutResponse = mockGlobalSignOutResponse self.mockConfirmSignUpResponse = mockConfirmSignUpResponse self.mockRespondToAuthChallengeResponse = mockRespondToAuthChallengeResponse @@ -192,6 +198,11 @@ struct MockIdentityProvider: CognitoUserPoolBehavior { return try await mockRevokeTokenResponse!(input) } + /// Throws GetTokensFromRefreshTokenOutputError + func getTokensFromRefreshToken(input: GetTokensFromRefreshTokenInput) async throws -> GetTokensFromRefreshTokenOutput { + return try await mockGetTokensFromRefreshTokenResponse!(input) + } + func getUserAttributeVerificationCode(input: GetUserAttributeVerificationCodeInput) async throws -> GetUserAttributeVerificationCodeOutput { return try await mockGetUserAttributeVerificationCodeOutput!(input) } diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift index 7373a81917..90d56ee17c 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift @@ -95,9 +95,9 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { AuthorizationState.sessionEstablished( AmplifyCredentials.testData), .notStarted) - let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in + let getTokensFromRefreshToken: MockIdentityProvider.MockGetTokensFromRefreshTokenResponse = { _ in resultExpectation.fulfill() - return InitiateAuthOutput(authenticationResult: .init( + return GetTokensFromRefreshTokenOutput(authenticationResult: .init( accessToken: "accessToken", expiresIn: 1000, idToken: "idToken", @@ -115,7 +115,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { } let plugin = configurePluginWith( - userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) }, + userPool: { MockIdentityProvider(mockGetTokensFromRefreshTokenResponse: getTokensFromRefreshToken) }, identityPool: { MockIdentity(mockGetCredentialsResponse: awsCredentials) }, initialState: initialState) let session = try await plugin.fetchAuthSession(options: .forceRefresh()) @@ -212,11 +212,11 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { AmplifyCredentials.testDataWithExpiredTokens), .notStarted) - let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in + let getTokensFromRefreshToken: MockIdentityProvider.MockGetTokensFromRefreshTokenResponse = { _ in throw AWSCognitoIdentityProvider.NotAuthorizedException() } - let plugin = configurePluginWith(userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) }, initialState: initialState) + let plugin = configurePluginWith(userPool: { MockIdentityProvider(mockGetTokensFromRefreshTokenResponse: getTokensFromRefreshToken) }, initialState: initialState) let session = try await plugin.fetchAuthSession(options: AuthFetchSessionRequest.Options()) XCTAssertTrue(session.isSignedIn) @@ -261,8 +261,8 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { AmplifyCredentials.testDataWithExpiredTokens), .notStarted) - let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in - return InitiateAuthOutput(authenticationResult: .init(accessToken: "accessToken", + let getTokensFromRefreshToken: MockIdentityProvider.MockGetTokensFromRefreshTokenResponse = { _ in + return GetTokensFromRefreshTokenOutput(authenticationResult: .init(accessToken: "accessToken", expiresIn: 1000, idToken: "idToken", refreshToken: "refreshToke")) @@ -273,7 +273,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { } let plugin = configurePluginWith( - userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) }, + userPool: { MockIdentityProvider(mockGetTokensFromRefreshTokenResponse: getTokensFromRefreshToken) }, identityPool: { MockIdentity(mockGetCredentialsResponse: awsCredentials) }, initialState: initialState) @@ -494,15 +494,15 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { AmplifyCredentials.testDataWithExpiredTokens), .notStarted) - let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in - return InitiateAuthOutput(authenticationResult: .init(accessToken: nil, + let refreshTokenAuth: MockIdentityProvider.MockGetTokensFromRefreshTokenResponse = { _ in + return GetTokensFromRefreshTokenOutput(authenticationResult: .init(accessToken: nil, expiresIn: 1000, idToken: "idToken", refreshToken: "refreshToke")) } let plugin = configurePluginWith( - userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) }, + userPool: { MockIdentityProvider(mockGetTokensFromRefreshTokenResponse: refreshTokenAuth) }, initialState: initialState) let session = try await plugin.fetchAuthSession(options: AuthFetchSessionRequest.Options()) @@ -548,8 +548,8 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { AmplifyCredentials.testDataWithExpiredTokens), .notStarted) - let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in - return InitiateAuthOutput(authenticationResult: .init(accessToken: "accessToken", + let refreshTokenAuth: MockIdentityProvider.MockGetTokensFromRefreshTokenResponse = { _ in + return GetTokensFromRefreshTokenOutput(authenticationResult: .init(accessToken: "accessToken", expiresIn: 1000, idToken: "idToken", refreshToken: "refreshToke")) @@ -559,7 +559,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { return GetCredentialsForIdentityOutput(credentials: nil, identityId: "ss") } let plugin = configurePluginWith( - userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) }, + userPool: { MockIdentityProvider(mockGetTokensFromRefreshTokenResponse: refreshTokenAuth) }, identityPool: { MockIdentity(mockGetCredentialsResponse: awsCredentials) }, initialState: initialState) @@ -714,12 +714,12 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { AmplifyCredentials.testDataWithExpiredTokens), .notStarted) - let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in + let refreshTokenAuth: MockIdentityProvider.MockGetTokensFromRefreshTokenResponse = { _ in throw AWSCognitoIdentityProvider.NotAuthorizedException(message: "NotAuthorized") } let plugin = configurePluginWith( - userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) }, + userPool: { MockIdentityProvider(mockGetTokensFromRefreshTokenResponse: refreshTokenAuth) }, initialState: initialState) let session = try await plugin.fetchAuthSession(options: AuthFetchSessionRequest.Options()) @@ -816,8 +816,8 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { AmplifyCredentials.testDataWithExpiredTokens), .notStarted) - let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in - return InitiateAuthOutput(authenticationResult: .init(accessToken: "accessToken", + let refreshTokenAuth: MockIdentityProvider.MockGetTokensFromRefreshTokenResponse = { _ in + return GetTokensFromRefreshTokenOutput(authenticationResult: .init(accessToken: "accessToken", expiresIn: 1000, idToken: "idToken", refreshToken: "refreshToke")) @@ -827,7 +827,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests { throw NSError(domain: NSURLErrorDomain, code: 1, userInfo: nil) } let plugin = configurePluginWith( - userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) }, + userPool: { MockIdentityProvider(mockGetTokensFromRefreshTokenResponse: refreshTokenAuth) }, identityPool: { MockIdentity(mockGetCredentialsResponse: awsCredentials) }, initialState: initialState) diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift index c59b47db29..a7649360c7 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift @@ -9,7 +9,7 @@ import Foundation import XCTest @testable import Amplify -@testable import AWSCognitoAuthPlugin +@testable @preconcurrency import AWSCognitoAuthPlugin import AWSCognitoIdentityProvider import ClientRuntime import AwsCommonRuntimeKit diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift index b0e28dabd8..e8635b1bd4 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift @@ -8,7 +8,7 @@ import XCTest import AWSCognitoIdentity @testable import Amplify -@testable import AWSCognitoAuthPlugin +@testable @preconcurrency import AWSCognitoAuthPlugin import AWSCognitoIdentityProvider import ClientRuntime diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/hierarchical-state-machine-swiftTests/StateMachineListenerTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/hierarchical-state-machine-swiftTests/StateMachineListenerTests.swift index cdb8ccdc6b..d2f90fb150 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/hierarchical-state-machine-swiftTests/StateMachineListenerTests.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/hierarchical-state-machine-swiftTests/StateMachineListenerTests.swift @@ -6,7 +6,7 @@ // import XCTest -@testable import AWSCognitoAuthPlugin +@testable @preconcurrency import AWSCognitoAuthPlugin class StateMachineListenerTests: XCTestCase { diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Keychain/KeychainStore.swift b/AmplifyPlugins/Core/AWSPluginsCore/Keychain/KeychainStore.swift index 4d1063c44c..28f4ec8ba3 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Keychain/KeychainStore.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Keychain/KeychainStore.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Foundation +@preconcurrency import Foundation import Security import Amplify diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Auth/AuthModeStrategyTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Auth/AuthModeStrategyTests.swift index 8674e962cb..9e4868368e 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Auth/AuthModeStrategyTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Auth/AuthModeStrategyTests.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AWSPluginsCore class AuthModeStrategyTests: XCTestCase { diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/AnyModel/AnyModelTester.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/AnyModel/AnyModelTester.swift index b187d9227e..e755209ad3 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/AnyModel/AnyModelTester.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/AnyModel/AnyModelTester.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import AWSPluginsCore import Foundation diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelMultipleOwnerAuthRuleTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelMultipleOwnerAuthRuleTests.swift index b6ae079862..ea043a1e11 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelMultipleOwnerAuthRuleTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelMultipleOwnerAuthRuleTests.swift @@ -6,7 +6,7 @@ // import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AmplifyTestCommon @testable import AWSPluginsCore /* diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelReadUpdateAuthRuleTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelReadUpdateAuthRuleTests.swift index 778945a24f..6fe05be90a 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelReadUpdateAuthRuleTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelReadUpdateAuthRuleTests.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AmplifyTestCommon @testable import AWSPluginsCore diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndGroupWithGroupClaim.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndGroupWithGroupClaim.swift index a1d37b50fd..b0331334b8 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndGroupWithGroupClaim.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndGroupWithGroupClaim.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AmplifyTestCommon @testable import AWSPluginsCore diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndMultiGroup.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndMultiGroup.swift index 03ac101b21..cb13b53522 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndMultiGroup.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerAuthAndMultiGroup.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AmplifyTestCommon @testable import AWSPluginsCore diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerFieldAuthRuleTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerFieldAuthRuleTests.swift index 7e0856eced..3e4757d2e9 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerFieldAuthRuleTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/Model/Decorator/AuthRuleDecorator/ModelWithOwnerFieldAuthRuleTests.swift @@ -7,7 +7,7 @@ import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify @testable import AmplifyTestCommon @testable import AWSPluginsCore diff --git a/AmplifyPlugins/Core/AWSPluginsCoreTests/WebSocket/WebSocketClientTests.swift b/AmplifyPlugins/Core/AWSPluginsCoreTests/WebSocket/WebSocketClientTests.swift index 052f79d716..df091c4d84 100644 --- a/AmplifyPlugins/Core/AWSPluginsCoreTests/WebSocket/WebSocketClientTests.swift +++ b/AmplifyPlugins/Core/AWSPluginsCoreTests/WebSocket/WebSocketClientTests.swift @@ -7,7 +7,7 @@ import XCTest -import Combine +@preconcurrency import Combine @testable @_spi(WebSocket) import AWSPluginsCore fileprivate let timeout: TimeInterval = 5 diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Migration/MutationSyncMetadataCopy.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Migration/MutationSyncMetadataCopy.swift index 855b3cf079..cf5d7c6370 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Migration/MutationSyncMetadataCopy.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Migration/MutationSyncMetadataCopy.swift @@ -6,7 +6,7 @@ // import Foundation -import Amplify +@preconcurrency import Amplify extension MutationSyncMetadataMigration { public struct MutationSyncMetadataCopy: Model { diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/CascadeDeleteOperation.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/CascadeDeleteOperation.swift index 05e7e42a5d..ed64e27ab1 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/CascadeDeleteOperation.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/CascadeDeleteOperation.swift @@ -6,7 +6,7 @@ // import Foundation -import Amplify +@preconcurrency import Amplify import AWSPluginsCore import Combine diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/SQLite/Model+SQLite.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/SQLite/Model+SQLite.swift index 7ff35dccb2..295c1ecbb0 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/SQLite/Model+SQLite.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Storage/SQLite/Model+SQLite.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation import SQLite import AWSPluginsCore diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOperation.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOperation.swift index 4d9da933cf..0a6ec1d2c0 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOperation.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOperation.swift @@ -6,7 +6,7 @@ // import Amplify -import AWSPluginsCore +@preconcurrency import AWSPluginsCore import Combine import Foundation diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOrchestrator.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOrchestrator.swift index 806b19a240..0fca376773 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOrchestrator.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/InitialSync/InitialSyncOrchestrator.swift @@ -6,7 +6,7 @@ // import Amplify -import AWSPluginsCore +@preconcurrency import AWSPluginsCore import Combine import Foundation @@ -189,7 +189,11 @@ extension AWSInitialSyncOrchestrator: DefaultLogger { extension AWSInitialSyncOrchestrator: Resettable { func reset() async { syncOperationQueue.cancelAllOperations() - syncOperationQueue.waitUntilAllOperationsAreFinished() + await withCheckedContinuation { continuation in + syncOperationQueue.addBarrierBlock { + continuation.resume() + } + } } } diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/OutgoingMutationQueue.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/OutgoingMutationQueue.swift index e2840f7e47..1aa94b60ea 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/OutgoingMutationQueue.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/OutgoingMutationQueue.swift @@ -8,7 +8,7 @@ import Amplify import Combine import Foundation -import AWSPluginsCore +@preconcurrency import AWSPluginsCore /// Submits outgoing mutation events to the provisioned API protocol OutgoingMutationQueueBehavior: AnyObject { diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/ProcessMutationErrorFromCloudOperation.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/ProcessMutationErrorFromCloudOperation.swift index 2d94b62222..dfb140b4d8 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/ProcessMutationErrorFromCloudOperation.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/ProcessMutationErrorFromCloudOperation.swift @@ -8,7 +8,7 @@ import Amplify import Combine import Foundation -import AWSPluginsCore +@preconcurrency import AWSPluginsCore // swiftlint:disable type_body_length file_length /// Checks the GraphQL error response for specific error scenarios related to data synchronziation to the local store. diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/SyncMutationToCloudOperation.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/SyncMutationToCloudOperation.swift index 9fc7293ee2..f783384b88 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/SyncMutationToCloudOperation.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/SyncMutationToCloudOperation.swift @@ -8,7 +8,7 @@ import Amplify import Combine import Foundation -import AWSPluginsCore +@preconcurrency import AWSPluginsCore /// Publishes a mutation event to the specified Cloud API. Upon receipt of the API response, validates to ensure it is /// not a retriable error. If it is, attempts a retry until either success or terminal failure. Upon success or diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisher.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisher.swift index e9a89800dd..1c48bee457 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisher.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisher.swift @@ -6,7 +6,7 @@ // import Amplify -@_spi(WebSocket) import AWSPluginsCore +@_spi(WebSocket) @preconcurrency import AWSPluginsCore import Combine import Foundation diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventToAnyModelMapper.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventToAnyModelMapper.swift index 2e1aef7248..910f1e0d5f 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventToAnyModelMapper.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventToAnyModelMapper.swift @@ -6,7 +6,7 @@ // import Amplify -import AWSPluginsCore +@preconcurrency import AWSPluginsCore import Combine enum IncomingAsyncSubscriptionEvent { diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/AWSModelReconciliationQueue.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/AWSModelReconciliationQueue.swift index 03074d82e3..4af351b753 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/AWSModelReconciliationQueue.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/AWSModelReconciliationQueue.swift @@ -6,7 +6,7 @@ // import Amplify -import AWSPluginsCore +@preconcurrency import AWSPluginsCore import Combine import Foundation diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/ReconcileAndLocalSaveQueue.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/ReconcileAndLocalSaveQueue.swift index 30434dc04e..bfd4d06f07 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/ReconcileAndLocalSaveQueue.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/ReconcileAndLocalSaveQueue.swift @@ -6,7 +6,7 @@ // import Amplify -import Combine +@preconcurrency import Combine import Foundation import AWSPluginsCore diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOperationSyncExpressionTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOperationSyncExpressionTests.swift index e118693987..0c6465c152 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOperationSyncExpressionTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOperationSyncExpressionTests.swift @@ -12,7 +12,7 @@ import Combine @testable import Amplify @testable import AmplifyTestCommon @testable import AWSDataStorePlugin -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore class InitialSyncOperationSyncExpressionTests: XCTestCase { typealias APIPluginQueryResponder = QueryRequestResponder> diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOrchestratorTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOrchestratorTests.swift index 1e4a7ca208..e03c44b327 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOrchestratorTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/InitialSyncOrchestratorTests.swift @@ -11,7 +11,7 @@ import Foundation @testable import Amplify @testable import AmplifyTestCommon @testable import AWSDataStorePlugin -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore class InitialSyncOrchestratorTests: XCTestCase { diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/ModelSyncedEventEmitterTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/ModelSyncedEventEmitterTests.swift index 809a8b9cfa..54e693c9aa 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/ModelSyncedEventEmitterTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/InitialSync/ModelSyncedEventEmitterTests.swift @@ -14,7 +14,7 @@ import Combine @testable @preconcurrency import AWSPluginsCore @testable @preconcurrency import AWSDataStorePlugin -class ModelSyncedEventEmitterTests: XCTestCase { +class ModelSyncedEventEmitterTests: XCTestCase, @unchecked Sendable { var initialSyncOrchestrator: MockAWSInitialSyncOrchestrator? var reconciliationQueue: MockAWSIncomingEventReconciliationQueue? diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueNetworkTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueNetworkTests.swift index cafe0f5569..fa4c960d1f 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueNetworkTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueNetworkTests.swift @@ -11,7 +11,7 @@ import Combine @testable import Amplify @testable import AmplifyTestCommon -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore @testable import AWSDataStorePlugin @_implementationOnly import AmplifyAsyncTesting diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTests.swift index 8802e832ff..7669cc65dd 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTests.swift @@ -10,7 +10,7 @@ import SQLite @testable import Amplify @testable import AmplifyTestCommon -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore @testable import AWSDataStorePlugin class OutgoingMutationQueueTests: SyncEngineTestBase { diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTestsWithMockStateMachine.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTestsWithMockStateMachine.swift index 722a3821c2..44eb859c9c 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTestsWithMockStateMachine.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/OutgoingMutationQueueTestsWithMockStateMachine.swift @@ -11,7 +11,7 @@ import XCTest @testable import Amplify @testable import AmplifyTestCommon -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore @testable import AWSDataStorePlugin class OutgoingMutationQueueMockStateTest: XCTestCase { diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/ProcessMutationErrorFromCloudOperationTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/ProcessMutationErrorFromCloudOperationTests.swift index fc2133fa69..d4ba420aab 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/ProcessMutationErrorFromCloudOperationTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/ProcessMutationErrorFromCloudOperationTests.swift @@ -11,7 +11,7 @@ import Combine @testable import Amplify @testable import AmplifyTestCommon -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore @testable import AWSDataStorePlugin // swiftlint:disable type_body_length diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisherTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisherTests.swift index 25f4f1d441..48fb2ce820 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisherTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/IncomingAsyncSubscriptionEventPublisherTests.swift @@ -8,7 +8,7 @@ import XCTest @testable import Amplify @testable import AmplifyTestCommon -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore @testable @preconcurrency import AWSDataStorePlugin final class IncomingAsyncSubscriptionEventPublisherTests: XCTestCase { diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationDeleteTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationDeleteTests.swift index d153f98310..e028683664 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationDeleteTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationDeleteTests.swift @@ -10,7 +10,7 @@ import XCTest @testable import Amplify @testable import AmplifyTestCommon -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore @testable import AWSDataStorePlugin typealias MutationSyncInProcessListener = GraphQLSubscriptionOperation>.InProcessListener diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationQueueBehaviorTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationQueueBehaviorTests.swift index 34e381fba5..cfc10f9a82 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationQueueBehaviorTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/ModelReconciliationQueueBehaviorTests.swift @@ -11,7 +11,7 @@ import Combine @testable import Amplify @testable import AmplifyTestCommon @testable import AWSDataStorePlugin -@testable import AWSPluginsCore +@testable @preconcurrency import AWSPluginsCore class ModelReconciliationQueueBehaviorTests: ReconciliationQueueTestBase { diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/Support/MockSQLiteStorageEngineAdapter.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/Support/MockSQLiteStorageEngineAdapter.swift index dbdfdbf2a2..78e6b57833 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/Support/MockSQLiteStorageEngineAdapter.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/SubscriptionSync/Support/MockSQLiteStorageEngineAdapter.swift @@ -14,7 +14,7 @@ import Combine class MockSQLiteStorageEngineAdapter: StorageEngineAdapter { - static var maxNumberOfPredicates: Int = 950 + static let maxNumberOfPredicates: Int = 950 var responders = [ResponderKeys: Any]() diff --git a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/Support/StopwatchTests.swift b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/Support/StopwatchTests.swift index 2f11cb5979..40dfdbf80e 100644 --- a/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/Support/StopwatchTests.swift +++ b/AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/Support/StopwatchTests.swift @@ -6,7 +6,7 @@ // import XCTest -@testable import AWSDataStorePlugin +@testable @preconcurrency import AWSDataStorePlugin class StopwatchTests: XCTestCase { diff --git a/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Support/Constants/GeoPluginTestConfig.swift b/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Support/Constants/GeoPluginTestConfig.swift index cf11c975e3..e43a0e62cb 100644 --- a/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Support/Constants/GeoPluginTestConfig.swift +++ b/AmplifyPlugins/Geo/Tests/AWSLocationGeoPluginTests/Support/Constants/GeoPluginTestConfig.swift @@ -6,7 +6,7 @@ // import Foundation -@testable @_spi(InternalAmplifyConfiguration) import Amplify +@testable @_spi(InternalAmplifyConfiguration) @preconcurrency import Amplify @testable import AWSLocationGeoPlugin struct GeoPluginTestConfig { diff --git a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Analytics/AnalyticsClient.swift b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Analytics/AnalyticsClient.swift index c7db089487..48b5bde875 100644 --- a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Analytics/AnalyticsClient.swift +++ b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Analytics/AnalyticsClient.swift @@ -60,7 +60,7 @@ actor AnalyticsClient: AnalyticsClientBehaviour { } private let eventRecorder: AnalyticsEventRecording - private let sessionProvider: SessionProvider + private nonisolated let sessionProvider: SessionProvider private lazy var globalAttributes: PinpointEventAttributes = [:] private lazy var globalMetrics: PinpointEventMetrics = [:] private lazy var globalRemoteAttributes: [String: String] = [:] diff --git a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Endpoint/EndpointClient.swift b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Endpoint/EndpointClient.swift index e89118f4bb..e6baf5d821 100644 --- a/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Endpoint/EndpointClient.swift +++ b/AmplifyPlugins/Internal/Sources/InternalAWSPinpoint/Endpoint/EndpointClient.swift @@ -13,7 +13,7 @@ import Foundation @_spi(InternalAWSPinpoint) public protocol EndpointClientBehaviour: Actor { - nonisolated var pinpointClient: PinpointClientProtocol { get } + var pinpointClient: PinpointClientProtocol { get } func currentEndpointProfile() async -> PinpointEndpointProfile func updateEndpointProfile() async throws @@ -28,7 +28,7 @@ actor EndpointClient: EndpointClientBehaviour { let isDebug: Bool } - let pinpointClient: PinpointClientProtocol + nonisolated let pinpointClient: PinpointClientProtocol private let configuration: EndpointClient.Configuration private let archiver: AmplifyArchiverBehaviour diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AWSPinpointFactoryTests.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AWSPinpointFactoryTests.swift index bdef7cd7c5..8305f96483 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AWSPinpointFactoryTests.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AWSPinpointFactoryTests.swift @@ -6,7 +6,7 @@ // @testable import AmplifyTestCommon -@_spi(InternalAWSPinpoint) @testable import InternalAWSPinpoint +@_spi(InternalAWSPinpoint) @testable @preconcurrency import InternalAWSPinpoint import XCTest final class AWSPinpointFactoryTests: XCTestCase { diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/ActivityTrackerTests.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/ActivityTrackerTests.swift index d6756720e3..a7efaa9bb6 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/ActivityTrackerTests.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/ActivityTrackerTests.swift @@ -32,7 +32,7 @@ class ActivityTrackerTests: XCTestCase { }() @MainActor - private static let applicationWillMoveToForegoundNotification: Notification.Name = { + private static let applicationWillMoveToForegoundNotification: Notification.Name = { #if canImport(WatchKit) WKExtension.applicationWillEnterForegroundNotification #elseif canImport(UIKit) @@ -43,7 +43,7 @@ class ActivityTrackerTests: XCTestCase { }() @MainActor - private static var applicationWillTerminateNotification: Notification.Name = { + private static let applicationWillTerminateNotification: Notification.Name = { #if canImport(WatchKit) WKExtension.applicationWillResignActiveNotification #elseif canImport(UIKit) diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AnalyticsClientTests.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AnalyticsClientTests.swift index 723ea9ecb7..b2c1ec7dd8 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AnalyticsClientTests.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/AnalyticsClientTests.swift @@ -6,7 +6,7 @@ // SPDX-License-Identifier: Apache-2.0 // -@_spi(InternalAWSPinpoint) @testable import InternalAWSPinpoint +@_spi(InternalAWSPinpoint) @testable @preconcurrency import InternalAWSPinpoint import StoreKit import XCTest diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EndpointClientTests.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EndpointClientTests.swift index e72be8504f..ad378d831b 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EndpointClientTests.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EndpointClientTests.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -@_spi(InternalAWSPinpoint) @testable import InternalAWSPinpoint +@_spi(InternalAWSPinpoint) @testable @preconcurrency import InternalAWSPinpoint import XCTest import AWSPinpoint import UserNotifications diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EventRecorderTests.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EventRecorderTests.swift index a3dd35c738..144990d05f 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EventRecorderTests.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/EventRecorderTests.swift @@ -9,8 +9,8 @@ import XCTest import AWSPinpoint import AwsCommonRuntimeKit @testable import Amplify -import ClientRuntime -@_spi(InternalAWSPinpoint) @testable import InternalAWSPinpoint +@preconcurrency import ClientRuntime +@_spi(InternalAWSPinpoint) @testable @preconcurrency import InternalAWSPinpoint class EventRecorderTests: XCTestCase { var recorder: AnalyticsEventRecording! @@ -197,17 +197,17 @@ class EventRecorderTests: XCTestCase { } private struct RetryableError: Error, ModeledError { - static var typeName = "RetriableError" - static var fault = ErrorFault.client - static var isRetryable = true - static var isThrottling = false + static let typeName = "RetriableError" + static let fault = ErrorFault.client + static let isRetryable = true + static let isThrottling = false } private struct NonRetryableError: Error, ModeledError { - static var typeName = "RetriableError" - static var fault = ErrorFault.client - static var isRetryable = false - static var isThrottling = false + static let typeName = "RetriableError" + static let fault = ErrorFault.client + static let isRetryable = false + static let isThrottling = false } private class ConnectivityError: NSError, @unchecked Sendable { diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockAnalyticsClient.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockAnalyticsClient.swift index 307fb0775e..3d1204a7e0 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockAnalyticsClient.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockAnalyticsClient.swift @@ -6,13 +6,13 @@ // import AWSPinpoint -@_spi(InternalAWSPinpoint) @testable import InternalAWSPinpoint +@_spi(InternalAWSPinpoint) @testable @preconcurrency import InternalAWSPinpoint import StoreKit import XCTest import AmplifyAsyncTesting actor MockAnalyticsClient: AnalyticsClientBehaviour { - let pinpointClient: PinpointClientProtocol = MockPinpointClient() + nonisolated let pinpointClient: PinpointClientProtocol = MockPinpointClient() var addGlobalAttributeCalls = [(String, String)]() func addGlobalAttribute(_ attribute: String, forKey key: String) { diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift index 9955156cdb..4a70e56eec 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/Mocks/MockEndpointClient.swift @@ -5,13 +5,13 @@ // SPDX-License-Identifier: Apache-2.0 // -@_spi(InternalAWSPinpoint) @testable import InternalAWSPinpoint +@_spi(InternalAWSPinpoint) @testable @preconcurrency import InternalAWSPinpoint import AWSClientRuntime import AWSPinpoint import Foundation actor MockEndpointClient: EndpointClientBehaviour { - let pinpointClient: PinpointClientProtocol = MockPinpointClient() + nonisolated let pinpointClient: PinpointClientProtocol = MockPinpointClient() var updateEndpointProfileCount = 0 func updateEndpointProfile() async throws { diff --git a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/SessionClientTests.swift b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/SessionClientTests.swift index 9799d3a172..8ed3eb5a74 100644 --- a/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/SessionClientTests.swift +++ b/AmplifyPlugins/Internal/Tests/InternalAWSPinpointUnitTests/SessionClientTests.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -@_spi(InternalAWSPinpoint) @testable import InternalAWSPinpoint +@_spi(InternalAWSPinpoint) @testable @preconcurrency import InternalAWSPinpoint import XCTest import AmplifyAsyncTesting diff --git a/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Producer/RotatingLogger.swift b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Producer/RotatingLogger.swift index 238dbfb7d5..48f7f884b6 100644 --- a/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Producer/RotatingLogger.swift +++ b/AmplifyPlugins/Logging/Sources/AWSCloudWatchLoggingPlugin/Producer/RotatingLogger.swift @@ -6,7 +6,7 @@ // import Amplify -import Combine +@preconcurrency import Combine import Foundation final class RotatingLogger { diff --git a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingMonitorTests.swift b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingMonitorTests.swift index 48f66b98b0..1791a2c2f9 100644 --- a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingMonitorTests.swift +++ b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingMonitorTests.swift @@ -29,9 +29,9 @@ final class AWSCloudWatchLoggingMonitorTests: XCTestCase { /// Given: the the logging monitor is configured with a 2 second interval /// When: the monitor is enabled /// Then: the delegate is autoamtically invoked - func testDelegateIsInvokedOnInterval() { + func testDelegateIsInvokedOnInterval() async { monitor.setAutomaticFlushIntervals() - wait(for: [invokedExpectation], timeout: 3) + await fulfillment(of: [invokedExpectation], timeout: 10) } } diff --git a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingSessionControllerTests.swift b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingSessionControllerTests.swift index 6b06dd0942..b89bc5f384 100644 --- a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingSessionControllerTests.swift +++ b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/AWSCloudWatchLoggingSessionControllerTests.swift @@ -69,7 +69,7 @@ final class AWSCloudWatchLoggingSessionControllerTests: XCTestCase { systemUnderTest.client = mockCloudWatchLogClient systemUnderTest.enable() try await systemUnderTest.flushLogs() - await fulfillment(of: [hubEventExpectation], timeout: 2) + await fulfillment(of: [hubEventExpectation], timeout: 10) } private func getLogFile() -> URL { diff --git a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/LogActorTests.swift b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/LogActorTests.swift index ebd6db2d24..c928f0ee69 100644 --- a/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/LogActorTests.swift +++ b/AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginTests/LogActorTests.swift @@ -6,7 +6,7 @@ // import Amplify -import Combine +@preconcurrency import Combine import XCTest @testable import AWSCloudWatchLoggingPlugin diff --git a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Support/Voice+AWSExtension.swift b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Support/Voice+AWSExtension.swift index e3bab2832d..8e90b048fb 100644 --- a/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Support/Voice+AWSExtension.swift +++ b/AmplifyPlugins/Predictions/AWSPredictionsPlugin/Support/Voice+AWSExtension.swift @@ -5,10 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import AWSPolly -extension Predictions.Voice { +extension Predictions.Voice: @unchecked Sendable { public static let arabicFemaleZeina = Self(id: "Zeina") public static let chineseFemaleZhiyu = Self(id: "Zhiyu") public static let danishFemaleNaja = Self(id: "Naja") diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageLogger.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageLogger.swift index 04b04e86c8..35d0cc3598 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageLogger.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageLogger.swift @@ -6,6 +6,6 @@ // import Foundation -import Amplify +@preconcurrency import Amplify let storageLogger = Amplify.Logging.logger(forCategory: .storage) diff --git a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageServiceSessionDelegate.swift b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageServiceSessionDelegate.swift index 58e079b3f7..dda1c0b595 100644 --- a/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageServiceSessionDelegate.swift +++ b/AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageServiceSessionDelegate.swift @@ -7,7 +7,7 @@ import Foundation -import Amplify +@preconcurrency import Amplify import AWSPluginsCore // MARK: - StorageServiceSessionDelegate - diff --git a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/DefaultStorageTransferDatabaseTests.swift b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/DefaultStorageTransferDatabaseTests.swift index d317df8ea8..867d7e5272 100644 --- a/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/DefaultStorageTransferDatabaseTests.swift +++ b/AmplifyPlugins/Storage/Tests/AWSS3StoragePluginTests/Support/Internal/DefaultStorageTransferDatabaseTests.swift @@ -217,7 +217,7 @@ class DefaultStorageTransferDatabaseTests: XCTestCase { } expectation.fulfill() } - await fulfillment(of: [expectation], timeout: 5) + await fulfillment(of: [expectation], timeout: 10) } /// Given: A DefaultStorageTransferDatabase @@ -228,7 +228,7 @@ class DefaultStorageTransferDatabaseTests: XCTestCase { database.prepareForBackground() { expectation.fulfill() } - await fulfillment(of: [expectation], timeout: 5) + await fulfillment(of: [expectation], timeout: 10) } /// Given: The StorageTransferDatabase Type diff --git a/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift b/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift index aba5185d25..683f052381 100644 --- a/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift +++ b/AmplifyTestCommon/Mocks/MockCredentialsProvider.swift @@ -10,7 +10,7 @@ import AwsCommonRuntimeKit import Foundation import SmithyIdentity -class MockCredentialsProvider: AwsCommonRuntimeKit.CredentialsProviding, AWSCredentialIdentityResolver { +class MockCredentialsProvider: AwsCommonRuntimeKit.CredentialsProviding, AWSCredentialIdentityResolver, @unchecked Sendable { func getCredentials() async throws -> AwsCommonRuntimeKit.Credentials { return try Credentials( accessKey: "accessKey", diff --git a/AmplifyTestCommon/Mocks/MockDevMenuContextProvider.swift b/AmplifyTestCommon/Mocks/MockDevMenuContextProvider.swift index 02f4f3581e..fe43a5f9b0 100644 --- a/AmplifyTestCommon/Mocks/MockDevMenuContextProvider.swift +++ b/AmplifyTestCommon/Mocks/MockDevMenuContextProvider.swift @@ -15,7 +15,7 @@ class MockDevMenuContextProvider: DevMenuPresentationContextProvider { let uiWindow = UIWindow() - func devMenuPresentationContext() -> UIWindow { + nonisolated func devMenuPresentationContext() -> UIWindow { return uiWindow } } diff --git a/AmplifyTestCommon/Models/Article+Schema.swift b/AmplifyTestCommon/Models/Article+Schema.swift index 251a7dfe2c..e69477fedb 100644 --- a/AmplifyTestCommon/Models/Article+Schema.swift +++ b/AmplifyTestCommon/Models/Article+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Article { diff --git a/AmplifyTestCommon/Models/Associations/Author+Schema.swift b/AmplifyTestCommon/Models/Associations/Author+Schema.swift index d9d5041436..b006d13391 100644 --- a/AmplifyTestCommon/Models/Associations/Author+Schema.swift +++ b/AmplifyTestCommon/Models/Associations/Author+Schema.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation extension Author { diff --git a/AmplifyTestCommon/Models/Associations/Book+Schema.swift b/AmplifyTestCommon/Models/Associations/Book+Schema.swift index e71488b030..4429d1a7a7 100644 --- a/AmplifyTestCommon/Models/Associations/Book+Schema.swift +++ b/AmplifyTestCommon/Models/Associations/Book+Schema.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation extension Book { diff --git a/AmplifyTestCommon/Models/Associations/BookAuthor+Schema.swift b/AmplifyTestCommon/Models/Associations/BookAuthor+Schema.swift index c6a22c9bcb..fbda9ca85f 100644 --- a/AmplifyTestCommon/Models/Associations/BookAuthor+Schema.swift +++ b/AmplifyTestCommon/Models/Associations/BookAuthor+Schema.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation extension BookAuthor { diff --git a/AmplifyTestCommon/Models/Associations/UserAccount+Schema.swift b/AmplifyTestCommon/Models/Associations/UserAccount+Schema.swift index dc51cd80e0..5db9f19b8e 100644 --- a/AmplifyTestCommon/Models/Associations/UserAccount+Schema.swift +++ b/AmplifyTestCommon/Models/Associations/UserAccount+Schema.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation extension UserAccount { diff --git a/AmplifyTestCommon/Models/Associations/UserProfile+Schema.swift b/AmplifyTestCommon/Models/Associations/UserProfile+Schema.swift index 6b6eb355d7..8bccd61874 100644 --- a/AmplifyTestCommon/Models/Associations/UserProfile+Schema.swift +++ b/AmplifyTestCommon/Models/Associations/UserProfile+Schema.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation extension UserProfile { diff --git a/AmplifyTestCommon/Models/Collection/1/Project1+Schema.swift b/AmplifyTestCommon/Models/Collection/1/Project1+Schema.swift index d561583928..9ee4b76ca4 100644 --- a/AmplifyTestCommon/Models/Collection/1/Project1+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/1/Project1+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Project1 { diff --git a/AmplifyTestCommon/Models/Collection/1/Team1+Schema.swift b/AmplifyTestCommon/Models/Collection/1/Team1+Schema.swift index be252d9197..ee76ac46ed 100644 --- a/AmplifyTestCommon/Models/Collection/1/Team1+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/1/Team1+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Team1 { diff --git a/AmplifyTestCommon/Models/Collection/2/Project2+Schema.swift b/AmplifyTestCommon/Models/Collection/2/Project2+Schema.swift index 7bd2fd74ce..85d1df0be9 100644 --- a/AmplifyTestCommon/Models/Collection/2/Project2+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/2/Project2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Project2 { diff --git a/AmplifyTestCommon/Models/Collection/2/Team2+Schema.swift b/AmplifyTestCommon/Models/Collection/2/Team2+Schema.swift index 9c7424a94d..2ef9337cc0 100644 --- a/AmplifyTestCommon/Models/Collection/2/Team2+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/2/Team2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Team2 { diff --git a/AmplifyTestCommon/Models/Collection/3/Comment3+Schema.swift b/AmplifyTestCommon/Models/Collection/3/Comment3+Schema.swift index 03c4b0eb64..1804fc9e86 100644 --- a/AmplifyTestCommon/Models/Collection/3/Comment3+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/3/Comment3+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment3 { diff --git a/AmplifyTestCommon/Models/Collection/3/Post3+Schema.swift b/AmplifyTestCommon/Models/Collection/3/Post3+Schema.swift index 9f828c7c44..f935d25323 100644 --- a/AmplifyTestCommon/Models/Collection/3/Post3+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/3/Post3+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post3 { diff --git a/AmplifyTestCommon/Models/Collection/4/Comment4+Schema.swift b/AmplifyTestCommon/Models/Collection/4/Comment4+Schema.swift index 16b6b2a416..6cfe095548 100644 --- a/AmplifyTestCommon/Models/Collection/4/Comment4+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/4/Comment4+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment4 { diff --git a/AmplifyTestCommon/Models/Collection/4/Post4+Schema.swift b/AmplifyTestCommon/Models/Collection/4/Post4+Schema.swift index 17144a90a0..98f8941f0e 100644 --- a/AmplifyTestCommon/Models/Collection/4/Post4+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/4/Post4+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post4 { diff --git a/AmplifyTestCommon/Models/Collection/5/Post5+Schema.swift b/AmplifyTestCommon/Models/Collection/5/Post5+Schema.swift index 3898f6addd..f60235b074 100644 --- a/AmplifyTestCommon/Models/Collection/5/Post5+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/5/Post5+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post5 { diff --git a/AmplifyTestCommon/Models/Collection/5/PostEditor5+Schema.swift b/AmplifyTestCommon/Models/Collection/5/PostEditor5+Schema.swift index 586429c143..a3866848ce 100644 --- a/AmplifyTestCommon/Models/Collection/5/PostEditor5+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/5/PostEditor5+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension PostEditor5 { diff --git a/AmplifyTestCommon/Models/Collection/6/Blog6+Schema.swift b/AmplifyTestCommon/Models/Collection/6/Blog6+Schema.swift index fc6b58b600..7ee7e75f31 100644 --- a/AmplifyTestCommon/Models/Collection/6/Blog6+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/6/Blog6+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Blog6 { diff --git a/AmplifyTestCommon/Models/Collection/6/Comment6+Schema.swift b/AmplifyTestCommon/Models/Collection/6/Comment6+Schema.swift index 3d180ac245..2531df5a94 100644 --- a/AmplifyTestCommon/Models/Collection/6/Comment6+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/6/Comment6+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment6 { diff --git a/AmplifyTestCommon/Models/Collection/6/Post6+Schema.swift b/AmplifyTestCommon/Models/Collection/6/Post6+Schema.swift index e84aa85350..12c6490304 100644 --- a/AmplifyTestCommon/Models/Collection/6/Post6+Schema.swift +++ b/AmplifyTestCommon/Models/Collection/6/Post6+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post6 { diff --git a/AmplifyTestCommon/Models/Comment+Schema.swift b/AmplifyTestCommon/Models/Comment+Schema.swift index fe7813fada..5b743d58b8 100644 --- a/AmplifyTestCommon/Models/Comment+Schema.swift +++ b/AmplifyTestCommon/Models/Comment+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKey+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKey+Schema.swift index ced19ca608..9ee6d71448 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKey+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKey+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension CommentWithCompositeKey { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKeyAndIndex+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKeyAndIndex+Schema.swift index 49d6789653..95e06689a6 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKeyAndIndex+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/CommentWithCompositeKeyAndIndex+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension CommentWithCompositeKeyAndIndex { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositeIntPk+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositeIntPk+Schema.swift index 5668fa4b33..58c839112c 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositeIntPk+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositeIntPk+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelCompositeIntPk { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePk+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePk+Schema.swift index a827c2fed6..3e33980694 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePk+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePk+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelCompositePk { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkBelongsTo+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkBelongsTo+Schema.swift index 525ecc5ce5..0b0c462ec6 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkBelongsTo+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkBelongsTo+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelCompositePkBelongsTo { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift index cbb3bc7f85..a70e43dedd 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCompositePkWithAssociation+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelCompositePkWithAssociation { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCustomPkDefined+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCustomPkDefined+Schema.swift index 49c4b706a5..53dadca294 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCustomPkDefined+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelCustomPkDefined+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelCustomPkDefined { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitCustomPk+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitCustomPk+Schema.swift index 8ea03e2dc2..f37375ae52 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitCustomPk+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitCustomPk+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelExplicitCustomPk { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitDefaultPk+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitDefaultPk+Schema.swift index e7de2f2f80..e3daffd2f2 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitDefaultPk+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelExplicitDefaultPk+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelExplicitDefaultPk { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelImplicitDefaultPk+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelImplicitDefaultPk+Schema.swift index 9519e91e03..fdc7c6e4cd 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/ModelImplicitDefaultPk+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/ModelImplicitDefaultPk+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ModelImplicitDefaultPk { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/PostTagsWithCompositeKey+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/PostTagsWithCompositeKey+Schema.swift index a78c515f67..a009e5acde 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/PostTagsWithCompositeKey+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/PostTagsWithCompositeKey+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension PostTagsWithCompositeKey { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKey+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKey+Schema.swift index d06ac91c7f..4d1786b49d 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKey+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKey+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension PostWithCompositeKey { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyAndIndex+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyAndIndex+Schema.swift index be2161d7ba..26e6109eea 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyAndIndex+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyAndIndex+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension PostWithCompositeKeyAndIndex { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyUnidirectional+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyUnidirectional+Schema.swift index 3148b8c002..96ad16ce19 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyUnidirectional+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithCompositeKeyUnidirectional+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension PostWithCompositeKeyUnidirectional { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithTagsCompositeKey+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithTagsCompositeKey+Schema.swift index e1a30d6816..a2d3101256 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithTagsCompositeKey+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/PostWithTagsCompositeKey+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension PostWithTagsCompositeKey { diff --git a/AmplifyTestCommon/Models/CustomPrimaryKey/TagWithCompositeKey+Schema.swift b/AmplifyTestCommon/Models/CustomPrimaryKey/TagWithCompositeKey+Schema.swift index 4d65058a00..e49247e990 100644 --- a/AmplifyTestCommon/Models/CustomPrimaryKey/TagWithCompositeKey+Schema.swift +++ b/AmplifyTestCommon/Models/CustomPrimaryKey/TagWithCompositeKey+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension TagWithCompositeKey { diff --git a/AmplifyTestCommon/Models/CustomerOrder+Schema.swift b/AmplifyTestCommon/Models/CustomerOrder+Schema.swift index c672f13325..689b0505f4 100644 --- a/AmplifyTestCommon/Models/CustomerOrder+Schema.swift +++ b/AmplifyTestCommon/Models/CustomerOrder+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension CustomerOrder { diff --git a/AmplifyTestCommon/Models/Deprecated/DeprecatedTodo.swift b/AmplifyTestCommon/Models/Deprecated/DeprecatedTodo.swift index 2e364e24d6..9aedbf61eb 100644 --- a/AmplifyTestCommon/Models/Deprecated/DeprecatedTodo.swift +++ b/AmplifyTestCommon/Models/Deprecated/DeprecatedTodo.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation /* The schema used to codegen this model: diff --git a/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPost+Schema.swift b/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPost+Schema.swift index 7d700109e9..c7f658dabc 100644 --- a/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPost+Schema.swift +++ b/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPost+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension M2MPost { diff --git a/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPostEditor+Schema.swift b/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPostEditor+Schema.swift index 7c48259298..f96a1679f1 100644 --- a/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPostEditor+Schema.swift +++ b/AmplifyTestCommon/Models/M2MPostEditorUser/M2MPostEditor+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension M2MPostEditor { diff --git a/AmplifyTestCommon/Models/M2MPostEditorUser/M2MUser+Schema.swift b/AmplifyTestCommon/Models/M2MPostEditorUser/M2MUser+Schema.swift index 452ca2b270..51eaf0a090 100644 --- a/AmplifyTestCommon/Models/M2MPostEditorUser/M2MUser+Schema.swift +++ b/AmplifyTestCommon/Models/M2MPostEditorUser/M2MUser+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension M2MUser { diff --git a/AmplifyTestCommon/Models/MockModels.swift b/AmplifyTestCommon/Models/MockModels.swift index b9c3f248ed..204cda961a 100644 --- a/AmplifyTestCommon/Models/MockModels.swift +++ b/AmplifyTestCommon/Models/MockModels.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation // MARK: - MockSynced diff --git a/AmplifyTestCommon/Models/NonModel/Category.swift b/AmplifyTestCommon/Models/NonModel/Category.swift index 277b136bf2..b15ab76cfe 100644 --- a/AmplifyTestCommon/Models/NonModel/Category.swift +++ b/AmplifyTestCommon/Models/NonModel/Category.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation public struct Category: Embeddable { diff --git a/AmplifyTestCommon/Models/NonModel/Color.swift b/AmplifyTestCommon/Models/NonModel/Color.swift index 793b6a6844..92717a7760 100644 --- a/AmplifyTestCommon/Models/NonModel/Color.swift +++ b/AmplifyTestCommon/Models/NonModel/Color.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation public struct Color: Embeddable { diff --git a/AmplifyTestCommon/Models/NonModel/DynamicEmbedded.swift b/AmplifyTestCommon/Models/NonModel/DynamicEmbedded.swift index 2636100012..1a5c0adf97 100644 --- a/AmplifyTestCommon/Models/NonModel/DynamicEmbedded.swift +++ b/AmplifyTestCommon/Models/NonModel/DynamicEmbedded.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify struct DynamicEmbedded: Embeddable, JSONValueHolder { diff --git a/AmplifyTestCommon/Models/NonModel/Section.swift b/AmplifyTestCommon/Models/NonModel/Section.swift index 0ffd42eb2f..8917eb2491 100644 --- a/AmplifyTestCommon/Models/NonModel/Section.swift +++ b/AmplifyTestCommon/Models/NonModel/Section.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation public struct Section: Embeddable { diff --git a/AmplifyTestCommon/Models/NonModel/Todo+Schema.swift b/AmplifyTestCommon/Models/NonModel/Todo+Schema.swift index d53b4c0e07..68c860ab6a 100644 --- a/AmplifyTestCommon/Models/NonModel/Todo+Schema.swift +++ b/AmplifyTestCommon/Models/NonModel/Todo+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Todo { diff --git a/AmplifyTestCommon/Models/OGCScenarioBMGroupPost+Schema.swift b/AmplifyTestCommon/Models/OGCScenarioBMGroupPost+Schema.swift index 69170decb4..4c149b0283 100644 --- a/AmplifyTestCommon/Models/OGCScenarioBMGroupPost+Schema.swift +++ b/AmplifyTestCommon/Models/OGCScenarioBMGroupPost+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension OGCScenarioBMGroupPost { diff --git a/AmplifyTestCommon/Models/OGCScenarioBPost+Schema.swift b/AmplifyTestCommon/Models/OGCScenarioBPost+Schema.swift index 2a3c67066f..289566ef55 100644 --- a/AmplifyTestCommon/Models/OGCScenarioBPost+Schema.swift +++ b/AmplifyTestCommon/Models/OGCScenarioBPost+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension OGCScenarioBPost { diff --git a/AmplifyTestCommon/Models/Post+Schema.swift b/AmplifyTestCommon/Models/Post+Schema.swift index f60062941d..c60bec91b5 100644 --- a/AmplifyTestCommon/Models/Post+Schema.swift +++ b/AmplifyTestCommon/Models/Post+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post { diff --git a/AmplifyTestCommon/Models/QPredGen+Schema.swift b/AmplifyTestCommon/Models/QPredGen+Schema.swift index 4571c1ed25..ca2a6264a4 100644 --- a/AmplifyTestCommon/Models/QPredGen+Schema.swift +++ b/AmplifyTestCommon/Models/QPredGen+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension QPredGen { diff --git a/AmplifyTestCommon/Models/Record+Schema.swift b/AmplifyTestCommon/Models/Record+Schema.swift index 7df7ca922e..b48f14935c 100644 --- a/AmplifyTestCommon/Models/Record+Schema.swift +++ b/AmplifyTestCommon/Models/Record+Schema.swift @@ -7,7 +7,7 @@ // swiftlint:disable all import Foundation -import Amplify +@preconcurrency import Amplify extension Record { // MARK: - CodingKeys diff --git a/AmplifyTestCommon/Models/RecordCover+Schema.swift b/AmplifyTestCommon/Models/RecordCover+Schema.swift index 04f4f8a460..40da7ae585 100644 --- a/AmplifyTestCommon/Models/RecordCover+Schema.swift +++ b/AmplifyTestCommon/Models/RecordCover+Schema.swift @@ -7,7 +7,7 @@ // swiftlint:disable all import Foundation -import Amplify +@preconcurrency import Amplify extension RecordCover { // MARK: - CodingKeys diff --git a/AmplifyTestCommon/Models/ReservedWords/Group+Schema.swift b/AmplifyTestCommon/Models/ReservedWords/Group+Schema.swift index e7a80ecd9b..0d1bb8f2e0 100644 --- a/AmplifyTestCommon/Models/ReservedWords/Group+Schema.swift +++ b/AmplifyTestCommon/Models/ReservedWords/Group+Schema.swift @@ -6,7 +6,7 @@ // import Foundation -import Amplify +@preconcurrency import Amplify extension Group { // MARK: - CodingKeys diff --git a/AmplifyTestCommon/Models/ReservedWords/Row+Schema.swift b/AmplifyTestCommon/Models/ReservedWords/Row+Schema.swift index 6878da26b5..83791a1fe4 100644 --- a/AmplifyTestCommon/Models/ReservedWords/Row+Schema.swift +++ b/AmplifyTestCommon/Models/ReservedWords/Row+Schema.swift @@ -6,7 +6,7 @@ // import Foundation -import Amplify +@preconcurrency import Amplify extension Row { // MARK: - CodingKeys diff --git a/AmplifyTestCommon/Models/ReservedWords/Transaction+Schema.swift b/AmplifyTestCommon/Models/ReservedWords/Transaction+Schema.swift index 8c5ac3a9b0..c8e759d7db 100644 --- a/AmplifyTestCommon/Models/ReservedWords/Transaction+Schema.swift +++ b/AmplifyTestCommon/Models/ReservedWords/Transaction+Schema.swift @@ -7,7 +7,7 @@ // swiftlint:disable all import Foundation -import Amplify +@preconcurrency import Amplify extension Transaction { // MARK: - CodingKeys diff --git a/AmplifyTestCommon/Models/Restaurant/Dish+Schema.swift b/AmplifyTestCommon/Models/Restaurant/Dish+Schema.swift index 3022b9e276..37f8254b2a 100644 --- a/AmplifyTestCommon/Models/Restaurant/Dish+Schema.swift +++ b/AmplifyTestCommon/Models/Restaurant/Dish+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Dish { diff --git a/AmplifyTestCommon/Models/Restaurant/Menu+Schema.swift b/AmplifyTestCommon/Models/Restaurant/Menu+Schema.swift index e3188b3f4f..ea38d27aff 100644 --- a/AmplifyTestCommon/Models/Restaurant/Menu+Schema.swift +++ b/AmplifyTestCommon/Models/Restaurant/Menu+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Menu { diff --git a/AmplifyTestCommon/Models/Restaurant/Restaurant+Schema.swift b/AmplifyTestCommon/Models/Restaurant/Restaurant+Schema.swift index 6d677b46aa..6ad5d34ba1 100644 --- a/AmplifyTestCommon/Models/Restaurant/Restaurant+Schema.swift +++ b/AmplifyTestCommon/Models/Restaurant/Restaurant+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Restaurant { diff --git a/AmplifyTestCommon/Models/Scalar/EnumTestModel+Schema.swift b/AmplifyTestCommon/Models/Scalar/EnumTestModel+Schema.swift index 05ff5b0fbc..7fecbd5881 100644 --- a/AmplifyTestCommon/Models/Scalar/EnumTestModel+Schema.swift +++ b/AmplifyTestCommon/Models/Scalar/EnumTestModel+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension EnumTestModel { diff --git a/AmplifyTestCommon/Models/Scalar/ListIntContainer+Schema.swift b/AmplifyTestCommon/Models/Scalar/ListIntContainer+Schema.swift index 6ef039ff38..fee64108e9 100644 --- a/AmplifyTestCommon/Models/Scalar/ListIntContainer+Schema.swift +++ b/AmplifyTestCommon/Models/Scalar/ListIntContainer+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ListIntContainer { diff --git a/AmplifyTestCommon/Models/Scalar/ListStringContainer+Schema.swift b/AmplifyTestCommon/Models/Scalar/ListStringContainer+Schema.swift index 00d1f2b153..b910c80117 100644 --- a/AmplifyTestCommon/Models/Scalar/ListStringContainer+Schema.swift +++ b/AmplifyTestCommon/Models/Scalar/ListStringContainer+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ListStringContainer { diff --git a/AmplifyTestCommon/Models/Scalar/Nested+Schema.swift b/AmplifyTestCommon/Models/Scalar/Nested+Schema.swift index f1d85adce4..e9ccdc2d40 100644 --- a/AmplifyTestCommon/Models/Scalar/Nested+Schema.swift +++ b/AmplifyTestCommon/Models/Scalar/Nested+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Nested { diff --git a/AmplifyTestCommon/Models/Scalar/NestedTypeTestModel+Schema.swift b/AmplifyTestCommon/Models/Scalar/NestedTypeTestModel+Schema.swift index 79f122f0ad..5588c1ab46 100644 --- a/AmplifyTestCommon/Models/Scalar/NestedTypeTestModel+Schema.swift +++ b/AmplifyTestCommon/Models/Scalar/NestedTypeTestModel+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension NestedTypeTestModel { diff --git a/AmplifyTestCommon/Models/Scalar/ScalarContainer+Schema.swift b/AmplifyTestCommon/Models/Scalar/ScalarContainer+Schema.swift index 8fc935838a..a85734e103 100644 --- a/AmplifyTestCommon/Models/Scalar/ScalarContainer+Schema.swift +++ b/AmplifyTestCommon/Models/Scalar/ScalarContainer+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ScalarContainer { diff --git a/AmplifyTestCommon/Models/ScenarioATest6Post+Schema.swift b/AmplifyTestCommon/Models/ScenarioATest6Post+Schema.swift index 57d9581507..85a9350903 100644 --- a/AmplifyTestCommon/Models/ScenarioATest6Post+Schema.swift +++ b/AmplifyTestCommon/Models/ScenarioATest6Post+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension ScenarioATest6Post { diff --git a/AmplifyTestCommon/Models/TeamProject/Project+Schema.swift b/AmplifyTestCommon/Models/TeamProject/Project+Schema.swift index 73c9190fdc..872808658a 100644 --- a/AmplifyTestCommon/Models/TeamProject/Project+Schema.swift +++ b/AmplifyTestCommon/Models/TeamProject/Project+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Project { diff --git a/AmplifyTestCommon/Models/TeamProject/Team+Schema.swift b/AmplifyTestCommon/Models/TeamProject/Team+Schema.swift index a9710d86f8..561e373512 100644 --- a/AmplifyTestCommon/Models/TeamProject/Team+Schema.swift +++ b/AmplifyTestCommon/Models/TeamProject/Team+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Team { diff --git a/AmplifyTestCommon/Models/TransformerV2/1V2/Project1V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/1V2/Project1V2+Schema.swift index e51bfa5402..a39d1ed7ad 100644 --- a/AmplifyTestCommon/Models/TransformerV2/1V2/Project1V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/1V2/Project1V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Project1V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/1V2/Team1V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/1V2/Team1V2+Schema.swift index 8ed0f54ddf..179c0c0576 100644 --- a/AmplifyTestCommon/Models/TransformerV2/1V2/Team1V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/1V2/Team1V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Team1V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/2V2/Project2V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/2V2/Project2V2+Schema.swift index 286ca57848..2f05179bcd 100644 --- a/AmplifyTestCommon/Models/TransformerV2/2V2/Project2V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/2V2/Project2V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Project2V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/2V2/Team2V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/2V2/Team2V2+Schema.swift index 43e0f11b00..c9789be1ec 100644 --- a/AmplifyTestCommon/Models/TransformerV2/2V2/Team2V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/2V2/Team2V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Team2V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/3V2/Comment3V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/3V2/Comment3V2+Schema.swift index cee3850f92..937dfccc32 100644 --- a/AmplifyTestCommon/Models/TransformerV2/3V2/Comment3V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/3V2/Comment3V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment3V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/3V2/Post3V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/3V2/Post3V2+Schema.swift index f377adf509..33a41ea211 100644 --- a/AmplifyTestCommon/Models/TransformerV2/3V2/Post3V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/3V2/Post3V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post3V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/3aV2/Comment3aV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/3aV2/Comment3aV2+Schema.swift index 41081acbfc..e66f0441c1 100644 --- a/AmplifyTestCommon/Models/TransformerV2/3aV2/Comment3aV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/3aV2/Comment3aV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment3aV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/3aV2/Post3aV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/3aV2/Post3aV2+Schema.swift index 3b33c9960e..9f4c1fbd89 100644 --- a/AmplifyTestCommon/Models/TransformerV2/3aV2/Post3aV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/3aV2/Post3aV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post3aV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/4V2/Comment4V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/4V2/Comment4V2+Schema.swift index db568413b1..8988303108 100644 --- a/AmplifyTestCommon/Models/TransformerV2/4V2/Comment4V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/4V2/Comment4V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment4V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/4V2/Post4V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/4V2/Post4V2+Schema.swift index c0fa5fdfbb..f0b270bb01 100644 --- a/AmplifyTestCommon/Models/TransformerV2/4V2/Post4V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/4V2/Post4V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post4V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/4aV2/Project4aV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/4aV2/Project4aV2+Schema.swift index 5142fd05de..b5a027c802 100644 --- a/AmplifyTestCommon/Models/TransformerV2/4aV2/Project4aV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/4aV2/Project4aV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Project4aV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/4aV2/Team4aV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/4aV2/Team4aV2+Schema.swift index 9b7cae724e..015d9b104f 100644 --- a/AmplifyTestCommon/Models/TransformerV2/4aV2/Team4aV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/4aV2/Team4aV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Team4aV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/4bV2/Project4bV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/4bV2/Project4bV2+Schema.swift index 236d2be094..778aa024ae 100644 --- a/AmplifyTestCommon/Models/TransformerV2/4bV2/Project4bV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/4bV2/Project4bV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Project4bV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/4bV2/Team4bV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/4bV2/Team4bV2+Schema.swift index 311044fad2..44dd5bf32f 100644 --- a/AmplifyTestCommon/Models/TransformerV2/4bV2/Team4bV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/4bV2/Team4bV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Team4bV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/5V2/Post5V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/5V2/Post5V2+Schema.swift index 84a32e2cb8..3e1fc2c18a 100644 --- a/AmplifyTestCommon/Models/TransformerV2/5V2/Post5V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/5V2/Post5V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post5V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/5V2/PostEditor5V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/5V2/PostEditor5V2+Schema.swift index cdbcd3e07d..d9d4906e98 100644 --- a/AmplifyTestCommon/Models/TransformerV2/5V2/PostEditor5V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/5V2/PostEditor5V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension PostEditor5V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/5V2/User5V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/5V2/User5V2+Schema.swift index 5c35bd5ad9..8f92d11e54 100644 --- a/AmplifyTestCommon/Models/TransformerV2/5V2/User5V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/5V2/User5V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension User5V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/6V2/Blog6V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/6V2/Blog6V2+Schema.swift index 0c2d801a88..45ca7774fc 100644 --- a/AmplifyTestCommon/Models/TransformerV2/6V2/Blog6V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/6V2/Blog6V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Blog6V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/6V2/Comment6V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/6V2/Comment6V2+Schema.swift index 2d8fe7959c..5bd8ad6e1b 100644 --- a/AmplifyTestCommon/Models/TransformerV2/6V2/Comment6V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/6V2/Comment6V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment6V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/6V2/Post6V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/6V2/Post6V2+Schema.swift index 5e96bf8cd9..b0676268a4 100644 --- a/AmplifyTestCommon/Models/TransformerV2/6V2/Post6V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/6V2/Post6V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post6V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/7V2/Blog7V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/7V2/Blog7V2+Schema.swift index 84fa41ace3..a7258f65a2 100644 --- a/AmplifyTestCommon/Models/TransformerV2/7V2/Blog7V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/7V2/Blog7V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Blog7V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/7V2/Comment7V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/7V2/Comment7V2+Schema.swift index 0f71ceb037..763e29515b 100644 --- a/AmplifyTestCommon/Models/TransformerV2/7V2/Comment7V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/7V2/Comment7V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment7V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/7V2/Post7V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/7V2/Post7V2+Schema.swift index e16552145c..4bfb6244db 100644 --- a/AmplifyTestCommon/Models/TransformerV2/7V2/Post7V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/7V2/Post7V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post7V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/8V2/Attendee8V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/8V2/Attendee8V2+Schema.swift index d77a61d5ee..db4786b4e4 100644 --- a/AmplifyTestCommon/Models/TransformerV2/8V2/Attendee8V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/8V2/Attendee8V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Attendee8V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/8V2/Meeting8V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/8V2/Meeting8V2+Schema.swift index ea734e16d1..cdbb9f3871 100644 --- a/AmplifyTestCommon/Models/TransformerV2/8V2/Meeting8V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/8V2/Meeting8V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Meeting8V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/8V2/Registration8V2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/8V2/Registration8V2+Schema.swift index 72355ba4ea..6bf24cb569 100644 --- a/AmplifyTestCommon/Models/TransformerV2/8V2/Registration8V2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/8V2/Registration8V2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Registration8V2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/CustomerMultipleSecondaryIndexV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/CustomerMultipleSecondaryIndexV2+Schema.swift index f760ef2c9c..f538ecf0cf 100644 --- a/AmplifyTestCommon/Models/TransformerV2/CustomerMultipleSecondaryIndexV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/CustomerMultipleSecondaryIndexV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension CustomerMultipleSecondaryIndexV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/CustomerSecondaryIndexV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/CustomerSecondaryIndexV2+Schema.swift index 3058f7d566..65ef70fbcc 100644 --- a/AmplifyTestCommon/Models/TransformerV2/CustomerSecondaryIndexV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/CustomerSecondaryIndexV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension CustomerSecondaryIndexV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/CustomerWithMultipleFieldsinPK+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/CustomerWithMultipleFieldsinPK+Schema.swift index 40e8c0f7ce..9ce39bc082 100644 --- a/AmplifyTestCommon/Models/TransformerV2/CustomerWithMultipleFieldsinPK+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/CustomerWithMultipleFieldsinPK+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension CustomerWithMultipleFieldsinPK { diff --git a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Blog8+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Blog8+Schema.swift index 03ace0efac..1316c5c519 100644 --- a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Blog8+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Blog8+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Blog8 { diff --git a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Comment8+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Comment8+Schema.swift index 6258c76ca6..a2eb19179d 100644 --- a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Comment8+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Comment8+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Comment8 { diff --git a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyCustomModel8+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyCustomModel8+Schema.swift index 27f611af59..19619e58d2 100644 --- a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyCustomModel8+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyCustomModel8+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension MyCustomModel8 { diff --git a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyNestedModel8+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyNestedModel8+Schema.swift index 1d18ede96f..963c457120 100644 --- a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyNestedModel8+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/MyNestedModel8+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension MyNestedModel8 { diff --git a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Post8+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Post8+Schema.swift index bd21917eb4..a123d4c9f7 100644 --- a/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Post8+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/OptionalAssociations/Post8+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension Post8 { diff --git a/AmplifyTestCommon/Models/TransformerV2/SchemaDrift/SchemaDrift+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/SchemaDrift/SchemaDrift+Schema.swift index 5d527c5bdf..f8b8a6355e 100644 --- a/AmplifyTestCommon/Models/TransformerV2/SchemaDrift/SchemaDrift+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/SchemaDrift/SchemaDrift+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension SchemaDrift { diff --git a/AmplifyTestCommon/Models/TransformerV2/TodoCustomTimestampV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/TodoCustomTimestampV2+Schema.swift index 716f4848fe..6349ea5739 100644 --- a/AmplifyTestCommon/Models/TransformerV2/TodoCustomTimestampV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/TodoCustomTimestampV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension TodoCustomTimestampV2 { diff --git a/AmplifyTestCommon/Models/TransformerV2/TodoWithDefaultValueV2+Schema.swift b/AmplifyTestCommon/Models/TransformerV2/TodoWithDefaultValueV2+Schema.swift index 6de5d45ae2..dbfabd1312 100644 --- a/AmplifyTestCommon/Models/TransformerV2/TodoWithDefaultValueV2+Schema.swift +++ b/AmplifyTestCommon/Models/TransformerV2/TodoWithDefaultValueV2+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension TodoWithDefaultValueV2 { diff --git a/AmplifyTestCommon/Models/User+Schema.swift b/AmplifyTestCommon/Models/User+Schema.swift index a085ba40a2..d2af51d4ae 100644 --- a/AmplifyTestCommon/Models/User+Schema.swift +++ b/AmplifyTestCommon/Models/User+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension User { diff --git a/AmplifyTestCommon/Models/UserFollowers+Schema.swift b/AmplifyTestCommon/Models/UserFollowers+Schema.swift index d582041f43..a4df1845c8 100644 --- a/AmplifyTestCommon/Models/UserFollowers+Schema.swift +++ b/AmplifyTestCommon/Models/UserFollowers+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension UserFollowers { diff --git a/AmplifyTestCommon/Models/UserFollowing+Schema.swift b/AmplifyTestCommon/Models/UserFollowing+Schema.swift index 5b7919b96c..773c2605d6 100644 --- a/AmplifyTestCommon/Models/UserFollowing+Schema.swift +++ b/AmplifyTestCommon/Models/UserFollowing+Schema.swift @@ -6,7 +6,7 @@ // // swiftlint:disable all -import Amplify +@preconcurrency import Amplify import Foundation extension UserFollowing { diff --git a/AmplifyTestCommon/SharedTestCases/SharedTestCasesPostComment4V2.swift b/AmplifyTestCommon/SharedTestCases/SharedTestCasesPostComment4V2.swift index 2404d3373b..87db85a950 100644 --- a/AmplifyTestCommon/SharedTestCases/SharedTestCasesPostComment4V2.swift +++ b/AmplifyTestCommon/SharedTestCases/SharedTestCasesPostComment4V2.swift @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 // -import Amplify +@preconcurrency import Amplify import Foundation /* diff --git a/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginConcurrencyTests.swift b/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginConcurrencyTests.swift index 20d9d084b0..6c43041b3f 100644 --- a/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginConcurrencyTests.swift +++ b/AmplifyTests/CategoryTests/Hub/DefaultPluginTests/DefaultHubPluginConcurrencyTests.swift @@ -9,7 +9,7 @@ import XCTest @testable @preconcurrency import Amplify @testable import AmplifyTestCommon -class DefaultHubPluginConcurrencyTests: XCTestCase { +class DefaultHubPluginConcurrencyTests: XCTestCase, @unchecked Sendable { var plugin: HubCategoryPlugin { guard let plugin = try? Amplify.Hub.getPlugin(for: "awsHubPlugin"), plugin.key == "awsHubPlugin" else { diff --git a/AmplifyTests/CoreTests/AmplifyConfigurationInitializationTests.swift b/AmplifyTests/CoreTests/AmplifyConfigurationInitializationTests.swift index af9794abb8..79230431db 100644 --- a/AmplifyTests/CoreTests/AmplifyConfigurationInitializationTests.swift +++ b/AmplifyTests/CoreTests/AmplifyConfigurationInitializationTests.swift @@ -13,7 +13,7 @@ import XCTest /// circumstances class AmplifyConfigurationInitializationTests: XCTestCase { - static var tempDir: URL = { + static let tempDir: URL = { let fileManager = FileManager.default let tempDir = fileManager.temporaryDirectory.appendingPathComponent("ConfigurationInternalsTests") return tempDir diff --git a/AmplifyTests/CoreTests/AmplifyInProcessReportingOperationCombineTests.swift b/AmplifyTests/CoreTests/AmplifyInProcessReportingOperationCombineTests.swift index 5abeb16152..37c92ebeb1 100644 --- a/AmplifyTests/CoreTests/AmplifyInProcessReportingOperationCombineTests.swift +++ b/AmplifyTests/CoreTests/AmplifyInProcessReportingOperationCombineTests.swift @@ -144,7 +144,7 @@ class AmplifyInProcessReportingOperationCombineTests: XCTestCase { } extension HubPayloadEventName { - static var mockPublisherInProcessReportingOperation = "mockPublisherInProcessReportingOperation" + static let mockPublisherInProcessReportingOperation = "mockPublisherInProcessReportingOperation" } class MockPublisherInProcessOperation: AmplifyInProcessReportingOperation< diff --git a/AmplifyTests/CoreTests/AmplifyOperationCombineTests.swift b/AmplifyTests/CoreTests/AmplifyOperationCombineTests.swift index 8d77c8c384..b6940117b4 100644 --- a/AmplifyTests/CoreTests/AmplifyOperationCombineTests.swift +++ b/AmplifyTests/CoreTests/AmplifyOperationCombineTests.swift @@ -262,7 +262,7 @@ struct MockPublisherRequest: AmplifyOperationRequest { } extension HubPayloadEventName { - static var mockPublisherOperation = "MockPublisherOperation" + static let mockPublisherOperation = "MockPublisherOperation" } class MockPublisherOperation: AmplifyOperation, @unchecked Sendable { diff --git a/AmplifyTests/CoreTests/AmplifyOutputsInitializationTests.swift b/AmplifyTests/CoreTests/AmplifyOutputsInitializationTests.swift index 12c2c3faae..01ba004d64 100644 --- a/AmplifyTests/CoreTests/AmplifyOutputsInitializationTests.swift +++ b/AmplifyTests/CoreTests/AmplifyOutputsInitializationTests.swift @@ -13,7 +13,7 @@ import XCTest /// circumstances class AmplifyOutputsInitializationTests: XCTestCase { - static var tempDir: URL = { + static let tempDir: URL = { let fileManager = FileManager.default let tempDir = fileManager.temporaryDirectory.appendingPathComponent("ConfigurationInternalsTests") return tempDir diff --git a/AmplifyTests/CoreTests/ChildTaskTests.swift b/AmplifyTests/CoreTests/ChildTaskTests.swift index 2a093f87e4..1292224804 100644 --- a/AmplifyTests/CoreTests/ChildTaskTests.swift +++ b/AmplifyTests/CoreTests/ChildTaskTests.swift @@ -7,7 +7,7 @@ import Foundation import XCTest -@testable import Amplify +@testable @preconcurrency import Amplify // These tests must be run with ThreadSanitizer enabled class ChildTaskTests: XCTestCase { diff --git a/Package.resolved b/Package.resolved index b145620421..b1ec33ad5e 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-sdk-swift", "state" : { - "revision" : "f812c7441555058da0fcecf5314780c1770b11a1", - "version" : "1.5.14" + "revision" : "8b5336764297d34157bd580374b5f6e182746759", + "version" : "1.5.18" } }, { @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/smithy-lang/smithy-swift", "state" : { - "revision" : "85bfbaff8a77ffc0415878de50186e6cfea30a04", - "version" : "0.151.0" + "revision" : "a6cac0739d76ef08e2d927febc682d9898e76fe2", + "version" : "0.152.0" } }, { diff --git a/Package.swift b/Package.swift index 5d5b87709a..d0667c7d8d 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let platforms: [SupportedPlatform] = [ .watchOS(.v9) ] let dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/awslabs/aws-sdk-swift", exact: "1.5.14"), + .package(url: "https://github.com/awslabs/aws-sdk-swift", exact: "1.5.18"), .package(url: "https://github.com/stephencelis/SQLite.swift.git", exact: "0.15.3"), .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: "2.1.0"), .package(url: "https://github.com/aws-amplify/amplify-swift-utils-notifications.git", from: "1.1.0") diff --git a/canaries/example/Gemfile.lock b/canaries/example/Gemfile.lock index 2294d226bb..65dbc567db 100644 --- a/canaries/example/Gemfile.lock +++ b/canaries/example/Gemfile.lock @@ -2,10 +2,12 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (3.0.5) + base64 + nkf rexml addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) - artifactory (3.0.15) + artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.2.0) aws-partitions (1.575.0) @@ -25,6 +27,7 @@ GEM aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) base64 (0.2.0) + bigdecimal (3.2.2) claide (1.1.0) colored (1.2) colored2 (3.1.2) @@ -33,11 +36,10 @@ GEM declarative (0.0.20) digest-crc (0.6.4) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.6) + domain_name (0.6.20240107) + dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.92.2) + excon (0.112.0) faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -54,27 +56,27 @@ GEM faraday (>= 0.8.0) http-cookie (~> 1.0.0) faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) + faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) + faraday-multipart (1.1.1) + multipart-post (~> 2.0) faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday_middleware (1.2.1) faraday (~> 1.0) - fastimage (2.2.6) - fastlane (2.214.0) + fastimage (2.4.0) + fastlane (2.228.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) - colored + colored (~> 1.2) commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) @@ -83,32 +85,37 @@ GEM faraday-cookie_jar (~> 0.0.6) faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) google-cloud-storage (~> 1.31) highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (~> 0.1.1) + optparse (>= 0.1.1, < 1.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) + security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) + xcpretty (~> 0.4.1) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.18.0) - google-apis-core (>= 0.4, < 2.a) + google-apis-androidpublisher_v3 (0.54.0) + google-apis-core (>= 0.11.0, < 2.a) google-apis-core (0.11.3) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) @@ -117,23 +124,23 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.a) rexml - google-apis-iamcredentials_v1 (0.10.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-playcustomapp_v1 (0.7.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-storage_v1 (0.13.0) - google-apis-core (>= 0.4, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-storage_v1 (0.31.0) + google-apis-core (>= 0.11.0, < 2.a) + google-cloud-core (1.8.0) + google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.2.0) - google-cloud-storage (1.36.1) + google-cloud-errors (1.5.0) + google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) @@ -144,23 +151,24 @@ GEM os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.4) + http-cookie (1.0.8) domain_name (~> 0.5) httpclient (2.8.3) - jmespath (1.6.1) + jmespath (1.6.2) json (2.6.1) - jwt (2.9.1) + jwt (2.10.2) base64 - mini_magick (4.11.0) + mini_magick (4.13.2) mini_mime (1.1.5) multi_json (1.15.0) multipart-post (2.4.1) nanaimo (0.3.0) - naturally (2.2.1) - optparse (0.1.1) + naturally (2.3.0) + nkf (0.2.0) + optparse (0.6.0) os (1.1.4) - plist (3.6.0) - public_suffix (6.0.1) + plist (3.7.2) + public_suffix (6.0.2) rake (13.0.6) representable (3.2.0) declarative (< 0.1.0) @@ -168,31 +176,29 @@ GEM uber (< 0.2.0) retriable (3.1.2) rexml (3.3.9) - rouge (2.0.7) + rouge (3.28.0) ruby2_keywords (0.0.5) - rubyzip (2.3.2) - security (0.1.3) - signet (0.19.0) + rubyzip (2.4.1) + security (0.1.5) + signet (0.21.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 3.0) + jwt (>= 1.5, < 4.0) multi_json (~> 1.10) - simctl (1.6.8) + simctl (1.6.10) CFPropertyList naturally + sysrandom (1.0.5) terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) trailblazer-option (0.1.2) tty-cursor (0.7.1) - tty-screen (0.8.1) + tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.1) - unicode-display_width (1.8.0) + unicode-display_width (2.6.0) word_wrap (1.0.0) xcodeproj (1.19.0) CFPropertyList (>= 2.3.3, < 4.0) @@ -200,8 +206,8 @@ GEM claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) - xcpretty (0.3.0) - rouge (~> 2.0.7) + xcpretty (0.4.1) + rouge (~> 3.28.0) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) @@ -209,6 +215,7 @@ PLATFORMS arm64-darwin-21 arm64-darwin-22 arm64-darwin-23 + arm64-darwin-24 universal-darwin-20 x86_64-darwin-19 x86_64-darwin-21 diff --git a/canaries/example/MyAmplifyApp.xcodeproj/project.pbxproj b/canaries/example/MyAmplifyApp.xcodeproj/project.pbxproj index 8a538c9f56..5ddca81091 100644 --- a/canaries/example/MyAmplifyApp.xcodeproj/project.pbxproj +++ b/canaries/example/MyAmplifyApp.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -497,8 +497,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/aws-amplify/amplify-swift"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.0.0; + branch = main; + kind = branch; }; }; /* End XCRemoteSwiftPackageReference section */