Skip to content

Commit

Permalink
The AWS Mobile SDK for iOS 2.5.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Aug 11, 2017
1 parent 04e3e3e commit cefb6de
Show file tree
Hide file tree
Showing 104 changed files with 504 additions and 400 deletions.
4 changes: 2 additions & 2 deletions AWSAPIGateway.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'AWSAPIGateway'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Web Services SDK for iOS.'

s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
Expand All @@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/aws/aws-sdk-ios.git',
:tag => s.version}
s.requires_arc = true
s.dependency 'AWSCore', '2.5.9'
s.dependency 'AWSCore', '2.5.10'

s.source_files = 'AWSAPIGateway/*.{h,m}'
end
2 changes: 1 addition & 1 deletion AWSAPIGateway/AWSAPIGatewayClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

static NSString *const AWSAPIGatewayAPIKeyHeader = @"x-api-key";

static NSString *const AWSAPIGatewaySDKVersion = @"2.5.9";
static NSString *const AWSAPIGatewaySDKVersion = @"2.5.10";

static int defaultChunkSize = 1024;

Expand Down
2 changes: 1 addition & 1 deletion AWSAPIGateway/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions AWSAutoScaling.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AWSAutoScaling'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Web Services SDK for iOS.'

s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
Expand All @@ -12,6 +12,6 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/aws/aws-sdk-ios.git',
:tag => s.version}
s.requires_arc = true
s.dependency 'AWSCore', '2.5.9'
s.dependency 'AWSCore', '2.5.10'
s.source_files = 'AWSAutoScaling/*.{h,m}'
end
2 changes: 1 addition & 1 deletion AWSAutoScaling/AWSAutoScalingService.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "AWSAutoScalingResources.h"

static NSString *const AWSInfoAutoScaling = @"AutoScaling";
static NSString *const AWSAutoScalingSDKVersion = @"2.5.9";
static NSString *const AWSAutoScalingSDKVersion = @"2.5.10";


@interface AWSAutoScalingResponseSerializer : AWSXMLResponseSerializer
Expand Down
2 changes: 1 addition & 1 deletion AWSAutoScaling/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions AWSCloudWatch.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AWSCloudWatch'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Web Services SDK for iOS.'

s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
Expand All @@ -12,6 +12,6 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/aws/aws-sdk-ios.git',
:tag => s.version}
s.requires_arc = true
s.dependency 'AWSCore', '2.5.9'
s.dependency 'AWSCore', '2.5.10'
s.source_files = 'AWSCloudWatch/*.{h,m}'
end
2 changes: 1 addition & 1 deletion AWSCloudWatch/AWSCloudWatchService.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "AWSCloudWatchResources.h"

static NSString *const AWSInfoCloudWatch = @"CloudWatch";
static NSString *const AWSCloudWatchSDKVersion = @"2.5.9";
static NSString *const AWSCloudWatchSDKVersion = @"2.5.10";


@interface AWSCloudWatchResponseSerializer : AWSXMLResponseSerializer
Expand Down
2 changes: 1 addition & 1 deletion AWSCloudWatch/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions AWSCognito.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AWSCognito'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Cognito SDK for iOS'

s.description = 'Amazon Cognito offers multi device data synchronization with offline access'
Expand All @@ -13,7 +13,7 @@ Pod::Spec.new do |s|
:tag => s.version}
s.requires_arc = true
s.library = 'sqlite3'
s.dependency 'AWSCore', '2.5.9'
s.dependency 'AWSCore', '2.5.10'
s.source_files = 'AWSCognito/*.{h,m}', 'AWSCognito/**/*.{h,m}'
s.public_header_files = 'AWSCognito/*.h', 'AWSCognito/CognitoSync/*.h'
s.private_header_files = 'AWSCognito/Fabric/*.h', 'AWSCognito/Internal/*.h'
Expand Down
2 changes: 1 addition & 1 deletion AWSCognito/AWSCognitoService.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#import "Fabric+FABKits.h"

static NSString *const AWSInfoCognito = @"Cognito";
static NSString *const AWSCognitoSDKVersion = @"2.5.9";
static NSString *const AWSCognitoSDKVersion = @"2.5.10";

NSString *const AWSCognitoDidStartSynchronizeNotification = @"com.amazon.cognito.AWSCognitoDidStartSynchronizeNotification";
NSString *const AWSCognitoDidEndSynchronizeNotification = @"com.amazon.cognito.AWSCognitoDidEndSynchronizeNotification";
Expand Down
2 changes: 1 addition & 1 deletion AWSCognito/CognitoSync/AWSCognitoSyncService.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "AWSCognitoSyncResources.h"

static NSString *const AWSInfoCognitoSync = @"CognitoSync";
static NSString *const AWSCognitoSyncSDKVersion = @"2.5.9";
static NSString *const AWSCognitoSyncSDKVersion = @"2.5.10";


@interface AWSCognitoSyncResponseSerializer : AWSJSONResponseSerializer
Expand Down
2 changes: 1 addition & 1 deletion AWSCognito/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions AWSCognitoAuth.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'AWSCognitoAuth'
s.version = '2.5.9'
s.summary = 'Amazon Cognito Auth SDK for iOS (Beta)'
s.version = '2.5.10'
s.summary = 'Amazon Cognito Auth SDK for iOS'

s.description = 'Amazon Cognito Auth enables sign up and authentication of your end users via a hosted UI'

Expand Down
74 changes: 48 additions & 26 deletions AWSCognitoAuth/AWSCognitoAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ @interface AWSCognitoAuth()<SFSafariViewControllerDelegate, NSURLConnectionDeleg

@implementation AWSCognitoAuth

static NSString *const AWSCognitoAuthSDKVersion = @"2.5.9";
static NSString *const AWSCognitoAuthSDKVersion = @"2.5.10";


static NSMutableDictionary *_instanceDictionary = nil;
Expand Down Expand Up @@ -181,7 +181,7 @@ - (void) cleanupSignIn {
Launch the sign in ui on the provided viewcontroller
*/
- (void) launchSignInVC: (UIViewController *) vc {
NSString *url = [NSString stringWithFormat:@"%@/authorize?response_type=code&client_id=%@&state=%@&redirect_uri=%@&scope=%@&code_challenge=%@&code_challenge_method=S256",self.authConfiguration.webDomain, self.authConfiguration.appClientId, self.state,[self urlEncode:self.authConfiguration.signInRedirectUri], [self urlEncode:[self normalizeScopes]], self.proofKeyHash];
NSString *url = [NSString stringWithFormat:@"%@/oauth2/authorize?response_type=code&client_id=%@&state=%@&redirect_uri=%@&scope=%@&code_challenge=%@&code_challenge_method=S256",self.authConfiguration.webDomain, self.authConfiguration.appClientId, self.state,[self urlEncode:self.authConfiguration.signInRedirectUri], [self urlEncode:[self normalizeScopes]], self.proofKeyHash];
self.svc = [[SFSafariViewController alloc] initWithURL:[NSURL URLWithString:url] entersReaderIfAvailable:NO];
self.svc.delegate = self;
self.svc.modalPresentationStyle = UIModalPresentationPopover;
Expand Down Expand Up @@ -233,13 +233,16 @@ - (void)getSessionInternal: (nullable UIViewController *) vc completion: (AWSCog
}
//else refresh it using the refresh token
else if(refreshToken){
NSString *url = [NSString stringWithFormat:@"%@/token",self.authConfiguration.webDomain];
NSString *body = [NSString stringWithFormat:@"grant_type=refresh_token&client_id=%@&refresh_token=%@&redirect_uri=%@",self.authConfiguration.appClientId, refreshToken, self.authConfiguration.signInRedirectUri];
NSString *url = [NSString stringWithFormat:@"%@/oauth2/token",self.authConfiguration.webDomain];
NSString *body = [NSString stringWithFormat:@"grant_type=refresh_token&client_id=%@&refresh_token=%@",self.authConfiguration.appClientId, refreshToken];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
[self addHeaders:request];
request.HTTPMethod = @"POST";
request.HTTPBody = [body dataUsingEncoding:NSUTF8StringEncoding];
[[[NSURLConnection alloc] initWithRequest:request delegate:self] start];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
[connection scheduleInRunLoop:[NSRunLoop mainRunLoop]
forMode:NSDefaultRunLoopMode];
[connection start];
return;
}
}
Expand Down Expand Up @@ -456,30 +459,49 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
[queryItemsDict setObject:queryItem.value forKey:queryItem.name];
}
}
if([[url absoluteString] hasPrefix:self.authConfiguration.signInRedirectUri] && queryItemsDict[@"state"] && queryItemsDict[@"code"]){
//if state doesn't match, abort
if(![self.state isEqualToString:queryItemsDict[@"state"]]){
[self completeGetSession:nil error:[self getError:@"State code did not match request" code: AWSCognitoAuthClientErrorSecurityFailed]];
return YES;
} else {
//continue with authorization code request
NSString * code = queryItemsDict[@"code"];
if(code){
NSString *url = [NSString stringWithFormat:@"%@/token",self.authConfiguration.webDomain];
NSString *body = [NSString stringWithFormat:@"grant_type=authorization_code&client_id=%@&code=%@&redirect_uri=%@&code_verifier=%@",
self.authConfiguration.appClientId, code, self.authConfiguration.signInRedirectUri, self.proofKey];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
request.HTTPMethod = @"POST";
request.HTTPBody = [body dataUsingEncoding:NSUTF8StringEncoding];
[self addHeaders:request];
[[[NSURLConnection alloc] initWithRequest:request delegate:self] start];
if([[url absoluteString] hasPrefix:self.authConfiguration.signInRedirectUri] && queryItemsDict[@"state"]) {
if(queryItemsDict[@"code"]){
//if state doesn't match, abort
if(![self.state isEqualToString:queryItemsDict[@"state"]]){
[self completeGetSession:nil error:[self getError:@"State code did not match request" code: AWSCognitoAuthClientErrorSecurityFailed]];
return YES;
} else {
//continue with authorization code request
NSString * code = queryItemsDict[@"code"];
if(code){
NSString *url = [NSString stringWithFormat:@"%@/oauth2/token",self.authConfiguration.webDomain];
NSString *body = [NSString stringWithFormat:@"grant_type=authorization_code&client_id=%@&code=%@&redirect_uri=%@&code_verifier=%@",
self.authConfiguration.appClientId, code, self.authConfiguration.signInRedirectUri, self.proofKey];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
request.HTTPMethod = @"POST";
request.HTTPBody = [body dataUsingEncoding:NSUTF8StringEncoding];
[self addHeaders:request];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
[connection scheduleInRunLoop:[NSRunLoop mainRunLoop]
forMode:NSDefaultRunLoopMode];
[connection start];
return YES;
}
}
}else if(queryItemsDict[@"error"]){
NSString *error = queryItemsDict[@"error"];
NSString *errorDescription = queryItemsDict[@"error_description"];
if(errorDescription){
error = [NSString stringWithFormat:@"%@: %@", error, errorDescription];
}
[self completeGetSession:nil error:[self getError:error code: AWSCognitoAuthClientErrorBadRequest]];
return YES;
}
}else if([[url absoluteString] hasPrefix:self.authConfiguration.signOutRedirectUri]){
} else if([[url absoluteString] hasPrefix:self.authConfiguration.signOutRedirectUri]){
if(queryItemsDict[@"error"]){
[self completeSignOut:[self getError:queryItemsDict[@"error"] code:AWSCognitoAuthClientErrorBadRequest]];
NSString *error = queryItemsDict[@"error"];
NSString *errorDescription = queryItemsDict[@"error_description"];
if(errorDescription){
error = [NSString stringWithFormat:@"%@: %@", error, errorDescription];
}
[self signOutLocallyAndClearLastKnownUser];
[self completeSignOut:[self getError:error code:AWSCognitoAuthClientErrorBadRequest]];
}else{
[self signOutLocallyAndClearLastKnownUser];
[self completeSignOut:nil];
Expand Down Expand Up @@ -640,7 +662,7 @@ - (void) updateUsernameAndPersistTokens: (AWSCognitoAuthUserSession *) session {
-(NSError *) getError:(NSString *) error code:(AWSCognitoAuthClientErrorType) code {
NSMutableDictionary * errors = [NSMutableDictionary new];
if(error){
[errors setObject:error forKey:@"error"];
[errors setObject:[error stringByReplacingOccurrencesOfString:@"+" withString:@" "]forKey:@"error"];
}
return [NSError errorWithDomain:AWSCognitoAuthErrorDomain code:code userInfo:errors];
}
Expand Down
2 changes: 1 addition & 1 deletion AWSCognitoAuth/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions AWSCognitoIdentityProvider.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AWSCognitoIdentityProvider'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Cognito Identity Provider SDK for iOS (Beta)'

s.description = 'Amazon Cognito Identity Provider enables sign up and authentication of your end users'
Expand All @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/aws/aws-sdk-ios.git',
:tag => s.version}
s.requires_arc = true
s.dependency 'AWSCore', '2.5.9'
s.dependency 'AWSCore', '2.5.10'
s.source_files = 'AWSCognitoIdentityProvider/**/*.{h,m,c}'
s.public_header_files = 'AWSCognitoIdentityProvider/*.h', 'AWSCognitoIdentityProvider/CognitoIdentityProvider/*.h'
s.private_header_files = 'AWSCognitoIdentityProvider/Internal/*.h'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "AWSCognitoIdentityProviderResources.h"

static NSString *const AWSInfoCognitoIdentityProvider = @"CognitoIdentityProvider";
static NSString *const AWSCognitoIdentityProviderSDKVersion = @"2.5.9";
static NSString *const AWSCognitoIdentityProviderSDKVersion = @"2.5.10";


@interface AWSCognitoIdentityProviderResponseSerializer : AWSJSONResponseSerializer
Expand Down
2 changes: 1 addition & 1 deletion AWSCognitoIdentityProvider/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions AWSCognitoSync.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'AWSCognitoSync'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Cognito SDK for iOS'

s.description = 'Amazon Cognito offers multi device data synchronization with offline access'
Expand All @@ -14,7 +14,7 @@ Pod::Spec.new do |s|
:tag => s.version}
s.requires_arc = true
s.library = 'sqlite3'
s.dependency 'AWSCognito', '2.5.9'
s.dependency 'AWSCognito', '2.5.10'

s.deprecated = true
s.deprecated_in_favor_of = 'AWSCognito'
Expand Down
2 changes: 1 addition & 1 deletion AWSCore.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'AWSCore'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Web Services SDK for iOS.'

s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
Expand Down
2 changes: 1 addition & 1 deletion AWSCore/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion AWSCore/Service/AWSService.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#import "AWSCocoaLumberjack.h"
#import "AWSCategory.h"

NSString *const AWSiOSSDKVersion = @"2.5.9";
NSString *const AWSiOSSDKVersion = @"2.5.10";
NSString *const AWSServiceErrorDomain = @"com.amazonaws.AWSServiceErrorDomain";

static NSString *const AWSServiceConfigurationUnknown = @"Unknown";
Expand Down
4 changes: 2 additions & 2 deletions AWSDynamoDB.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AWSDynamoDB'
s.version = '2.5.9'
s.version = '2.5.10'
s.summary = 'Amazon Web Services SDK for iOS.'

s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
Expand All @@ -12,6 +12,6 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/aws/aws-sdk-ios.git',
:tag => s.version}
s.requires_arc = true
s.dependency 'AWSCore', '2.5.9'
s.dependency 'AWSCore', '2.5.10'
s.source_files = 'AWSDynamoDB/*.{h,m}'
end
2 changes: 1 addition & 1 deletion AWSDynamoDB/AWSDynamoDBService.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#import "AWSDynamoDBRequestRetryHandler.h"

static NSString *const AWSInfoDynamoDB = @"DynamoDB";
static NSString *const AWSDynamoDBSDKVersion = @"2.5.9";
static NSString *const AWSDynamoDBSDKVersion = @"2.5.10";


@interface AWSDynamoDBResponseSerializer : AWSJSONResponseSerializer
Expand Down
2 changes: 1 addition & 1 deletion AWSDynamoDB/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.9</string>
<string>2.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Loading

0 comments on commit cefb6de

Please sign in to comment.