Skip to content

Commit 3f700ac

Browse files
authored
chore: Added support for Swift Package Manager (#1123)
1 parent 02ac2ba commit 3f700ac

File tree

43 files changed

+267
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+267
-8
lines changed

AmplifyPlugins/API/AWSAPICategoryPlugin/AWSAPIPlugin.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Amplify
99
import AWSPluginsCore
10+
import Foundation
1011

1112
final public class AWSAPIPlugin: NSObject, APICategoryPlugin {
1213
/// The unique key of the plugin within the API category.

AmplifyPlugins/API/AWSAPICategoryPlugin/Core/AppSyncListPayload.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Amplify
99
import AWSPluginsCore
10+
import Foundation
1011

1112
/// Store metadata about the request alongside AppSync's GraphQL response for a List operation, useful for creating
1213
/// `AppSyncListProvider` that is capable of performing pagination based on the metadata.

AmplifyPlugins/API/AWSAPICategoryPlugin/Core/AppSyncListResponse.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Amplify
9+
import Foundation
910

1011
/// Resembles the AppSync's GraphQL response for a list operation.
1112
struct AppSyncListResponse<Element: Model>: Codable {

AmplifyPlugins/API/AWSAPICategoryPlugin/Core/AppSyncModelMetadata.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Amplify
9+
import Foundation
910

1011
/// Metadata that contains information about an associated parent object.
1112
public struct AppSyncModelMetadata: Codable {

AmplifyPlugins/API/AWSAPICategoryPlugin/Support/Decode/GraphQLErrorDecoder.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Amplify
99
import AppSyncRealTimeClient
10+
import Foundation
1011

1112
struct GraphQLErrorDecoder {
1213
static func decodeErrors(graphQLErrors: [JSONValue]) throws -> [GraphQLError] {

AmplifyPlugins/API/AWSAPICategoryPlugin/Support/Decode/GraphQLResponseDecoder+DecodeData.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Amplify
99
import AWSPluginsCore
10+
import Foundation
1011

1112
extension GraphQLResponseDecoder {
1213

AmplifyPlugins/API/AWSAPICategoryPlugin/Support/Internal/AWSAppSyncGraphQLResponse.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Amplify
9+
import Foundation
910

1011
/// The raw response coming back from the AppSync GraphQL service
1112
enum AWSAppSyncGraphQLResponse {

AmplifyPlugins/API/AWSAPICategoryPlugin/URLSessionBehavior/URLSessionDataTaskBehavior.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Amplify
9+
import Foundation
910

1011
/// Encapsulates the behavior required for a single HTTP operation, including
1112
/// identifying, pausing/resuming, and cancelling. Behind the scenes, this will be

AmplifyPlugins/Auth/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin+Configure.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
import Foundation
99
import Amplify
1010
import AWSPluginsCore
11-
import AWSMobileClient
1211
import AWSCore
12+
#if COCOAPODS
13+
import AWSMobileClient
14+
#else
15+
import AWSMobileClientXCF
16+
#endif
1317

1418
extension AWSCognitoAuthPlugin {
1519

AmplifyPlugins/Auth/AWSCognitoAuthPlugin/AWSCognitoAuthPlugin.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
//
77

88
import Amplify
9+
#if COCOAPODS
910
import AWSMobileClient
11+
#else
12+
import AWSMobileClientXCF
13+
#endif
1014

1115
/// Auth plugin that uses AWS Cognito UserPool and IdentityPool.
1216
///

0 commit comments

Comments
 (0)