Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh62 authored Dec 9, 2024
2 parents b7dc4fa + 49fa47c commit 558d5f1
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- project: AWSAuthSDK/AWSAuthSDK.xcodeproj
scheme: AWSMobileClient

runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kick-off-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

create-release-pr:
name: Create release PR for ${{ github.event.inputs.release-version }}
runs-on: macos-12
runs-on: macos-13
needs:
- validate-version-format
env:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

build-xcframeworks:
name: Build xcframeworks
runs-on: macos-12
runs-on: macos-13
needs:
- extract-release-version
- unit-test
Expand All @@ -82,7 +82,7 @@ jobs:

release-xcframeworks:
name: Release xcframeworks
runs-on: macos-12
runs-on: macos-13
environment: ReleaseArtifacts
needs:
- extract-release-version
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

release-spm:
name: Release SPM
runs-on: macos-12
runs-on: macos-13
environment: Release
needs:
- extract-release-version
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
release-combined-xcframeworks:
name: Release combine xcframeworks
runs-on: macos-12
runs-on: macos-13
environment: ReleaseArtifacts
needs:
- extract-release-version
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
release-tag:
name: Rlease tag
runs-on: macos-12
runs-on: macos-13
needs:
- extract-release-version
- release-combined-xcframeworks
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
release-doc:
name: Release docs
runs-on: macos-12
runs-on: macos-13
needs:
- extract-release-version
- update-main-branch
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
add-doc-tag:
name: Add doc tag
runs-on: macos-12
runs-on: macos-13
needs:
- extract-release-version
- release-doc
Expand Down Expand Up @@ -400,7 +400,7 @@ jobs:
release-cocoapods:
name: Release Cocoapods
runs-on: macos-12
runs-on: macos-13
needs:
- add-doc-tag
environment: Release
Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
release-carthage:
name: Release Carthage
runs-on: macos-12
runs-on: macos-13
needs:
- extract-release-version
- add-doc-tag
Expand Down Expand Up @@ -463,7 +463,7 @@ jobs:
bump-ios-sampleapp-version:
name: 'Bump iOS sample App version'
runs-on: macos-12
runs-on: macos-13
needs:
- release-xcframeworks
- release-cocoapods
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/report-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
unit-tests:
name: All SDK Unit Tests
runs-on: macos-12
runs-on: macos-13
continue-on-error: true
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- project: AWSAuthSDK/AWSAuthSDK.xcodeproj
scheme: AWSMobileClient

runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down
60 changes: 0 additions & 60 deletions AWSAuthSDK/Sources/AWSMobileClient/Internal/_AWSMobileClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,60 +94,6 @@ NS_ASSUME_NONNULL_BEGIN
sourceApplication:(nullable NSString *)sourceApplication
annotation:(id)annotation;

/**
Configures the different AWSMobile SDK Clientsfrom application delegate with options.
@param application instance from application delegate.
@param launchOptions from application delegate.
@param completionHandler completion handler for resuming auth session.
*Swift*
AWSMobileClient
.sharedInstance()
.interceptApplication(application,
didFinishLaunchingWithOptions:launchOptions,
resumeSessionWithCompletionHandler:completionHandler)
*Objective-C*
AWSMobileClient *mobileClient = [AWSMobileClient sharedInstance];
[mobileClient interceptApplication:application
didFinishLaunchingWithOptions:launchOptions
resumeSessionWithCompletionHandler:completionHandler];
*/
- (BOOL)interceptApplication:(UIApplication *)application
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions
resumeSessionWithCompletionHandler:(void (^)(id result, NSError *error))completionHandler;

/**
Configures the different AWSMobile SDK Clientsfrom application delegate with options.
@param application instance from application delegate.
@param launchOptions from application delegate.
*Swift*
AWSMobileClient
.sharedInstance()
.interceptApplication(application, didFinishLaunchingWithOptions:launchOptions)
*Objective-C*
AWSMobileClient *mobileClient = [AWSMobileClient sharedInstance];
[mobileClient interceptApplication:application
didFinishLaunchingWithOptions:launchOptions];
*/
- (BOOL)interceptApplication:(UIApplication *)application
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;

/**
Set the signInProviderConfig
@param signInProviderConfig the signInProviderConfiguration with permissions.
**/
- (void)setSignInProviders:(nullable NSArray<AWSSignInProviderConfig *> *)signInProviderConfig;


-(void)showSignInScreen:(UINavigationController *)navController
signInUIConfiguration:(SignInUIOptions *)signInUIConfiguration
Expand All @@ -159,12 +105,6 @@ didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
*/
- (void)setCredentialsProvider:(AWSCognitoCredentialsProvider *)credentialsProvider;

/**
* Retrieve the Credentials Provider.
* @return AWSCognitoCredentialsProvider
*/
- (AWSCognitoCredentialsProvider *)getCredentialsProvider;

/**
* Indicates whether the user is signed-in or not.
* @return true if user is signed-in
Expand Down
44 changes: 0 additions & 44 deletions AWSAuthSDK/Sources/AWSMobileClient/Internal/_AWSMobileClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,31 +111,6 @@ - (BOOL)interceptApplication:(UIApplication *)application
annotation:annotation];
}

- (BOOL)interceptApplication:(UIApplication *)application
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions
resumeSessionWithCompletionHandler:(void (^)(id result, NSError *error))completionHandler {

AWSDDLogInfo(@"didFinishLaunching:withOptions:resumeSessionWithCompletionHandler:");

if (self.signInProviderConfig == nil) {
[self registerConfigSignInProviders];
} else {
[self registerUserSignInProviders:self.signInProviderConfig];
}

BOOL didFinishLaunching = [[AWSSignInManager sharedInstance]
interceptApplication:application
didFinishLaunchingWithOptions:launchOptions];;

if (!_isInitialized) {
AWSDDLogInfo(@"Resuming any previously signed-in session");
[[AWSSignInManager sharedInstance] resumeSessionWithCompletionHandler:completionHandler];
_isInitialized = YES;
}

return didFinishLaunching;
}

-(void)showSignInScreen:(UINavigationController *)navController
signInUIConfiguration:(SignInUIOptions *)signInUIConfiguration
completionHandler:(void (^)(NSString * _Nullable signInProviderKey, NSString * _Nullable signInProviderToken, NSError * _Nullable error))completionHandler {
Expand Down Expand Up @@ -293,25 +268,6 @@ - (BOOL)isLoggedIn {
return [[AWSSignInManager sharedInstance] isLoggedIn];
}

- (AWSCognitoCredentialsProvider *)getCredentialsProvider {
return [[AWSIdentityManager defaultIdentityManager] credentialsProvider];
}

- (void)setSignInProviders:(nullable NSArray<AWSSignInProviderConfig *> *)signInProviderConfig {
self.signInProviderConfig = signInProviderConfig;
}

- (BOOL)interceptApplication:(UIApplication *)application
didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions {

return [self interceptApplication:application
didFinishLaunchingWithOptions:launchOptions
resumeSessionWithCompletionHandler:^(id result, NSError *error) {
AWSDDLogInfo(@"Welcome to AWS! You are connected successfully.");
AWSDDLogInfo(@"result = %@,error = %@", result, error);
}];
}

@end


Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class AWSMobileClientCustomEndpointTest: AWSMobileClientTestBase {
}

override func setUp() {
_ = AWSMobileClient.default().getCredentialsProvider()
continueAfterFailure = false
}

Expand Down
10 changes: 8 additions & 2 deletions AWSiOSSDKv2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15367,7 +15367,10 @@
"$(inherited)",
"$(PROJECT_DIR)/AWSLex/Bluefront",
);
OTHER_LDFLAGS = "-ObjC";
OTHER_LDFLAGS = (
"-ObjC",
"-ld64",
);
PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.sdk.ios.AWSLex;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -15393,7 +15396,10 @@
"$(inherited)",
"$(PROJECT_DIR)/AWSLex/Bluefront",
);
OTHER_LDFLAGS = "-ObjC";
OTHER_LDFLAGS = (
"-ObjC",
"-ld64",
);
PRODUCT_BUNDLE_IDENTIFIER = com.amazonaws.sdk.ios.AWSLex;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## Unreleased

-Features for next release
### Misc. Updates
- **AWSMobileClient**
- **Breaking API change** Removing the following deprecated methods:
- `interceptApplication(_:didFinishLaunchingWithOptions:)`
- `interceptApplication(_:didFinishLaunchingWithOptions:resumeSessionWithCompletionHandler:)`
- `setSignInProviders(_:)`
- `getCredentialsProvider()`

## 2.37.2

Expand Down

0 comments on commit 558d5f1

Please sign in to comment.