Skip to content

Commit

Permalink
The AWS Mobile SDK for iOS 2.5.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Apr 19, 2017
1 parent 1a3a40f commit 91426a8
Show file tree
Hide file tree
Showing 246 changed files with 10,597 additions and 1,110 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.3'
s.version = '2.5.4'
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.3'
s.dependency 'AWSCore', '2.5.4'

s.source_files = 'AWSAPIGateway/*.{h,m}'
end
18 changes: 9 additions & 9 deletions 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.3";
static NSString *const AWSAPIGatewaySDKVersion = @"2.5.4";

static int defaultChunkSize = 1024;

Expand Down Expand Up @@ -145,7 +145,7 @@ - (instancetype)init {

NSData *data = [oStream propertyForKey: NSStreamDataWrittenToMemoryStreamKey];
if (!data) {
AWSLogVerbose(@"No data written to memory!");
AWSDDLogVerbose(@"No data written to memory!");
} else {
request.HTTPBody = data;
}
Expand All @@ -156,7 +156,7 @@ - (instancetype)init {
}

if (!request.HTTPBody && ![apiRequest.HTTPBody isKindOfClass:[NSInputStream class]]) {
AWSLogError(@"Failed to set a request body. %@", error);
AWSDDLogError(@"Failed to set a request body. %@", error);
}
}
return nil;
Expand Down Expand Up @@ -200,7 +200,7 @@ - (instancetype)init {
statusCode:HTTPStatusCode]];
}
};
AWSLogVerbose(@"%@",request);
AWSDDLogVerbose(@"%@",request);
NSURLSessionDataTask *sessionTask = [self.session dataTaskWithRequest:request
completionHandler:completionHandler];
[sessionTask resume];
Expand Down Expand Up @@ -232,7 +232,7 @@ - (AWSTask *)invokeHTTPRequest:(NSString *)HTTPMethod
options:0
error:&error];
if (!request.HTTPBody) {
AWSLogError(@"Failed to serialize a request body. %@", error);
AWSDDLogError(@"Failed to serialize a request body. %@", error);
}
}

Expand Down Expand Up @@ -275,7 +275,7 @@ - (AWSTask *)invokeHTTPRequest:(NSString *)HTTPMethod
if (!JSONObject) {
NSString *bodyString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
if ([bodyString length] > 0) {
AWSLogError(@"The body is not in JSON format. Body: %@\nError: %@", bodyString, error);
AWSDDLogError(@"The body is not in JSON format. Body: %@\nError: %@", bodyString, error);
}
[completionSource setError:error];
return;
Expand Down Expand Up @@ -321,7 +321,7 @@ - (AWSTask *)invokeHTTPRequest:(NSString *)HTTPMethod
fromJSONDictionary:JSONObject
error:&responseSerializationError];
if (!JSONObject) {
AWSLogError(@"Failed to serialize the body JSON. %@", responseSerializationError);
AWSDDLogError(@"Failed to serialize the body JSON. %@", responseSerializationError);
}
}
if ([JSONObject isKindOfClass:[NSArray class]]) {
Expand All @@ -333,7 +333,7 @@ - (AWSTask *)invokeHTTPRequest:(NSString *)HTTPMethod
error:&responseSerializationError];
[models addObject:model];
if (!JSONObject) {
AWSLogError(@"Failed to serialize the body JSON. %@", responseSerializationError);
AWSDDLogError(@"Failed to serialize the body JSON. %@", responseSerializationError);
}
}
JSONObject = models;
Expand Down Expand Up @@ -423,7 +423,7 @@ - (NSString *)encodeQueryStringValue:(id)value {
return mutableString;
}

AWSLogError(@"value[%@] is invalid.", value);
AWSDDLogError(@"value[%@] is invalid.", value);
return [[value description] aws_stringWithURLEncoding];
}

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.3</string>
<string>2.5.4</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.3'
s.version = '2.5.4'
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.3'
s.dependency 'AWSCore', '2.5.4'
s.source_files = 'AWSAutoScaling/*.{h,m}'
end
4 changes: 2 additions & 2 deletions AWSAutoScaling/AWSAutoScalingResources.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//

#import "AWSAutoScalingResources.h"
#import <AWSCore/AWSLogging.h>
#import <AWSCore/AWSCocoaLumberjack.h>

@interface AWSAutoScalingResources ()

Expand Down Expand Up @@ -48,7 +48,7 @@ - (instancetype)init {
error:&error];
if (_definitionDictionary == nil) {
if (error) {
AWSLogError(@"Failed to parse JSON service definition: %@",error);
AWSDDLogError(@"Failed to parse JSON service definition: %@",error);
}
}
}
Expand Down
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.3";
static NSString *const AWSAutoScalingSDKVersion = @"2.5.4";


@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.3</string>
<string>2.5.4</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.3'
s.version = '2.5.4'
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.3'
s.dependency 'AWSCore', '2.5.4'
s.source_files = 'AWSCloudWatch/*.{h,m}'
end
4 changes: 2 additions & 2 deletions AWSCloudWatch/AWSCloudWatchResources.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//

#import "AWSCloudWatchResources.h"
#import <AWSCore/AWSLogging.h>
#import <AWSCore/AWSCocoaLumberjack.h>

@interface AWSCloudWatchResources ()

Expand Down Expand Up @@ -48,7 +48,7 @@ - (instancetype)init {
error:&error];
if (_definitionDictionary == nil) {
if (error) {
AWSLogError(@"Failed to parse JSON service definition: %@",error);
AWSDDLogError(@"Failed to parse JSON service definition: %@",error);
}
}
}
Expand Down
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.3";
static NSString *const AWSCloudWatchSDKVersion = @"2.5.4";


@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.3</string>
<string>2.5.4</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.3'
s.version = '2.5.4'
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.3'
s.dependency 'AWSCore', '2.5.4'
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
40 changes: 20 additions & 20 deletions AWSCognito/AWSCognitoDataset.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#import "AWSCognitoRecord_Internal.h"
#import "AWSCognitoSQLiteManager.h"
#import "AWSCognitoConflict_Internal.h"
#import <AWSCore/AWSLogging.h>
#import <AWSCore/AWSCocoaLumberjack.h>
#import "AWSCognitoRecord.h"
#import "AWSKSReachability.h"

Expand Down Expand Up @@ -105,7 +105,7 @@ - (NSString *)stringForKey:(NSString *)aKey
AWSCognitoRecord *record = [self getRecordById:aKey error:&error];
if(error || (!record.data.string))
{
AWSLogDebug(@"Error: %@", error);
AWSDDLogDebug(@"Error: %@", error);
}

if (record != nil && ![record isDeleted]) {
Expand All @@ -128,38 +128,38 @@ - (void)setString:(NSString *)aString forKey:(NSString *)aKey

//do some limit checks
if([self sizeForRecord:record] > AWSCognitoMaxDatasetSize){
AWSLogDebug(@"Error: Record would exceed max dataset size");
AWSDDLogDebug(@"Error: Record would exceed max dataset size");
return;
}

if([self sizeForString:aKey] > AWSCognitoMaxKeySize){
AWSLogDebug(@"Error: Key size too large, max is %d bytes", AWSCognitoMaxKeySize);
AWSDDLogDebug(@"Error: Key size too large, max is %d bytes", AWSCognitoMaxKeySize);
return;
}

if([self sizeForString:aKey] < AWSCognitoMinKeySize){
AWSLogDebug(@"Error: Key size too small, min is %d byte", AWSCognitoMinKeySize);
AWSDDLogDebug(@"Error: Key size too small, min is %d byte", AWSCognitoMinKeySize);
return;
}


if([self sizeForString:aString] > AWSCognitoMaxDatasetSize){
AWSLogDebug(@"Error: Value size too large, max is %d bytes", AWSCognitoMaxRecordValueSize);
AWSDDLogDebug(@"Error: Value size too large, max is %d bytes", AWSCognitoMaxRecordValueSize);
return;
}

int numRecords = [[self.sqliteManager numRecords:self.name] intValue];

//if you have the max # of records and you aren't replacing an existing one
if(numRecords == AWSCognitoMaxNumRecords && !([self recordForKey:aKey] == nil)){
AWSLogDebug(@"Error: Too many records, max is %d", AWSCognitoMaxNumRecords);
AWSDDLogDebug(@"Error: Too many records, max is %d", AWSCognitoMaxNumRecords);
return;
}

NSError *error = nil;
if(![self putRecord:record error:&error])
{
AWSLogDebug(@"Error: %@", error);
AWSDDLogDebug(@"Error: %@", error);
}
}

Expand Down Expand Up @@ -190,7 +190,7 @@ - (AWSCognitoRecord *)recordForKey: (NSString *)aKey
AWSCognitoRecord * result = [self getRecordById:aKey error:&error];
if(!result)
{
AWSLogDebug(@"Error: %@", error);
AWSDDLogDebug(@"Error: %@", error);
}
return result;
}
Expand Down Expand Up @@ -265,7 +265,7 @@ - (void)removeObjectForKey:(NSString *)aKey
NSError *error = nil;
if(![self removeRecordById:aKey error:&error])
{
AWSLogDebug(@"Error: %@", error);
AWSDDLogDebug(@"Error: %@", error);
}
}

Expand All @@ -274,7 +274,7 @@ - (void)clear
NSError *error = nil;
if(![self.sqliteManager deleteDataset:self.name error:&error])
{
AWSLogDebug(@"Error: %@", error);
AWSDDLogDebug(@"Error: %@", error);
}
else {
self.lastSyncCount = [NSNumber numberWithInt:-1];
Expand Down Expand Up @@ -349,7 +349,7 @@ - (AWSTask *)syncPull:(uint32_t)remainingAttempts {
[self postDidFailToSynchronizeNotification:error];
return [AWSTask taskWithError:error];
}else if(task.error){
AWSLogError(@"Unable to list records: %@", task.error);
AWSDDLogError(@"Unable to list records: %@", task.error);
//decrement sync counts that exceed the service sync count and try again
if(task.error.code == AWSCognitoSyncErrorInvalidParameter && self.currentSyncCount.longLongValue > 0
&& task.error.userInfo[@"NSLocalizedDescription"] && [task.error.userInfo[@"NSLocalizedDescription"] hasPrefix:@"No such SyncCount:"]){
Expand Down Expand Up @@ -430,7 +430,7 @@ - (AWSTask *)syncPull:(uint32_t)remainingAttempts {
}
else{
//conflict resolution
AWSLogInfo(@"Record %@ is dirty with value: %@ and can't be overwritten, flagging for conflict resolution",existing.recordId,existing.data.string);
AWSDDLogInfo(@"Record %@ is dirty with value: %@ and can't be overwritten, flagging for conflict resolution",existing.recordId,existing.data.string);
[conflicts addObject: [[AWSCognitoConflict alloc] initWithLocalRecord:existing remoteRecord:newRecord]];
}
}
Expand Down Expand Up @@ -535,7 +535,7 @@ - (AWSTask *)syncPush:(uint32_t)remainingAttempts {
return [AWSTask taskWithError:error];
}else if(task.error){
if(task.error.code == AWSCognitoSyncErrorResourceConflict){
AWSLogInfo("Conflicts existed on update, restarting synchronize.");
AWSDDLogInfo(@"Conflicts existed on update, restarting synchronize.");
if(currentSyncCount > maxPatchSyncCount) {
//it's possible there is a local dirty record with a stale sync count
//this will fix it
Expand All @@ -544,7 +544,7 @@ - (AWSTask *)syncPush:(uint32_t)remainingAttempts {
return [self synchronizeInternal:remainingAttempts-1];
}
else {
AWSLogError(@"An error occured attempting to update records: %@",task.error);
AWSDDLogError(@"An error occured attempting to update records: %@",task.error);
}
return task;
}else{
Expand Down Expand Up @@ -671,7 +671,7 @@ - (AWSTask *)synchronize {

- (AWSTask *)synchronizeInternal:(uint32_t)remainingAttempts {
if(remainingAttempts == 0){
AWSLogError(@"Conflict retries exhausted");
AWSDDLogError(@"Conflict retries exhausted");
NSError *error = [NSError errorWithDomain:AWSCognitoErrorDomain code:AWSCognitoErrorConflictRetriesExhausted userInfo:nil];
[self postDidFailToSynchronizeNotification:error];
return [AWSTask taskWithError:error];
Expand All @@ -692,7 +692,7 @@ - (AWSTask *)synchronizeInternal:(uint32_t)remainingAttempts {
[self postDidFailToSynchronizeNotification:error];
return [AWSTask taskWithError:error];
} else if(task.error && task.error.code != AWSCognitoSyncErrorResourceNotFound){
AWSLogError(@"Unable to delete dataset: %@", task.error);
AWSDDLogError(@"Unable to delete dataset: %@", task.error);
return task;
} else {
[self.sqliteManager deleteMetadata:self.name error:nil];
Expand Down Expand Up @@ -742,7 +742,7 @@ -(AWSTask *)subscribe {
if(task.isCancelled){
return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoErrorDomain code:AWSCognitoErrorTaskCanceled userInfo:nil]];
}else if(task.error){
AWSLogError(@"Unable to subscribe dataset: %@", task.error);
AWSDDLogError(@"Unable to subscribe dataset: %@", task.error);
return task;
}else {
return [AWSTask taskWithResult:task.result];
Expand All @@ -766,7 +766,7 @@ -(AWSTask *)unsubscribe {
if(task.isCancelled){
return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoErrorDomain code:AWSCognitoErrorTaskCanceled userInfo:nil]];
}else if(task.error){
AWSLogError(@"Unable to unsubscribe dataset: %@", task.error);
AWSDDLogError(@"Unable to unsubscribe dataset: %@", task.error);
return task;
}else {
return [AWSTask taskWithResult:task.result];
Expand All @@ -777,7 +777,7 @@ -(AWSTask *)unsubscribe {
#pragma mark IdentityMerge

- (void)identityChanged:(NSNotification *)notification {
AWSLogDebug(@"IdentityChanged");
AWSDDLogDebug(@"IdentityChanged");

// by the point we are called, all datasets will have been reparented
[self checkForLocalMergedDatasets];
Expand Down

0 comments on commit 91426a8

Please sign in to comment.