Skip to content

Commit 2bd3a51

Browse files
author
AWS
committed
The AWS Mobile SDK for iOS 2.4.12.
1 parent 7035add commit 2bd3a51

File tree

79 files changed

+398
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+398
-185
lines changed

AWSAPIGateway.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'AWSAPIGateway'
4-
s.version = '2.4.11'
4+
s.version = '2.4.12'
55
s.summary = 'Amazon Web Services SDK for iOS.'
66

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

1818
s.source_files = 'AWSAPIGateway/*.{h,m}'
1919
end

AWSAPIGateway/AWSAPIGatewayClient.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

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

26-
static NSString *const AWSAPIGatewaySDKVersion = @"2.4.11";
26+
static NSString *const AWSAPIGatewaySDKVersion = @"2.4.12";
2727

2828
static int defaultChunkSize = 1024;
2929

@@ -95,7 +95,7 @@ - (instancetype)init {
9595
userInfo:nil];
9696
}
9797

98-
NSURL *URL = [self requestURL:apiRequest.URLString query:apiRequest.queryParameters URLPathComponentsDictionary:nil];
98+
NSURL *URL = [self requestURL:[apiRequest.URLString aws_stringWithURLEncodingPath] query:apiRequest.queryParameters URLPathComponentsDictionary:nil];
9999
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
100100
request.HTTPMethod = apiRequest.HTTPMethod;
101101
request.allHTTPHeaderFields = apiRequest.headerParameters;
@@ -374,7 +374,7 @@ - (NSURL *)requestURL:(NSString *)URLString query:(NSDictionary *)query URLPathC
374374
[mutableURLString appendFormat:@"?%@", queryString];
375375
}
376376

377-
NSString *urlString = [NSString stringWithFormat:@"%@%@", self.configuration.baseURL, [mutableURLString aws_stringWithURLEncodingPath]];
377+
NSString *urlString = [NSString stringWithFormat:@"%@%@", self.configuration.baseURL, mutableURLString];
378378

379379
return [NSURL URLWithString:urlString];
380380
}

AWSAPIGateway/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.4.11</string>
18+
<string>2.4.12</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

AWSAPIGatewayTests/AWSAPIGatewayInvokeTest.swift

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class TestAPIGatewayInvoke: XCTestCase {
204204
func testInvokeProxyPath() {
205205

206206
let proxyPathRequest = AWSAPIGatewayRequest(HTTPMethod: "GET",
207-
URLString: "/resource1/resource2/some/random/path{}",
207+
URLString: "/user/myuser{}",
208208
queryParameters: nil,
209209
headerParameters: headerParameters,
210210
HTTPBody: nil)
@@ -223,14 +223,44 @@ class TestAPIGatewayInvoke: XCTestCase {
223223
let apiResponse = result as! AWSAPIGatewayResponse
224224
let datastring = NSString(data: apiResponse.responseData!, encoding: NSUTF8StringEncoding)
225225
XCTAssertEqual(200, apiResponse.statusCode)
226-
XCTAssertNotNil(datastring)
226+
XCTAssertEqual(datastring!, "\"myuser%7B%7D\"")
227227
return nil
228228
}
229229
return nil
230230
}.waitUntilFinished()
231231

232232
}
233233

234+
func testInvokePathWithQueryString() {
235+
236+
let proxyPathRequest = AWSAPIGatewayRequest(HTTPMethod: "GET",
237+
URLString: "/TestFunction",
238+
queryParameters: ["key1":"myuser{}"],
239+
headerParameters: headerParameters,
240+
HTTPBody: nil)
241+
242+
client!.invoke(proxyPathRequest).continueWithBlock { (task:AWSTask) -> AnyObject? in
243+
if let exception = task.exception {
244+
print("Exception occured: \(exception)")
245+
XCTFail("Encountered unexpected exception")
246+
}
247+
if let error = task.error {
248+
print("\(error)")
249+
XCTFail("Encountered unexpected error")
250+
return nil
251+
}
252+
if let result = task.result {
253+
let apiResponse = result as! AWSAPIGatewayResponse
254+
let datastring = NSString(data: apiResponse.responseData!, encoding: NSUTF8StringEncoding)
255+
XCTAssertEqual(200, apiResponse.statusCode)
256+
XCTAssertEqual(datastring!, "\"myuser{}\"")
257+
return nil
258+
}
259+
return nil
260+
}.waitUntilFinished()
261+
262+
}
263+
234264
func testGet() {
235265

236266
client!.helloWorldGet().continueWithBlock { (task:AWSTask) -> AnyObject? in
@@ -254,7 +284,27 @@ class TestAPIGatewayInvoke: XCTestCase {
254284

255285
func testPathParametersWithGet() {
256286

257-
client!.userUsernameGet("myuser").continueWithBlock { (task:AWSTask) -> AnyObject? in
287+
client!.userUsernameGet("myuser{}").continueWithBlock { (task:AWSTask) -> AnyObject? in
288+
if let exception = task.exception {
289+
print("Exception occured: \(exception)")
290+
XCTFail("Encountered unexpected exception")
291+
}
292+
if let error = task.error {
293+
print("\(error)")
294+
XCTFail("Encountered unexpected error")
295+
return nil
296+
}
297+
if let result = task.result {
298+
XCTAssertEqual("myuser%7B%7D", result as? String);
299+
return nil
300+
}
301+
return nil
302+
}.waitUntilFinished()
303+
}
304+
305+
func testQueryStringParametersWithGet() {
306+
307+
client!.testFunctionGet("myuser{}").continueWithBlock { (task:AWSTask) -> AnyObject? in
258308
if let exception = task.exception {
259309
print("Exception occured: \(exception)")
260310
XCTFail("Encountered unexpected exception")
@@ -265,7 +315,7 @@ class TestAPIGatewayInvoke: XCTestCase {
265315
return nil
266316
}
267317
if let result = task.result {
268-
XCTAssertEqual("myuser", result as? String);
318+
XCTAssertEqual("myuser{}", result as? String);
269319
return nil
270320
}
271321
return nil

AWSAPIGatewayTests/AWSLambdaMicroserviceClient.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ NS_ASSUME_NONNULL_BEGIN
3535
*/
3636
- (AWSTask *)userUsernameGet:( NSString *)username;
3737

38+
/**
39+
@param key1
40+
41+
return type: AWSEmpty *
42+
*/
43+
- (AWSTask *)testFunctionGet:(nullable NSString *)key1;
44+
3845
@end
3946

4047
NS_ASSUME_NONNULL_END

AWSAPIGatewayTests/AWSLambdaMicroserviceClient.m

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,26 @@ - (AWSTask *)userUsernameGet:(NSString *)username {
171171
responseClass:nil];
172172
}
173173

174-
174+
- (AWSTask *)testFunctionGet:(NSString *)key1 {
175+
NSDictionary *headerParameters = @{
176+
@"Content-Type": @"application/json",
177+
@"Accept": @"application/json",
178+
179+
};
180+
NSDictionary *queryParameters = @{
181+
@"key1": key1
182+
};
183+
NSDictionary *pathParameters = @{
184+
185+
};
186+
187+
return [self invokeHTTPRequest:@"GET"
188+
URLString:@"/TestFunction"
189+
pathParameters:pathParameters
190+
queryParameters:queryParameters
191+
headerParameters:headerParameters
192+
body:nil
193+
responseClass:nil];
194+
}
175195

176196
@end

AWSAutoScaling.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'AWSAutoScaling'
4-
s.version = '2.4.11'
4+
s.version = '2.4.12'
55
s.summary = 'Amazon Web Services SDK for iOS.'
66

77
s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313
s.source = { :git => 'https://github.com/aws/aws-sdk-ios.git',
1414
:tag => s.version}
1515
s.requires_arc = true
16-
s.dependency 'AWSCore', '2.4.11'
16+
s.dependency 'AWSCore', '2.4.12'
1717
s.source_files = 'AWSAutoScaling/*.{h,m}'
1818

1919
end

AWSAutoScaling/AWSAutoScalingService.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#import "AWSAutoScalingResources.h"
2727

2828
static NSString *const AWSInfoAutoScaling = @"AutoScaling";
29-
static NSString *const AWSAutoScalingSDKVersion = @"2.4.11";
29+
static NSString *const AWSAutoScalingSDKVersion = @"2.4.12";
3030

3131

3232
@interface AWSAutoScalingResponseSerializer : AWSXMLResponseSerializer

AWSAutoScaling/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.4.11</string>
18+
<string>2.4.12</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

AWSCloudWatch.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'AWSCloudWatch'
4-
s.version = '2.4.11'
4+
s.version = '2.4.12'
55
s.summary = 'Amazon Web Services SDK for iOS.'
66

77
s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.'
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313
s.source = { :git => 'https://github.com/aws/aws-sdk-ios.git',
1414
:tag => s.version}
1515
s.requires_arc = true
16-
s.dependency 'AWSCore', '2.4.11'
16+
s.dependency 'AWSCore', '2.4.12'
1717
s.source_files = 'AWSCloudWatch/*.{h,m}'
1818

1919
end

0 commit comments

Comments
 (0)