Skip to content

Commit 49fa47c

Browse files
authored
chore(MobileClient): Removing deprecated methods (#5459)
* chore(MobileClient): Removing deprecated methods * chore: Updating GH workflows to macOS-13
1 parent b7504ff commit 49fa47c

File tree

10 files changed

+29
-122
lines changed

10 files changed

+29
-122
lines changed

.github/workflows/integ-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- project: AWSAuthSDK/AWSAuthSDK.xcodeproj
6363
scheme: AWSMobileClient
6464

65-
runs-on: macos-12
65+
runs-on: macos-13
6666
steps:
6767
- name: Checkout code
6868
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

.github/workflows/kick-off-release.yml

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

3535
create-release-pr:
3636
name: Create release PR for ${{ github.event.inputs.release-version }}
37-
runs-on: macos-12
37+
runs-on: macos-13
3838
needs:
3939
- validate-version-format
4040
env:

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
build-xcframeworks:
5757
name: Build xcframeworks
58-
runs-on: macos-12
58+
runs-on: macos-13
5959
needs:
6060
- extract-release-version
6161
- unit-test
@@ -82,7 +82,7 @@ jobs:
8282

8383
release-xcframeworks:
8484
name: Release xcframeworks
85-
runs-on: macos-12
85+
runs-on: macos-13
8686
environment: ReleaseArtifacts
8787
needs:
8888
- extract-release-version
@@ -135,7 +135,7 @@ jobs:
135135

136136
release-spm:
137137
name: Release SPM
138-
runs-on: macos-12
138+
runs-on: macos-13
139139
environment: Release
140140
needs:
141141
- extract-release-version
@@ -179,7 +179,7 @@ jobs:
179179
180180
release-combined-xcframeworks:
181181
name: Release combine xcframeworks
182-
runs-on: macos-12
182+
runs-on: macos-13
183183
environment: ReleaseArtifacts
184184
needs:
185185
- extract-release-version
@@ -251,7 +251,7 @@ jobs:
251251
252252
release-tag:
253253
name: Rlease tag
254-
runs-on: macos-12
254+
runs-on: macos-13
255255
needs:
256256
- extract-release-version
257257
- release-combined-xcframeworks
@@ -324,7 +324,7 @@ jobs:
324324
325325
release-doc:
326326
name: Release docs
327-
runs-on: macos-12
327+
runs-on: macos-13
328328
needs:
329329
- extract-release-version
330330
- update-main-branch
@@ -372,7 +372,7 @@ jobs:
372372
373373
add-doc-tag:
374374
name: Add doc tag
375-
runs-on: macos-12
375+
runs-on: macos-13
376376
needs:
377377
- extract-release-version
378378
- release-doc
@@ -400,7 +400,7 @@ jobs:
400400
401401
release-cocoapods:
402402
name: Release Cocoapods
403-
runs-on: macos-12
403+
runs-on: macos-13
404404
needs:
405405
- add-doc-tag
406406
environment: Release
@@ -432,7 +432,7 @@ jobs:
432432
433433
release-carthage:
434434
name: Release Carthage
435-
runs-on: macos-12
435+
runs-on: macos-13
436436
needs:
437437
- extract-release-version
438438
- add-doc-tag
@@ -463,7 +463,7 @@ jobs:
463463
464464
bump-ios-sampleapp-version:
465465
name: 'Bump iOS sample App version'
466-
runs-on: macos-12
466+
runs-on: macos-13
467467
needs:
468468
- release-xcframeworks
469469
- release-cocoapods

.github/workflows/report-code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
unit-tests:
99
name: All SDK Unit Tests
10-
runs-on: macos-12
10+
runs-on: macos-13
1111
continue-on-error: true
1212
steps:
1313
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

.github/workflows/unit-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- project: AWSAuthSDK/AWSAuthSDK.xcodeproj
7171
scheme: AWSMobileClient
7272

73-
runs-on: macos-12
73+
runs-on: macos-13
7474

7575
steps:
7676
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

AWSAuthSDK/Sources/AWSMobileClient/Internal/_AWSMobileClient.h

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -94,60 +94,6 @@ NS_ASSUME_NONNULL_BEGIN
9494
sourceApplication:(nullable NSString *)sourceApplication
9595
annotation:(id)annotation;
9696

97-
/**
98-
Configures the different AWSMobile SDK Clientsfrom application delegate with options.
99-
100-
@param application instance from application delegate.
101-
@param launchOptions from application delegate.
102-
@param completionHandler completion handler for resuming auth session.
103-
104-
*Swift*
105-
106-
AWSMobileClient
107-
.sharedInstance()
108-
.interceptApplication(application,
109-
didFinishLaunchingWithOptions:launchOptions,
110-
resumeSessionWithCompletionHandler:completionHandler)
111-
112-
*Objective-C*
113-
114-
AWSMobileClient *mobileClient = [AWSMobileClient sharedInstance];
115-
[mobileClient interceptApplication:application
116-
didFinishLaunchingWithOptions:launchOptions
117-
resumeSessionWithCompletionHandler:completionHandler];
118-
*/
119-
- (BOOL)interceptApplication:(UIApplication *)application
120-
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions
121-
resumeSessionWithCompletionHandler:(void (^)(id result, NSError *error))completionHandler;
122-
123-
/**
124-
Configures the different AWSMobile SDK Clientsfrom application delegate with options.
125-
126-
@param application instance from application delegate.
127-
@param launchOptions from application delegate.
128-
129-
*Swift*
130-
131-
AWSMobileClient
132-
.sharedInstance()
133-
.interceptApplication(application, didFinishLaunchingWithOptions:launchOptions)
134-
135-
*Objective-C*
136-
137-
AWSMobileClient *mobileClient = [AWSMobileClient sharedInstance];
138-
[mobileClient interceptApplication:application
139-
didFinishLaunchingWithOptions:launchOptions];
140-
*/
141-
- (BOOL)interceptApplication:(UIApplication *)application
142-
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
143-
144-
/**
145-
Set the signInProviderConfig
146-
147-
@param signInProviderConfig the signInProviderConfiguration with permissions.
148-
**/
149-
- (void)setSignInProviders:(nullable NSArray<AWSSignInProviderConfig *> *)signInProviderConfig;
150-
15197

15298
-(void)showSignInScreen:(UINavigationController *)navController
15399
signInUIConfiguration:(SignInUIOptions *)signInUIConfiguration
@@ -159,12 +105,6 @@ didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
159105
*/
160106
- (void)setCredentialsProvider:(AWSCognitoCredentialsProvider *)credentialsProvider;
161107

162-
/**
163-
* Retrieve the Credentials Provider.
164-
* @return AWSCognitoCredentialsProvider
165-
*/
166-
- (AWSCognitoCredentialsProvider *)getCredentialsProvider;
167-
168108
/**
169109
* Indicates whether the user is signed-in or not.
170110
* @return true if user is signed-in

AWSAuthSDK/Sources/AWSMobileClient/Internal/_AWSMobileClient.m

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -111,31 +111,6 @@ - (BOOL)interceptApplication:(UIApplication *)application
111111
annotation:annotation];
112112
}
113113

114-
- (BOOL)interceptApplication:(UIApplication *)application
115-
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions
116-
resumeSessionWithCompletionHandler:(void (^)(id result, NSError *error))completionHandler {
117-
118-
AWSDDLogInfo(@"didFinishLaunching:withOptions:resumeSessionWithCompletionHandler:");
119-
120-
if (self.signInProviderConfig == nil) {
121-
[self registerConfigSignInProviders];
122-
} else {
123-
[self registerUserSignInProviders:self.signInProviderConfig];
124-
}
125-
126-
BOOL didFinishLaunching = [[AWSSignInManager sharedInstance]
127-
interceptApplication:application
128-
didFinishLaunchingWithOptions:launchOptions];;
129-
130-
if (!_isInitialized) {
131-
AWSDDLogInfo(@"Resuming any previously signed-in session");
132-
[[AWSSignInManager sharedInstance] resumeSessionWithCompletionHandler:completionHandler];
133-
_isInitialized = YES;
134-
}
135-
136-
return didFinishLaunching;
137-
}
138-
139114
-(void)showSignInScreen:(UINavigationController *)navController
140115
signInUIConfiguration:(SignInUIOptions *)signInUIConfiguration
141116
completionHandler:(void (^)(NSString * _Nullable signInProviderKey, NSString * _Nullable signInProviderToken, NSError * _Nullable error))completionHandler {
@@ -293,25 +268,6 @@ - (BOOL)isLoggedIn {
293268
return [[AWSSignInManager sharedInstance] isLoggedIn];
294269
}
295270

296-
- (AWSCognitoCredentialsProvider *)getCredentialsProvider {
297-
return [[AWSIdentityManager defaultIdentityManager] credentialsProvider];
298-
}
299-
300-
- (void)setSignInProviders:(nullable NSArray<AWSSignInProviderConfig *> *)signInProviderConfig {
301-
self.signInProviderConfig = signInProviderConfig;
302-
}
303-
304-
- (BOOL)interceptApplication:(UIApplication *)application
305-
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions {
306-
307-
return [self interceptApplication:application
308-
didFinishLaunchingWithOptions:launchOptions
309-
resumeSessionWithCompletionHandler:^(id result, NSError *error) {
310-
AWSDDLogInfo(@"Welcome to AWS! You are connected successfully.");
311-
AWSDDLogInfo(@"result = %@,error = %@", result, error);
312-
}];
313-
}
314-
315271
@end
316272

317273

AWSAuthSDK/Tests/AWSMobileClientCustomEndpointTest/AWSMobileClientCustomEndpointTest.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class AWSMobileClientCustomEndpointTest: AWSMobileClientTestBase {
1616
}
1717

1818
override func setUp() {
19-
_ = AWSMobileClient.default().getCredentialsProvider()
2019
continueAfterFailure = false
2120
}
2221

AWSiOSSDKv2.xcodeproj/project.pbxproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15367,7 +15367,10 @@
1536715367
"$(inherited)",
1536815368
"$(PROJECT_DIR)/AWSLex/Bluefront",
1536915369
);
15370-
OTHER_LDFLAGS = "-ObjC";
15370+
OTHER_LDFLAGS = (
15371+
"-ObjC",
15372+
"-ld64",
15373+
);
1537115374
PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.sdk.ios.AWSLex;
1537215375
PRODUCT_NAME = "$(TARGET_NAME)";
1537315376
SKIP_INSTALL = YES;
@@ -15393,7 +15396,10 @@
1539315396
"$(inherited)",
1539415397
"$(PROJECT_DIR)/AWSLex/Bluefront",
1539515398
);
15396-
OTHER_LDFLAGS = "-ObjC";
15399+
OTHER_LDFLAGS = (
15400+
"-ObjC",
15401+
"-ld64",
15402+
);
1539715403
PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.sdk.ios.AWSLex;
1539815404
PRODUCT_NAME = "$(TARGET_NAME)";
1539915405
SKIP_INSTALL = YES;

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
## Unreleased
44

5-
-Features for next release
5+
### Misc. Updates
6+
- **AWSMobileClient**
7+
- **Breaking API change** Removing the following deprecated methods:
8+
- `interceptApplication(_:didFinishLaunchingWithOptions:)`
9+
- `interceptApplication(_:didFinishLaunchingWithOptions:resumeSessionWithCompletionHandler:)`
10+
- `setSignInProviders(_:)`
11+
- `getCredentialsProvider()`
612

713
## 2.37.2
814

0 commit comments

Comments
 (0)