Skip to content

Commit 6cc6a4d

Browse files
authored
chore(AWSPluginsCore): Remove unwanted AWSMobileClient dependency from AWSPluginsCore (#980)
AWSPluginsCore has a dependency on AWSMobileClient which is not required. This PR removes the dependency from AWSMobileClient to the test package. These are the changes in this PR: - AWSPluginsCore depend on AWSCore instead of AWSMobileClient - AmplifyTestCommon to depend on AWSMobileClient - Remove AWSMobileClient import from unwanted places - Code cleanup
1 parent ee4a88f commit 6cc6a4d

File tree

19 files changed

+42
-52
lines changed

19 files changed

+42
-52
lines changed

AWSPluginsCore.podspec

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ Pod::Spec.new do |s|
3232
s.source_files = 'AmplifyPlugins/Core/AWSPluginsCore/**/*.swift'
3333

3434
s.dependency 'Amplify', $AMPLIFY_VERSION
35-
s.dependency 'AWSMobileClient', $OPTIMISTIC_AWS_SDK_VERSION
36-
37-
# This is technically redundant, but adding it here allows Xcode to find it
38-
# during initial indexing and prevent build errors after a fresh install
3935
s.dependency 'AWSCore', $OPTIMISTIC_AWS_SDK_VERSION
4036

4137
end

AmplifyPlugins/API/AWSAPICategoryPlugin/Interceptor/RequestInterceptor/IAMURLRequestInterceptor.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Amplify
99
import AWSPluginsCore
1010
import Foundation
1111
import AWSCore
12-
import AWSMobileClient
1312

1413
struct IAMURLRequestInterceptor: URLRequestInterceptor {
1514
let iamCredentialsProvider: IAMCredentialsProvider

AmplifyPlugins/API/AWSAPICategoryPlugin/Interceptor/RequestInterceptor/UserPoolRequestInterceptor.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Amplify
99
import AWSPluginsCore
1010
import Foundation
1111
import AWSCore
12-
import AWSMobileClient
1312

1413
struct UserPoolURLRequestInterceptor: URLRequestInterceptor {
1514

AmplifyPlugins/API/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ PODS:
1515
- AmplifyTestCommon/AWSPluginsTestCommon (1.5.1):
1616
- Amplify (= 1.5.1)
1717
- AWSCore (~> 2.20.0)
18+
- AWSMobileClient (~> 2.20.0)
1819
- AWSPluginsCore (= 1.5.1)
1920
- AppSyncRealTimeClient (1.4.2):
2021
- Starscream (~> 3.1.0)
@@ -33,13 +34,12 @@ PODS:
3334
- AWSPluginsCore (1.5.1):
3435
- Amplify (= 1.5.1)
3536
- AWSCore (~> 2.20.0)
36-
- AWSMobileClient (~> 2.20.0)
3737
- CwlCatchException (1.0.2)
3838
- CwlPreconditionTesting (1.1.1):
3939
- CwlCatchException
4040
- Starscream (3.1.1)
4141
- SwiftFormat/CLI (0.44.17)
42-
- SwiftLint (0.41.0)
42+
- SwiftLint (0.42.0)
4343

4444
DEPENDENCIES:
4545
- Amplify (from `../../`)
@@ -92,19 +92,19 @@ CHECKOUT OPTIONS:
9292
SPEC CHECKSUMS:
9393
Amplify: c55f7bf2c6ea68891d95579882172c1256f301fc
9494
AmplifyPlugins: 40f1051d1e8313a74c16bafe0618d460bf0479db
95-
AmplifyTestCommon: 60a44eefba338d8d9809f3d2740422805bfaad9f
95+
AmplifyTestCommon: 40a2413a5fba88dd89b99ece6d467ff0951a7c2c
9696
AppSyncRealTimeClient: 7fb160294d067b6c0c4b3c4ab91e953fd4cfba30
9797
AWSAuthCore: 6a5f0fdbbd65d917deab61e2f5035afecafaa687
9898
AWSCognitoIdentityProvider: f9031fc36af73a1e6a3c7476cbd536c1d4f7591c
9999
AWSCognitoIdentityProviderASF: c126563dd240709a5acf2c15910ea4c872c65df3
100100
AWSCore: e8748f1d2e97874ff5638fe7c3c31431ad223b4a
101101
AWSMobileClient: f98f4d3eb4d0f893a128b5546a31fd2cbc88e2ef
102-
AWSPluginsCore: 3afe92313f5be7f002a48007e6645b5ab58e05a7
102+
AWSPluginsCore: 03651a5904baf7d0e4d79addda7bcd8344d17bec
103103
CwlCatchException: 70a52ae44ea5d46db7bd385f801a94942420cd8c
104104
CwlPreconditionTesting: d33a4e4f285c0b885fddcae5dfedfbb34d4f3961
105105
Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0
106106
SwiftFormat: 3b5caa6389b2b9adbc00e133b3ccc8c6e687a6a4
107-
SwiftLint: c585ebd615d9520d7fbdbe151f527977b0534f1e
107+
SwiftLint: 4fa9579c63416865179bc416f0a92d55f009600d
108108

109109
PODFILE CHECKSUM: 857e4ea8246683593b8a7db77014aeb7340c15a5
110110

AmplifyPlugins/Analytics/AWSPinpointAnalyticsPlugin/Dependency/AWSPinpointAdapter.swift

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

88
import Amplify
9-
import AWSMobileClient
9+
import AWSCore
1010
import AWSPinpoint
1111
import AWSPluginsCore
1212
import Foundation
1313

1414
/// Conforms to `AWSPinpointBehavior` by storing an instance of the `AWSPinpoint` to expose AWS Pinpoint functionality
1515
class AWSPinpointAdapter: AWSPinpointBehavior {
1616
let pinpoint: AWSPinpoint
17-
// let eventRecorder: AWSPinpointEventRecorder
1817

1918
convenience init(pinpointAnalyticsAppId: String,
2019
pinpointAnalyticsRegion: AWSRegionType,
@@ -37,7 +36,6 @@ class AWSPinpointAdapter: AWSPinpointBehavior {
3736

3837
init(pinpoint: AWSPinpoint) {
3938
self.pinpoint = pinpoint
40-
// self.eventRecorder = pinpoint.analyticsClient.eventRecorder
4139
}
4240

4341
func getEscapeHatch() -> AWSPinpoint {

AmplifyPlugins/Analytics/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ PODS:
1515
- AmplifyTestCommon/AWSPluginsTestCommon (1.5.1):
1616
- Amplify (= 1.5.1)
1717
- AWSCore (~> 2.20.0)
18+
- AWSMobileClient (~> 2.20.0)
1819
- AWSPluginsCore (= 1.5.1)
1920
- AWSAuthCore (2.20.0):
2021
- AWSCore (= 2.20.0)
@@ -33,12 +34,11 @@ PODS:
3334
- AWSPluginsCore (1.5.1):
3435
- Amplify (= 1.5.1)
3536
- AWSCore (~> 2.20.0)
36-
- AWSMobileClient (~> 2.20.0)
3737
- CwlCatchException (1.0.2)
3838
- CwlPreconditionTesting (1.1.1):
3939
- CwlCatchException
4040
- SwiftFormat/CLI (0.44.17)
41-
- SwiftLint (0.41.0)
41+
- SwiftLint (0.42.0)
4242

4343
DEPENDENCIES:
4444
- Amplify (from `../../`)
@@ -88,19 +88,19 @@ CHECKOUT OPTIONS:
8888

8989
SPEC CHECKSUMS:
9090
Amplify: c55f7bf2c6ea68891d95579882172c1256f301fc
91-
AmplifyPlugins: 78d2e39e1d5db18ae50c215063790f300607d312
92-
AmplifyTestCommon: 60a44eefba338d8d9809f3d2740422805bfaad9f
91+
AmplifyPlugins: 40f1051d1e8313a74c16bafe0618d460bf0479db
92+
AmplifyTestCommon: 40a2413a5fba88dd89b99ece6d467ff0951a7c2c
9393
AWSAuthCore: 6a5f0fdbbd65d917deab61e2f5035afecafaa687
9494
AWSCognitoIdentityProvider: f9031fc36af73a1e6a3c7476cbd536c1d4f7591c
9595
AWSCognitoIdentityProviderASF: c126563dd240709a5acf2c15910ea4c872c65df3
9696
AWSCore: e8748f1d2e97874ff5638fe7c3c31431ad223b4a
9797
AWSMobileClient: f98f4d3eb4d0f893a128b5546a31fd2cbc88e2ef
9898
AWSPinpoint: ad147e2b6d4f4307a118b3f1ce3b581cfd56d076
99-
AWSPluginsCore: 3afe92313f5be7f002a48007e6645b5ab58e05a7
99+
AWSPluginsCore: 03651a5904baf7d0e4d79addda7bcd8344d17bec
100100
CwlCatchException: 70a52ae44ea5d46db7bd385f801a94942420cd8c
101101
CwlPreconditionTesting: d33a4e4f285c0b885fddcae5dfedfbb34d4f3961
102102
SwiftFormat: 3b5caa6389b2b9adbc00e133b3ccc8c6e687a6a4
103-
SwiftLint: c585ebd615d9520d7fbdbe151f527977b0534f1e
103+
SwiftLint: 4fa9579c63416865179bc416f0a92d55f009600d
104104

105105
PODFILE CHECKSUM: 48d1574dddce5cef7bdb7b05b06fc588ee22956e
106106

AmplifyPlugins/Auth/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ PODS:
88
- AmplifyTestCommon/AWSPluginsTestCommon (1.5.1):
99
- Amplify (= 1.5.1)
1010
- AWSCore (~> 2.20.0)
11+
- AWSMobileClient (~> 2.20.0)
1112
- AWSPluginsCore (= 1.5.1)
1213
- AWSAuthCore (2.20.0):
1314
- AWSCore (= 2.20.0)
@@ -24,7 +25,6 @@ PODS:
2425
- AWSPluginsCore (1.5.1):
2526
- Amplify (= 1.5.1)
2627
- AWSCore (~> 2.20.0)
27-
- AWSMobileClient (~> 2.20.0)
2828
- CwlCatchException (1.0.2)
2929
- CwlPreconditionTesting (1.1.1):
3030
- CwlCatchException
@@ -75,13 +75,13 @@ CHECKOUT OPTIONS:
7575

7676
SPEC CHECKSUMS:
7777
Amplify: c55f7bf2c6ea68891d95579882172c1256f301fc
78-
AmplifyTestCommon: 60a44eefba338d8d9809f3d2740422805bfaad9f
78+
AmplifyTestCommon: 40a2413a5fba88dd89b99ece6d467ff0951a7c2c
7979
AWSAuthCore: 6a5f0fdbbd65d917deab61e2f5035afecafaa687
8080
AWSCognitoIdentityProvider: f9031fc36af73a1e6a3c7476cbd536c1d4f7591c
8181
AWSCognitoIdentityProviderASF: c126563dd240709a5acf2c15910ea4c872c65df3
8282
AWSCore: e8748f1d2e97874ff5638fe7c3c31431ad223b4a
8383
AWSMobileClient: f98f4d3eb4d0f893a128b5546a31fd2cbc88e2ef
84-
AWSPluginsCore: 3afe92313f5be7f002a48007e6645b5ab58e05a7
84+
AWSPluginsCore: 03651a5904baf7d0e4d79addda7bcd8344d17bec
8585
CwlCatchException: 70a52ae44ea5d46db7bd385f801a94942420cd8c
8686
CwlPreconditionTesting: d33a4e4f285c0b885fddcae5dfedfbb34d4f3961
8787
SwiftFormat: 3b5caa6389b2b9adbc00e133b3ccc8c6e687a6a4

AmplifyPlugins/Core/AWSPluginsCore/Auth/AWSAuthService.swift

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

88
import Foundation
99
import Amplify
10-
import AWSMobileClient
10+
import AWSCore
1111

1212
public class AWSAuthService: AWSAuthServiceBehavior {
1313

AmplifyPlugins/Core/AWSPluginsTestCommon/MockAWSAuthService.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class MockAWSAuthService: AWSAuthServiceBehavior {
1616
var getTokenClaimsError: AuthError?
1717
var identityId: String?
1818
var token: String?
19-
var tokenClaims: [String : AnyObject]?
19+
var tokenClaims: [String: AnyObject]?
2020

2121
public func configure() {
2222
}
@@ -45,10 +45,10 @@ public class MockAWSAuthService: AWSAuthServiceBehavior {
4545
return .success(token ?? "token")
4646
}
4747

48-
public func getTokenClaims(tokenString: String) -> Result<[String : AnyObject], AuthError> {
48+
public func getTokenClaims(tokenString: String) -> Result<[String: AnyObject], AuthError> {
4949
if let error = getTokenClaimsError {
5050
return .failure(error)
5151
}
52-
return .success(tokenClaims ?? ["":"" as AnyObject])
52+
return .success(tokenClaims ?? ["": "" as AnyObject])
5353
}
5454
}

AmplifyPlugins/DataStore/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PODS:
1919
- AmplifyTestCommon/AWSPluginsTestCommon (1.5.1):
2020
- Amplify (= 1.5.1)
2121
- AWSCore (~> 2.20.0)
22+
- AWSMobileClient (~> 2.20.0)
2223
- AWSPluginsCore (= 1.5.1)
2324
- AppSyncRealTimeClient (1.4.2):
2425
- Starscream (~> 3.1.0)
@@ -37,7 +38,6 @@ PODS:
3738
- AWSPluginsCore (1.5.1):
3839
- Amplify (= 1.5.1)
3940
- AWSCore (~> 2.20.0)
40-
- AWSMobileClient (~> 2.20.0)
4141
- CwlCatchException (1.0.2)
4242
- CwlPreconditionTesting (1.1.1):
4343
- CwlCatchException
@@ -46,7 +46,7 @@ PODS:
4646
- SQLite.swift/standard (0.12.2)
4747
- Starscream (3.1.1)
4848
- SwiftFormat/CLI (0.44.17)
49-
- SwiftLint (0.41.0)
49+
- SwiftLint (0.42.0)
5050

5151
DEPENDENCIES:
5252
- Amplify (from `../../`)
@@ -101,20 +101,20 @@ CHECKOUT OPTIONS:
101101
SPEC CHECKSUMS:
102102
Amplify: c55f7bf2c6ea68891d95579882172c1256f301fc
103103
AmplifyPlugins: 40f1051d1e8313a74c16bafe0618d460bf0479db
104-
AmplifyTestCommon: 60a44eefba338d8d9809f3d2740422805bfaad9f
104+
AmplifyTestCommon: 40a2413a5fba88dd89b99ece6d467ff0951a7c2c
105105
AppSyncRealTimeClient: 7fb160294d067b6c0c4b3c4ab91e953fd4cfba30
106106
AWSAuthCore: 6a5f0fdbbd65d917deab61e2f5035afecafaa687
107107
AWSCognitoIdentityProvider: f9031fc36af73a1e6a3c7476cbd536c1d4f7591c
108108
AWSCognitoIdentityProviderASF: c126563dd240709a5acf2c15910ea4c872c65df3
109109
AWSCore: e8748f1d2e97874ff5638fe7c3c31431ad223b4a
110110
AWSMobileClient: f98f4d3eb4d0f893a128b5546a31fd2cbc88e2ef
111-
AWSPluginsCore: 3afe92313f5be7f002a48007e6645b5ab58e05a7
111+
AWSPluginsCore: 03651a5904baf7d0e4d79addda7bcd8344d17bec
112112
CwlCatchException: 70a52ae44ea5d46db7bd385f801a94942420cd8c
113113
CwlPreconditionTesting: d33a4e4f285c0b885fddcae5dfedfbb34d4f3961
114114
SQLite.swift: d2b4642190917051ce6bd1d49aab565fe794eea3
115115
Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0
116116
SwiftFormat: 3b5caa6389b2b9adbc00e133b3ccc8c6e687a6a4
117-
SwiftLint: c585ebd615d9520d7fbdbe151f527977b0534f1e
117+
SwiftLint: 4fa9579c63416865179bc416f0a92d55f009600d
118118

119119
PODFILE CHECKSUM: 04860e414d616b67d24ed3346a60700f427764b9
120120

0 commit comments

Comments
 (0)