Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

AWS SDK for iOS 1.4.2

  • Loading branch information...
commit bc1f55670b03f2474aa1ae2b560608d3f388f19b 1 parent 38e8954
@yosuke-matsuda yosuke-matsuda authored
Showing with 1,019 additions and 547 deletions.
  1. +8 −4 samples/S3_Uploader/S3Uploader.xcodeproj/project.pbxproj
  2. +2 −12 samples/S3_Uploader/S3Uploader/Constants.h
  3. +0 −10 samples/S3_Uploader/S3Uploader/Constants.m
  4. +1 −1  samples/S3_Uploader/S3Uploader/S3Uploader-Info.plist
  5. +0 −1  samples/S3_Uploader/S3Uploader/S3UploaderAppDelegate.h
  6. +14 −44 samples/S3_Uploader/S3Uploader/S3UploaderAppDelegate.m
  7. +15 −2 samples/S3_Uploader/S3Uploader/S3UploaderViewController.h
  8. +216 −52 samples/S3_Uploader/S3Uploader/S3UploaderViewController.m
  9. +61 −257 samples/S3_Uploader/S3Uploader/en.lproj/MainWindow.xib
  10. +310 −78 samples/S3_Uploader/S3Uploader/en.lproj/S3UploaderViewController.xib
  11. +14 −7 samples/S3_Uploader/S3Uploader/main.m
  12. +12 −20 src/AWSiOSSDK.xcodeproj/project.pbxproj
  13. +2 −0  src/Amazon.AutoScaling/Model/AutoScalingCreateAutoScalingGroupResponse.m
  14. +2 −0  src/Amazon.AutoScaling/Model/AutoScalingCreateLaunchConfigurationResponse.m
  15. +2 −0  src/Amazon.AutoScaling/Model/AutoScalingCreateOrUpdateTagsResponse.m
  16. +2 −0  src/Amazon.AutoScaling/Model/AutoScalingDeleteAutoScalingGroupResponse.m
  17. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDeleteLaunchConfigurationResponse.m
  18. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribeAutoScalingGroupsResponse.m
  19. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribeAutoScalingInstancesResponse.m
  20. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribeLaunchConfigurationsResponse.m
  21. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribeNotificationConfigurationsResponse.m
  22. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribePoliciesResponse.m
  23. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribeScalingActivitiesResponse.m
  24. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribeScheduledActionsResponse.m
  25. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingDescribeTagsResponse.m
  26. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingExecutePolicyResponse.m
  27. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingPutNotificationConfigurationResponse.m
  28. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingPutScalingPolicyResponse.m
  29. +2 −0  src/Amazon.AutoScaling/Model/AutoScalingPutScheduledUpdateGroupActionResponse.m
  30. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingSetDesiredCapacityResponse.m
  31. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingTerminateInstanceInAutoScalingGroupResponse.m
  32. +1 −0  src/Amazon.AutoScaling/Model/AutoScalingUpdateAutoScalingGroupResponse.m
  33. +1 −0  src/Amazon.CloudWatch/Model/CloudWatchDeleteAlarmsResponse.m
  34. +1 −0  src/Amazon.CloudWatch/Model/CloudWatchDescribeAlarmHistoryResponse.m
  35. +1 −0  src/Amazon.CloudWatch/Model/CloudWatchDescribeAlarmsResponse.m
  36. +4 −0 src/Amazon.CloudWatch/Model/CloudWatchGetMetricStatisticsResponse.m
  37. +2 −0  src/Amazon.CloudWatch/Model/CloudWatchListMetricsResponse.m
  38. +1 −0  src/Amazon.CloudWatch/Model/CloudWatchPutMetricAlarmResponse.m
  39. +4 −0 src/Amazon.CloudWatch/Model/CloudWatchPutMetricDataResponse.m
  40. +2 −0  src/Amazon.CloudWatch/Model/CloudWatchSetAlarmStateResponse.m
  41. +2 −2 src/Amazon.DynamoDB/DynamoDBWebServiceClient.m
  42. +3 −0  src/Amazon.DynamoDB/Model/DynamoDBBatchGetItemResponse.m
  43. +3 −0  src/Amazon.DynamoDB/Model/DynamoDBBatchWriteItemResponse.m
  44. +3 −0  src/Amazon.DynamoDB/Model/DynamoDBCreateTableResponse.m
  45. +4 −0 src/Amazon.DynamoDB/Model/DynamoDBDeleteItemResponse.m
  46. +4 −0 src/Amazon.DynamoDB/Model/DynamoDBDeleteTableResponse.m
  47. +2 −0  src/Amazon.DynamoDB/Model/DynamoDBDescribeTableResponse.m
  48. +3 −0  src/Amazon.DynamoDB/Model/DynamoDBGetItemResponse.m
  49. +1 −0  src/Amazon.DynamoDB/Model/DynamoDBListTablesResponse.m
  50. +4 −0 src/Amazon.DynamoDB/Model/DynamoDBPutItemResponse.m
  51. +3 −0  src/Amazon.DynamoDB/Model/DynamoDBQueryResponse.m
  52. +3 −0  src/Amazon.DynamoDB/Model/DynamoDBScanResponse.m
  53. +4 −0 src/Amazon.DynamoDB/Model/DynamoDBUpdateItemResponse.m
  54. +4 −0 src/Amazon.DynamoDB/Model/DynamoDBUpdateTableResponse.m
  55. +3 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingApplySecurityGroupsToLoadBalancerResponse.m
  56. +4 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingAttachLoadBalancerToSubnetsResponse.m
  57. +1 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingConfigureHealthCheckResponse.m
  58. +4 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingCreateAppCookieStickinessPolicyResponse.m
  59. +4 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingCreateLBCookieStickinessPolicyResponse.m
  60. +4 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingCreateLoadBalancerListenersResponse.m
  61. +5 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingCreateLoadBalancerPolicyResponse.m
  62. +7 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingCreateLoadBalancerResponse.m
  63. +1 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDeleteLoadBalancerListenersResponse.m
  64. +2 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDeleteLoadBalancerPolicyResponse.m
  65. +2 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDeregisterInstancesFromLoadBalancerResponse.m
  66. +2 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDescribeInstanceHealthResponse.m
  67. +2 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDescribeLoadBalancerPoliciesResponse.m
  68. +1 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDescribeLoadBalancerPolicyTypesResponse.m
  69. +1 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDescribeLoadBalancersResponse.m
  70. +2 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDetachLoadBalancerFromSubnetsResponse.m
  71. +2 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingDisableAvailabilityZonesForLoadBalancerResponse.m
  72. +1 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingEnableAvailabilityZonesForLoadBalancerResponse.m
  73. +2 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingRegisterInstancesWithLoadBalancerResponse.m
  74. +4 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingSetLoadBalancerListenerSSLCertificateResponse.m
  75. +3 −0  src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingSetLoadBalancerPoliciesForBackendServerResponse.m
  76. +4 −0 src/Amazon.ElasticLoadBalancing/Model/ElasticLoadBalancingSetLoadBalancerPoliciesOfListenerResponse.m
  77. +1 −1  src/Amazon.Runtime/AmazonSDKUtil.m
  78. +22 −7 src/Amazon.S3/AmazonS3Client.m
  79. +6 −4 src/Amazon.S3/Model/S3AbortMultipartUploadRequest.m
  80. +6 −4 src/Amazon.S3/Model/S3CompleteMultipartUploadRequest.m
  81. +2 −2 src/Amazon.S3/Model/S3CopyObjectResponse.m
  82. +10 −8 src/Amazon.S3/Model/S3CopyObjectResultUnmarshaller.m
  83. +2 −2 src/Amazon.S3/Model/S3CopyPartResponse.m
  84. +10 −8 src/Amazon.S3/Model/S3CopyPartResultUnmarshaller.m
  85. +5 −3 src/Amazon.S3/Model/S3InitiateMultipartUploadRequest.m
  86. +6 −4 src/Amazon.S3/Model/S3ListPartsRequest.m
  87. +5 −3 src/Amazon.S3/Model/S3PutObjectRequest.m
  88. +6 −4 src/Amazon.S3/Model/S3UploadPartRequest.m
  89. +1 −0  src/Amazon.SES/Model/SESSendEmailResponse.m
  90. +1 −0  src/Amazon.SES/Model/SESSendRawEmailResponse.m
  91. +4 −0 src/Amazon.SNS/Model/SNSAddPermissionResponse.m
  92. +5 −0 src/Amazon.SNS/Model/SNSConfirmSubscriptionResponse.m
  93. +4 −0 src/Amazon.SNS/Model/SNSCreateTopicResponse.m
  94. +4 −0 src/Amazon.SNS/Model/SNSDeleteTopicResponse.m
  95. +4 −0 src/Amazon.SNS/Model/SNSGetSubscriptionAttributesResponse.m
  96. +4 −0 src/Amazon.SNS/Model/SNSGetTopicAttributesResponse.m
  97. +4 −0 src/Amazon.SNS/Model/SNSListSubscriptionsByTopicResponse.m
  98. +3 −0  src/Amazon.SNS/Model/SNSListSubscriptionsResponse.m
  99. +3 −0  src/Amazon.SNS/Model/SNSListTopicsResponse.m
  100. +4 −0 src/Amazon.SNS/Model/SNSPublishResponse.m
  101. +4 −0 src/Amazon.SNS/Model/SNSRemovePermissionResponse.m
  102. +4 −0 src/Amazon.SNS/Model/SNSSetSubscriptionAttributesResponse.m
  103. +4 −0 src/Amazon.SNS/Model/SNSSetTopicAttributesResponse.m
  104. +5 −0 src/Amazon.SNS/Model/SNSSubscribeResponse.m
  105. +4 −0 src/Amazon.SNS/Model/SNSUnsubscribeResponse.m
  106. +1 −0  src/Amazon.SQS/Model/SQSAddPermissionResponse.m
  107. +4 −0 src/Amazon.SQS/Model/SQSChangeMessageVisibilityBatchResponse.m
  108. +2 −0  src/Amazon.SQS/Model/SQSChangeMessageVisibilityResponse.m
  109. +2 −0  src/Amazon.SQS/Model/SQSCreateQueueResponse.m
  110. +4 −0 src/Amazon.SQS/Model/SQSDeleteMessageBatchResponse.m
  111. +2 −0  src/Amazon.SQS/Model/SQSDeleteMessageResponse.m
  112. +1 −0  src/Amazon.SQS/Model/SQSGetQueueAttributesResponse.m
  113. +1 −0  src/Amazon.SQS/Model/SQSGetQueueUrlResponse.m
  114. +1 −0  src/Amazon.SQS/Model/SQSReceiveMessageResponse.m
  115. +5 −0 src/Amazon.SQS/Model/SQSSendMessageBatchResponse.m
  116. +1 −0  src/Amazon.SQS/Model/SQSSendMessageResponse.m
  117. +1 −0  src/Amazon.SQS/Model/SQSSetQueueAttributesResponse.m
  118. +2 −0  src/Amazon.STS/Model/SecurityTokenServiceGetFederationTokenResponse.m
  119. +9 −0 src/Amazon.SimpleDB/Model/SimpleDBBatchPutAttributesResponse.m
  120. +3 −0  src/Amazon.SimpleDB/Model/SimpleDBCreateDomainResponse.m
  121. +4 −0 src/Amazon.SimpleDB/Model/SimpleDBDeleteAttributesResponse.m
  122. +1 −0  src/Amazon.SimpleDB/Model/SimpleDBDeleteDomainResponse.m
  123. +2 −0  src/Amazon.SimpleDB/Model/SimpleDBDomainMetadataResponse.m
  124. +3 −0  src/Amazon.SimpleDB/Model/SimpleDBGetAttributesResponse.m
  125. +2 −0  src/Amazon.SimpleDB/Model/SimpleDBListDomainsResponse.m
  126. +7 −0 src/Amazon.SimpleDB/Model/SimpleDBPutAttributesResponse.m
  127. +9 −0 src/Amazon.SimpleDB/Model/SimpleDBSelectResponse.m
  128. +1 −1  src/include/AmazonSDKUtil.h
  129. +6 −2 src/include/S3/AmazonS3Client.h
  130. +2 −2 src/include/S3/S3CopyObjectResultUnmarshaller.h
  131. +2 −2 src/include/S3/S3CopyPartResultUnmarshaller.h
View
12 samples/S3_Uploader/S3Uploader.xcodeproj/project.pbxproj
@@ -86,14 +86,13 @@
D00F6BA3141FEA1800A058E8 /* S3Uploader */ = {
isa = PBXGroup;
children = (
- D00F6BC7141FF06400A058E8 /* Constants.m */,
- D00F6BC5141FECC300A058E8 /* Constants.h */,
D00F6BAC141FEA1800A058E8 /* S3UploaderAppDelegate.h */,
D00F6BAD141FEA1800A058E8 /* S3UploaderAppDelegate.m */,
- D00F6BAF141FEA1800A058E8 /* MainWindow.xib */,
+ D00F6BC5141FECC300A058E8 /* Constants.h */,
+ D00F6BC7141FF06400A058E8 /* Constants.m */,
+ D00F6BB5141FEA1800A058E8 /* S3UploaderViewController.xib */,
D00F6BB2141FEA1800A058E8 /* S3UploaderViewController.h */,
D00F6BB3141FEA1800A058E8 /* S3UploaderViewController.m */,
- D00F6BB5141FEA1800A058E8 /* S3UploaderViewController.xib */,
D00F6BA4141FEA1800A058E8 /* Supporting Files */,
);
path = S3Uploader;
@@ -102,6 +101,7 @@
D00F6BA4141FEA1800A058E8 /* Supporting Files */ = {
isa = PBXGroup;
children = (
+ D00F6BAF141FEA1800A058E8 /* MainWindow.xib */,
D00F6BA5141FEA1800A058E8 /* S3Uploader-Info.plist */,
D00F6BA6141FEA1800A058E8 /* InfoPlist.strings */,
D00F6BA9141FEA1800A058E8 /* S3Uploader-Prefix.pch */,
@@ -256,7 +256,9 @@
GCC_PREFIX_HEADER = "S3Uploader/S3Uploader-Prefix.pch";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "S3Uploader/S3Uploader-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
PRODUCT_NAME = "$(TARGET_NAME)";
+ TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};
name = Debug;
@@ -274,7 +276,9 @@
GCC_PREFIX_HEADER = "S3Uploader/S3Uploader-Prefix.pch";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "S3Uploader/S3Uploader-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
PRODUCT_NAME = "$(TARGET_NAME)";
+ TARGETED_DEVICE_FAMILY = 1;
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
};
View
14 samples/S3_Uploader/S3Uploader/Constants.h
@@ -24,7 +24,8 @@
#define PICTURE_NAME @"NameOfThePicture"
-#define CREDENTIALS_MESSAGE @"AWS Credentials not configured correctly. Please review the README file."
+#define CREDENTIALS_ERROR_TITLE @"Missing Credentials"
+#define CREDENTIALS_ERROR_MESSAGE @"AWS Credentials not configured correctly. Please review the README file."
@interface Constants:NSObject {
@@ -35,15 +36,4 @@
*/
+(NSString *)pictureBucket;
-
-/**
- * Utility method to display an alert message. Used to communicate errors and failures.
- */
-+(void)showAlertMessage:(NSString *)message withTitle:(NSString *)title;
-
-
-
-+(UIAlertView *)credentialsAlert;
-
-
@end
View
10 samples/S3_Uploader/S3Uploader/Constants.m
@@ -23,15 +23,5 @@ +(NSString *)pictureBucket
return [[NSString stringWithFormat:@"my-unique-name-%@%@", ACCESS_KEY_ID, PICTURE_BUCKET] lowercaseString];
}
-+(void)showAlertMessage:(NSString *)message withTitle:(NSString *)title
-{
- [[[[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease] show];
-}
-
-+(UIAlertView *)credentialsAlert
-{
- return [[[UIAlertView alloc] initWithTitle:@"Missing Credentials" message:CREDENTIALS_MESSAGE delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
-}
-
@end
View
2  samples/S3_Uploader/S3Uploader/S3Uploader-Info.plist
@@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>com.amazon.aws.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>com.amazonaws.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
View
1  samples/S3_Uploader/S3Uploader/S3UploaderAppDelegate.h
@@ -21,7 +21,6 @@
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
-
@property (nonatomic, retain) IBOutlet S3UploaderViewController *viewController;
@end
View
58 samples/S3_Uploader/S3Uploader/S3UploaderAppDelegate.m
@@ -18,19 +18,27 @@
#import <AWSiOSSDK/AmazonLogger.h>
#import <AWSiOSSDK/AmazonErrorHandler.h>
-@implementation S3UploaderAppDelegate
+@implementation S3UploaderAppDelegate
@synthesize window = _window;
-
@synthesize viewController = _viewController;
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- // Override point for customization after application launch.
+ UINavigationController *container = [UINavigationController new];
+ container.navigationBar.barStyle = UIBarStyleBlack;
+
+ S3UploaderViewController *s3Uploader = [S3UploaderViewController new];
+ [container pushViewController:s3Uploader animated:NO];
+ [s3Uploader release];
+
+ _window.rootViewController = container;
+ [container release];
+
+ [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
- self.window.rootViewController = self.viewController;
- [self.window makeKeyAndVisible];
+ [_window makeKeyAndVisible];
// Logging Control - Do NOT use logging for non-development builds.
#ifdef DEBUG
@@ -44,49 +52,11 @@ -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(N
return YES;
}
--(void)applicationWillResignActive:(UIApplication *)application
-{
- /*
- * Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- * Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
- */
-}
-
--(void)applicationDidEnterBackground:(UIApplication *)application
-{
- /*
- * Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- * If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
- */
-}
-
--(void)applicationWillEnterForeground:(UIApplication *)application
-{
- /*
- * Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
- */
-}
-
--(void)applicationDidBecomeActive:(UIApplication *)application
-{
- /*
- * Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
- */
-}
-
--(void)applicationWillTerminate:(UIApplication *)application
-{
- /*
- * Called when the application is about to terminate.
- * Save data if appropriate.
- * See also applicationDidEnterBackground:.
- */
-}
-
-(void)dealloc
{
[_window release];
[_viewController release];
+
[super dealloc];
}
View
17 samples/S3_Uploader/S3Uploader/S3UploaderViewController.h
@@ -14,11 +14,24 @@
*/
#import <UIKit/UIKit.h>
+#import <AWSiOSSDK/S3/AmazonS3Client.h>
-@interface S3UploaderViewController:UIViewController<UINavigationControllerDelegate, UIImagePickerControllerDelegate> {
+typedef enum {
+ GrandCentralDispatch,
+ Delegate,
+ BackgroundThread
+} UploadType;
+
+@interface S3UploaderViewController:UIViewController<UINavigationControllerDelegate, UIImagePickerControllerDelegate, AmazonServiceRequestDelegate> {
+ UploadType _uploadType;
}
--(IBAction)selectPhoto:(id)sender;
+@property (nonatomic, retain) AmazonS3Client *s3;
+
+-(IBAction)uploadPhotoWithGrandCentralDispatch:(id)sender;
+-(IBAction)uploadPhotoWithDelegate:(id)sender;
+-(IBAction)uploadPhotoWithBackgroundThread:(id)sender;
+
-(IBAction)showInBrowser:(id)sender;
@end
View
268 samples/S3_Uploader/S3Uploader/S3UploaderViewController.m
@@ -14,92 +14,232 @@
*/
#import "S3UploaderViewController.h"
-
#import "Constants.h"
-#import <AWSiOSSDK/S3/AmazonS3Client.h>
@implementation S3UploaderViewController
--(void)viewDidLoad
+@synthesize s3 = _s3;
+
+#pragma mark - View lifecycle
+
+- (void)viewDidLoad
{
- if ( [ACCESS_KEY_ID isEqualToString:@"CHANGE ME"]) {
- [[Constants credentialsAlert] show];
+ [super viewDidLoad];
+
+ self.title = @"S3 Uploader";
+
+ if(![ACCESS_KEY_ID isEqualToString:@"CHANGE ME"]
+ && self.s3 == nil)
+ {
+ // Initial the S3 Client.
+ self.s3 = [[[AmazonS3Client alloc] initWithAccessKey:ACCESS_KEY_ID withSecretKey:SECRET_KEY] autorelease];
+
+ // Create the picture bucket.
+ S3CreateBucketRequest *createBucketRequest = [[[S3CreateBucketRequest alloc] initWithName:[Constants pictureBucket]] autorelease];
+ S3CreateBucketResponse *createBucketResponse = [self.s3 createBucket:createBucketRequest];
+ if(createBucketResponse.error != nil)
+ {
+ NSLog(@"Error: %@", createBucketResponse.error);
+ }
}
}
--(IBAction)selectPhoto:(id)sender
+-(void)viewDidAppear:(BOOL)animated
{
- UIImagePickerController *imagePicker = [[[UIImagePickerController alloc] init] autorelease];
+ [super viewDidAppear:animated];
- imagePicker.delegate = self;
- [self presentModalViewController:imagePicker animated:YES];
+ if ([ACCESS_KEY_ID isEqualToString:@"CHANGE ME"])
+ {
+ [self showAlertMessage:CREDENTIALS_ERROR_MESSAGE withTitle:CREDENTIALS_ERROR_TITLE];
+ }
}
--(IBAction)showInBrowser:(id)sender
+#pragma mark - Grand Central Dispatch
+
+-(IBAction)uploadPhotoWithGrandCentralDispatch:(id)sender
{
- // Initial the S3 Client.
- AmazonS3Client *s3 = [[[AmazonS3Client alloc] initWithAccessKey:ACCESS_KEY_ID withSecretKey:SECRET_KEY] autorelease];
-
- // Set the content type so that the browser will treat the URL as an image.
- S3ResponseHeaderOverrides *override = [[[S3ResponseHeaderOverrides alloc] init] autorelease];
- override.contentType = @"image/jpeg";
+ [self showImagePicker:GrandCentralDispatch];
+}
+
+- (void)processGrandCentralDispatchUpload:(NSData *)imageData
+{
+ dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
+ dispatch_async(queue, ^{
+
+ // Upload image data. Remember to set the content type.
+ S3PutObjectRequest *por = [[[S3PutObjectRequest alloc] initWithKey:PICTURE_NAME
+ inBucket:[Constants pictureBucket]] autorelease];
+ por.contentType = @"image/jpeg";
+ por.data = imageData;
+
+ // Put the image data into the specified s3 bucket and object.
+ S3PutObjectResponse *putObjectResponse = [self.s3 putObject:por];
+
+ dispatch_async(dispatch_get_main_queue(), ^{
+
+ if(putObjectResponse.error != nil)
+ {
+ NSLog(@"Error: %@", putObjectResponse.error);
+ [self showAlertMessage:[putObjectResponse.error.userInfo objectForKey:@"message"] withTitle:@"Upload Error"];
+ }
+ else
+ {
+ [self showAlertMessage:@"The image was successfully uploaded." withTitle:@"Upload Completed"];
+ }
+
+ [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
+ });
+ });
+}
+
+#pragma mark - AmazonServiceRequestDelegate
+
+-(IBAction)uploadPhotoWithDelegate:(id)sender
+{
+ [self showImagePicker:Delegate];
+}
+
+- (void)processDelegateUpload:(NSData *)imageData
+{
+ // Upload image data. Remember to set the content type.
+ S3PutObjectRequest *por = [[[S3PutObjectRequest alloc] initWithKey:PICTURE_NAME
+ inBucket:[Constants pictureBucket]] autorelease];
+ por.contentType = @"image/jpeg";
+ por.data = imageData;
+ por.delegate = self;
+
+ // Put the image data into the specified s3 bucket and object.
+ [self.s3 putObject:por];
+}
+
+-(void)request:(AmazonServiceRequest *)request didCompleteWithResponse:(AmazonServiceResponse *)response
+{
+ [self showAlertMessage:@"The image was successfully uploaded." withTitle:@"Upload Completed"];
- // Request a pre-signed URL to picture that has been uplaoded.
- S3GetPreSignedURLRequest *gpsur = [[[S3GetPreSignedURLRequest alloc] init] autorelease];
- gpsur.key = PICTURE_NAME;
- gpsur.bucket = [Constants pictureBucket];
- gpsur.expires = [NSDate dateWithTimeIntervalSinceNow:(NSTimeInterval) 3600]; // Added an hour's worth of seconds to the current time.
- gpsur.responseHeaderOverrides = override;
+ [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
+}
+
+-(void)request:(AmazonServiceRequest *)request didFailWithError:(NSError *)error
+{
+ NSLog(@"Error: %@", error);
+ [self showAlertMessage:error.description withTitle:@"Upload Error"];
- // Get the URL
- NSError *error;
- NSURL *url = [s3 getPreSignedURL:gpsur error:&error];
+ [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
+}
+
+#pragma mark - Background Thread
+
+-(IBAction)uploadPhotoWithBackgroundThread:(id)sender
+{
+ [self showImagePicker:BackgroundThread];
+}
+
+- (void)processBackgroundThreadUpload:(NSData *)imageData
+{
+ [self performSelectorInBackground:@selector(processBackgroundThreadUploadInBackground:)
+ withObject:imageData];
+}
+
+- (void)processBackgroundThreadUploadInBackground:(NSData *)imageData
+{
+ // Upload image data. Remember to set the content type.
+ S3PutObjectRequest *por = [[[S3PutObjectRequest alloc] initWithKey:PICTURE_NAME
+ inBucket:[Constants pictureBucket]] autorelease];
+ por.contentType = @"image/jpeg";
+ por.data = imageData;
+
+ // Put the image data into the specified s3 bucket and object.
+ S3PutObjectResponse *putObjectResponse = [self.s3 putObject:por];
+ [self performSelectorOnMainThread:@selector(showCheckErrorMessage:)
+ withObject:putObjectResponse.error
+ waitUntilDone:NO];
+}
+
+- (void)showCheckErrorMessage:(NSError *)error
+{
if(error != nil)
{
- [Constants showAlertMessage:[error.userInfo objectForKey:@"message"] withTitle:@"Browser Error"];
+ NSLog(@"Error: %@", error);
+ [self showAlertMessage:[error.userInfo objectForKey:@"message"] withTitle:@"Upload Error"];
}
else
{
- // Display the URL in Safari
- [[UIApplication sharedApplication] openURL:url];
+ [self showAlertMessage:@"The image was successfully uploaded." withTitle:@"Upload Completed"];
}
+
+ [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}
+#pragma mark - Show the image in the browser
+
+-(IBAction)showInBrowser:(id)sender
+{
+ dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
+ dispatch_async(queue, ^{
+
+ // Set the content type so that the browser will treat the URL as an image.
+ S3ResponseHeaderOverrides *override = [[[S3ResponseHeaderOverrides alloc] init] autorelease];
+ override.contentType = @"image/jpeg";
+
+ // Request a pre-signed URL to picture that has been uplaoded.
+ S3GetPreSignedURLRequest *gpsur = [[[S3GetPreSignedURLRequest alloc] init] autorelease];
+ gpsur.key = PICTURE_NAME;
+ gpsur.bucket = [Constants pictureBucket];
+ gpsur.expires = [NSDate dateWithTimeIntervalSinceNow:(NSTimeInterval) 3600]; // Added an hour's worth of seconds to the current time.
+ gpsur.responseHeaderOverrides = override;
+
+ // Get the URL
+ NSError *error;
+ NSURL *url = [self.s3 getPreSignedURL:gpsur error:&error];
+
+ if(url == nil)
+ {
+ if(error != nil)
+ {
+ dispatch_async(dispatch_get_main_queue(), ^{
+
+ NSLog(@"Error: %@", error);
+ [self showAlertMessage:[error.userInfo objectForKey:@"message"] withTitle:@"Browser Error"];
+ });
+ }
+ }
+ else
+ {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ // Display the URL in Safari
+ [[UIApplication sharedApplication] openURL:url];
+ });
+ }
+
+ });
+}
+
+#pragma mark - UIImagePickerControllerDelegate methods
+
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
// Get the selected image.
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
-
+
// Convert the image to JPEG data.
NSData *imageData = UIImageJPEGRepresentation(image, 1.0);
-
- // Initial the S3 Client.
- AmazonS3Client *s3 = [[[AmazonS3Client alloc] initWithAccessKey:ACCESS_KEY_ID withSecretKey:SECRET_KEY] autorelease];
-
- // Create the picture bucket.
- S3CreateBucketResponse *createBucketResponse = [s3 createBucket:[[[S3CreateBucketRequest alloc] initWithName:[Constants pictureBucket]] autorelease]];
- if(createBucketResponse.error != nil)
+
+ if(_uploadType == GrandCentralDispatch)
{
- NSLog(@"Error: %@", createBucketResponse.error);
-
- [Constants showAlertMessage:[createBucketResponse.error.userInfo objectForKey:@"message"] withTitle:@"Upload Error"];
+ [self processGrandCentralDispatchUpload:imageData];
}
-
- // Upload image data. Remember to set the content type.
- S3PutObjectRequest *por = [[[S3PutObjectRequest alloc] initWithKey:PICTURE_NAME inBucket:[Constants pictureBucket]] autorelease];
- por.contentType = @"image/jpeg";
- por.data = imageData;
-
- // Put the image data into the specified s3 bucket and object.
- S3PutObjectResponse *putObjectResponse = [s3 putObject:por];
- if(putObjectResponse.error != nil)
+ else if(_uploadType == Delegate)
{
- NSLog(@"Error: %@", putObjectResponse.error);
-
- [Constants showAlertMessage:[putObjectResponse.error.userInfo objectForKey:@"message"] withTitle:@"Upload Error"];
+ [self processDelegateUpload:imageData];
+ }
+ else if(_uploadType == BackgroundThread)
+ {
+ [self processBackgroundThreadUpload:imageData];
}
+ [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
+
[picker dismissModalViewControllerAnimated:YES];
}
@@ -108,4 +248,28 @@ -(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
[picker dismissModalViewControllerAnimated:YES];
}
-@end
+#pragma mark - Helper Methods
+
+- (void)showImagePicker:(UploadType)uploadType
+{
+ UIImagePickerController *imagePicker = [[[UIImagePickerController alloc] init] autorelease];
+ imagePicker.delegate = self;
+
+ _uploadType = uploadType;
+
+ [self presentModalViewController:imagePicker animated:YES];
+}
+
+- (void)showAlertMessage:(NSString *)message withTitle:(NSString *)title
+{
+ UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:title
+ message:message
+ delegate:nil
+ cancelButtonTitle:@"OK"
+ otherButtonTitles:nil] autorelease];
+ [alertView show];
+}
+
+#pragma mark -
+
+@end
View
318 samples/S3_Uploader/S3Uploader/en.lproj/MainWindow.xib
@@ -1,31 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
- <string key="IBDocument.SystemVersion">10D571</string>
- <string key="IBDocument.InterfaceBuilderVersion">786</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
- <string key="IBDocument.HIToolboxVersion">460.00</string>
+ <int key="IBDocument.SystemTarget">1296</int>
+ <string key="IBDocument.SystemVersion">11E53</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2549</string>
+ <string key="IBDocument.AppKitVersion">1138.47</string>
+ <string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">112</string>
+ <string key="NS.object.0">1498</string>
</object>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="10"/>
+ <string>IBProxyObject</string>
+ <string>IBUICustomObject</string>
+ <string>IBUIWindow</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -40,19 +37,12 @@
<object class="IBUICustomObject" id="664661524">
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
- <object class="IBUIViewController" id="943309135">
- <string key="IBUINibName">S3UploaderViewController</string>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
- <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
- <int key="interfaceOrientation">1</int>
- </object>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <bool key="IBUIHorizontal">NO</bool>
- </object>
<object class="IBUIWindow" id="117978783">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
@@ -77,14 +67,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">viewController</string>
- <reference key="source" ref="664661524"/>
- <reference key="destination" ref="943309135"/>
- </object>
- <int key="connectionID">11</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="664661524"/>
<reference key="destination" ref="117978783"/>
@@ -97,7 +79,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
- <reference key="object" ref="0"/>
+ <object class="NSArray" key="object" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@@ -119,11 +103,6 @@
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">10</int>
- <reference key="object" ref="943309135"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="117978783"/>
<reference key="parent" ref="0"/>
@@ -135,23 +114,19 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
+ <string>-1.IBPluginDependency</string>
<string>-2.CustomClassName</string>
- <string>10.CustomClassName</string>
- <string>10.IBEditorWindowLastContentRect</string>
- <string>10.IBPluginDependency</string>
- <string>12.IBEditorWindowLastContentRect</string>
+ <string>-2.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>3.CustomClassName</string>
<string>3.IBPluginDependency</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>UIResponder</string>
- <string>S3UploaderViewController</string>
- <string>{{234, 376}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>{{525, 346}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>S3UploaderAppDelegate</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -160,17 +135,13 @@
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">15</int>
@@ -179,14 +150,6 @@
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">UIWindow</string>
- <string key="superclassName">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">S3UploaderAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
@@ -196,7 +159,7 @@
<string>viewController</string>
<string>window</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>S3UploaderViewController</string>
<string>UIWindow</string>
@@ -209,7 +172,7 @@
<string>viewController</string>
<string>window</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">viewController</string>
@@ -223,205 +186,47 @@
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
- <string key="minorKey">S3UploaderAppDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">S3UploaderAppDelegate</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
+ <string key="minorKey">./Classes/S3UploaderAppDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">S3UploaderViewController</string>
<string key="superclassName">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">S3UploaderViewController.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="356479594">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIApplication</string>
- <string key="superclassName">UIResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIResponder</string>
- <string key="superclassName">NSObject</string>
- <reference key="sourceIdentifier" ref="356479594"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UISearchBar</string>
- <string key="superclassName">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UISearchDisplayController</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIView</string>
- <string key="superclassName">UIResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>selectPhoto:</string>
+ <string>showInBrowser:</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIViewController</string>
- <string key="superclassName">UIResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>selectPhoto:</string>
+ <string>showInBrowser:</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">selectPhoto:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">showInBrowser:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
</object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">UIWindow</string>
- <string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/S3UploaderViewController.h</string>
</object>
</object>
</object>
@@ -430,15 +235,14 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <real value="1296" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">S3Uploader.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">112</string>
+ <string key="IBCocoaTouchPluginVersion">1498</string>
</data>
</archive>
View
388 samples/S3_Uploader/S3Uploader/en.lproj/S3UploaderViewController.xib
@@ -1,32 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1056</int>
- <string key="IBDocument.SystemVersion">10K540</string>
- <string key="IBDocument.InterfaceBuilderVersion">1306</string>
- <string key="IBDocument.AppKitVersion">1038.36</string>
- <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <int key="IBDocument.SystemTarget">1536</int>
+ <string key="IBDocument.SystemVersion">11E53</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2840</string>
+ <string key="IBDocument.AppKitVersion">1138.47</string>
+ <string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">301</string>
+ <string key="NS.object.0">1926</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>IBProxyObject</string>
<string>IBUIButton</string>
- <string>IBUIView</string>
<string>IBUILabel</string>
- <string>IBProxyObject</string>
+ <string>IBUIView</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <reference key="dict.values" ref="0"/>
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -43,95 +40,242 @@
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUILabel" id="312610082">
+ <object class="IBUIButton" id="987523084">
<reference key="NSNextResponder" ref="774585933"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 20}, {280, 34}}</string>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{20, 97}, {280, 37}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="913850889"/>
<bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
- <int key="IBUIContentMode">7</int>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <string key="IBUIText">S3 Uploader</string>
- <object class="NSFont" key="IBUIFont">
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Grand Central Dispatch</string>
+ <object class="NSColor" key="IBUIHighlightedTitleColor" id="14883705">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor" id="520138826">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="246089927">
+ <string key="name">Helvetica-Bold</string>
+ <string key="family">Helvetica</string>
+ <int key="traits">2</int>
+ <double key="pointSize">15</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="363626780">
<string key="NSName">Helvetica-Bold</string>
- <double key="NSSize">24</double>
+ <double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
- <object class="NSColor" key="IBUITextColor">
+ </object>
+ <object class="IBUIButton" id="148180504">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{20, 337}, {280, 37}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Show the Image in Browser</string>
+ <reference key="IBUIHighlightedTitleColor" ref="14883705"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MCAwIDAAA</bytes>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="520138826"/>
+ <reference key="IBUIFontDescription" ref="246089927"/>
+ <reference key="IBUIFont" ref="363626780"/>
+ </object>
+ <object class="IBUILabel" id="333716710">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{53, 20}, {247, 69}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="987523084"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">5</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">You can upload an image file to the Amazon S3 using one of the following methods:</string>
+ <object class="NSColor" key="IBUITextColor" id="597505116">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC45Njg2Mjc0NTEgMC45Njg2Mjc0NTEgMC45Njg2Mjc0NTEAA</bytes>
+ <string key="IBUIColorCocoaTouchKeyPath">tableCellGroupedBackgroundColor</string>
</object>
<nil key="IBUIHighlightedColor"/>
- <int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
- <int key="IBUITextAlignment">1</int>
+ <int key="IBUINumberOfLines">3</int>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="761824055">
+ <int key="type">1</int>
+ <double key="pointSize">17</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="583997214">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">17</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <double key="preferredMaxLayoutWidth">247</double>
</object>
- <object class="IBUIButton" id="987523084">
+ <object class="IBUILabel" id="77542331">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{20, 20}, {25, 35}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="333716710"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">1.</string>
+ <reference key="IBUITextColor" ref="597505116"/>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">0</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <reference key="IBUIFontDescription" ref="761824055"/>
+ <reference key="IBUIFont" ref="583997214"/>
+ </object>
+ <object class="IBUILabel" id="829402944">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{20, 232}, {280, 22}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="852302402"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">5</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">*** Do not call synchronous AWS requests on the main thread.</string>
+ <reference key="IBUITextColor" ref="597505116"/>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">0</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <reference key="IBUIFontDescription" ref="761824055"/>
+ <reference key="IBUIFont" ref="583997214"/>
+ </object>
+ <object class="IBUIButton" id="913850889">
<reference key="NSNextResponder" ref="774585933"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 62}, {280, 37}}</string>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{20, 142}, {280, 37}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="368584493"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
- <object class="NSFont" key="IBUIFont" id="363626780">
- <string key="NSName">Helvetica-Bold</string>
- <double key="NSSize">15</double>
- <int key="NSfFlags">16</int>
- </object>
<int key="IBUIButtonType">1</int>
- <string key="IBUINormalTitle">Select Picture</string>
- <object class="NSColor" key="IBUIHighlightedTitleColor" id="14883705">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
+ <string key="IBUINormalTitle">Amazon Service Request Delegate</string>
+ <reference key="IBUIHighlightedTitleColor" ref="14883705"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
- <object class="NSColor" key="IBUINormalTitleShadowColor" id="520138826">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
+ <reference key="IBUINormalTitleShadowColor" ref="520138826"/>
+ <reference key="IBUIFontDescription" ref="246089927"/>
+ <reference key="IBUIFont" ref="363626780"/>
</object>
- <object class="IBUIButton" id="148180504">
+ <object class="IBUIButton" id="368584493">
<reference key="NSNextResponder" ref="774585933"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 107}, {280, 37}}</string>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{20, 187}, {280, 37}}</string>
<reference key="NSSuperview" ref="774585933"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="829402944"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
- <reference key="IBUIFont" ref="363626780"/>
<int key="IBUIButtonType">1</int>
- <string key="IBUINormalTitle">Show in Browser</string>
+ <string key="IBUINormalTitle">Background Thread</string>
<reference key="IBUIHighlightedTitleColor" ref="14883705"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<reference key="IBUINormalTitleShadowColor" ref="520138826"/>
+ <reference key="IBUIFontDescription" ref="246089927"/>
+ <reference key="IBUIFont" ref="363626780"/>
+ </object>
+ <object class="IBUILabel" id="188220197">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{53, 277}, {247, 52}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="148180504"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">5</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">You can see the image that you have uploaded in the browser:</string>
+ <reference key="IBUITextColor" ref="597505116"/>
+ <nil key="IBUIHighlightedColor"/>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUINumberOfLines">3</int>
+ <reference key="IBUIFontDescription" ref="761824055"/>
+ <reference key="IBUIFont" ref="583997214"/>
+ <double key="preferredMaxLayoutWidth">247</double>
+ </object>
+ <object class="IBUILabel" id="852302402">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">319</int>
+ <string key="NSFrame">{{20, 277}, {25, 35}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="188220197"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">2.</string>
+ <reference key="IBUITextColor" ref="597505116"/>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">0</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <reference key="IBUIFontDescription" ref="761824055"/>
+ <reference key="IBUIFont" ref="583997214"/>
</object>
</object>
- <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <string key="NSFrame">{{0, 64}, {320, 416}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="77542331"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC43NQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace">
- <int key="NSID">2</int>
- </object>
+ <bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+ <int key="IBUIStatusBarStyle">2</int>
+ </object>
+ <object class="IBUISimulatedNavigationBarMetrics" key="IBUISimulatedTopBarMetrics">
+ <bool key="IBUIPrompted">NO</bool>
+ </object>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
@@ -148,21 +292,39 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">selectPhoto:</string>
+ <string key="label">showInBrowser:</string>
+ <reference key="source" ref="148180504"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">20</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">uploadPhotoWithGrandCentralDispatch:</string>
<reference key="source" ref="987523084"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
- <int key="connectionID">19</int>
+ <int key="connectionID">26</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
- <string key="label">showInBrowser:</string>
- <reference key="source" ref="148180504"/>
+ <string key="label">uploadPhotoWithDelegate:</string>
+ <reference key="source" ref="913850889"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
- <int key="connectionID">20</int>
+ <int key="connectionID">27</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">uploadPhotoWithBackgroundThread:</string>
+ <reference key="source" ref="368584493"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">30</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -170,7 +332,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
- <reference key="object" ref="0"/>
+ <object class="NSArray" key="object" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@@ -190,18 +354,19 @@
<reference key="object" ref="774585933"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="312610082"/>
<reference ref="987523084"/>
+ <reference ref="913850889"/>
+ <reference ref="368584493"/>
+ <reference ref="829402944"/>
+ <reference ref="333716710"/>
+ <reference ref="77542331"/>
<reference ref="148180504"/>
+ <reference ref="188220197"/>
+ <reference ref="852302402"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">8</int>
- <reference key="object" ref="312610082"/>
- <reference key="parent" ref="774585933"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">13</int>
<reference key="object" ref="148180504"/>
<reference key="parent" ref="774585933"/>
@@ -211,6 +376,41 @@
<reference key="object" ref="987523084"/>
<reference key="parent" ref="774585933"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">21</int>
+ <reference key="object" ref="333716710"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">22</int>
+ <reference key="object" ref="913850889"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">24</int>
+ <reference key="object" ref="368584493"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">28</int>
+ <reference key="object" ref="188220197"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">29</int>
+ <reference key="object" ref="829402944"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">31</int>
+ <reference key="object" ref="77542331"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">32</int>
+ <reference key="object" ref="852302402"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -218,20 +418,34 @@
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
+ <string>-1.IBPluginDependency</string>
<string>-2.CustomClassName</string>
+ <string>-2.IBPluginDependency</string>
<string>13.IBPluginDependency</string>
<string>16.IBPluginDependency</string>
- <string>6.IBEditorWindowLastContentRect</string>
+ <string>21.IBPluginDependency</string>
+ <string>22.IBPluginDependency</string>
+ <string>24.IBPluginDependency</string>
+ <string>28.IBPluginDependency</string>
+ <string>29.IBPluginDependency</string>
+ <string>31.IBPluginDependency</string>
+ <string>32.IBPluginDependency</string>
<string>6.IBPluginDependency</string>
- <string>8.IBPluginDependency</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>S3UploaderViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>UIResponder</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string>{{239, 654}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
@@ -248,7 +462,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">20</int>
+ <int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -260,30 +474,44 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>selectPhoto:</string>
<string>showInBrowser:</string>
+ <string>uploadPhotoWithBackgroundThread:</string>
+ <string>uploadPhotoWithDelegate:</string>
+ <string>uploadPhotoWithGrandCentralDispatch:</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
+ <string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>selectPhoto:</string>
<string>showInBrowser:</string>
+ <string>uploadPhotoWithBackgroundThread:</string>
+ <string>uploadPhotoWithDelegate:</string>
+ <string>uploadPhotoWithGrandCentralDispatch:</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
- <string key="name">selectPhoto:</string>
+ <string key="name">showInBrowser:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
- <string key="name">showInBrowser:</string>
+ <string key="name">uploadPhotoWithBackgroundThread:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">uploadPhotoWithDelegate:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">uploadPhotoWithGrandCentralDispatch:</string>
<string key="candidateClassName">id</string>
</object>
</object>
@@ -297,12 +525,16 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <real value="1536" key="NS.object.0"/>
+ </object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
<integer value="3100" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">301</string>
+ <string key="IBCocoaTouchPluginVersion">1926</string>
</data>
</archive>
View
21 samples/S3_Uploader/S3Uploader/main.m
@@ -1,10 +1,17 @@
-//
-// main.m
-// S3Uploader
-//
-// Created by Dierkes, Glenn on 9/13/11.
-// Copyright 2011 __MyCompanyName__. All rights reserved.
-//
+/*
+ * Copyright 2010-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
#import <UIKit/UIKit.h>
View
32 src/AWSiOSSDK.xcodeproj/project.pbxproj
@@ -12501,6 +12501,7 @@
0AFD8DD8128465B4004B7863 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DEBUG = YES;
GCC_DYNAMIC_NO_PIC = NO;
@@ -12512,6 +12513,7 @@
0AFD8DD9128465B4004B7863 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = YES;
DEBUG = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -12524,14 +12526,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
- "ARCHS[sdk=*]" = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "ARCHS[sdk=*]" = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DOXYGEN_PATH = /Applications/Doxygen.app/Contents/Resources/doxygen;
DSTROOT = /tmp/s3.dst;
@@ -12546,13 +12542,13 @@
GCC_PREFIX_HEADER = AWSiOSSDK_Prefix.pch;
GCC_THUMB_SUPPORT = NO;
INSTALL_PATH = /usr/local/lib;
- IPHONEOS_DEPLOYMENT_TARGET = 4.1;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = AWSiOSSDK;
- SDKROOT = iphoneos;
+ SDKROOT = iphoneos6.0;
};
name = Debug;
};
@@ -12560,14 +12556,8 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
- "ARCHS[sdk=*]" = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "ARCHS[sdk=*]" = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/s3.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -12582,13 +12572,13 @@
ThirdParty,
);
INSTALL_PATH = /usr/local/lib;
- IPHONEOS_DEPLOYMENT_TARGET = 4.1;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = AWSiOSSDK;
- SDKROOT = iphoneos;
+ SDKROOT = iphoneos6.0;
};
name = Release;
};
@@ -12604,6 +12594,7 @@
ThirdParty,
"include/**",
);
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "-ObjC";
SDKROOT = iphoneos;
@@ -12621,6 +12612,7 @@
ThirdParty,
"include/**",
);
+ IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "-ObjC";
SDKROOT = iphoneos;
View
2  src/Amazon.AutoScaling/Model/AutoScalingCreateAutoScalingGroupResponse.m
@@ -28,10 +28,12 @@ -(void)setException:(AmazonServiceException *)theException
AmazonServiceException *newException = nil;
if ([[theException errorCode] isEqualToString:@"LimitExceeded"]) {
+ [newException release];
newException = [[AutoScalingLimitExceededException alloc] initWithMessage:@""];
}
if ([[theException errorCode] isEqualToString:@"AlreadyExists"]) {
+ [newException release];
newException = [[AutoScalingAlreadyExistsException alloc] initWithMessage:@""];
}
View
2  src/Amazon.AutoScaling/Model/AutoScalingCreateLaunchConfigurationResponse.m
@@ -28,10 +28,12 @@ -(void)setException:(AmazonServiceException *)theException
AmazonServiceException *newException = nil;
if ([[theException errorCode] isEqualToString:@"LimitExceeded"]) {
+ [newException release];
newException = [[AutoScalingLimitExceededException alloc] initWithMessage:@""];
}
if ([[theException errorCode] isEqualToString:@"AlreadyExists"]) {
+ [newException release];
newException = [[AutoScalingAlreadyExistsException alloc] initWithMessage:@""];
}
View
2  src/Amazon.AutoScaling/Model/AutoScalingCreateOrUpdateTagsResponse.m
@@ -28,10 +28,12 @@ -(void)setException:(AmazonServiceException *)theException
AmazonServiceException *newException = nil;
if ([[theException errorCode] isEqualToString:@"LimitExceeded"]) {
+ [newException release];
newException = [[AutoScalingLimitExceededException alloc] initWithMessage:@""];
}
if ([[theException errorCode] isEqualToString:@"AlreadyExists"]) {
+ [newException release];
newException = [[AutoScalingAlreadyExistsException alloc] initWithMessage:@""];
}
View
2  src/Amazon.AutoScaling/Model/AutoScalingDeleteAutoScalingGroupResponse.m
@@ -28,10 +28,12 @@ -(void)setException:(AmazonServiceException *)theException
AmazonServiceException *newException = nil;
if ([[theException errorCode] isEqualToString:@"ResourceInUse"]) {
+ [newException release];
newException = [[AutoScalingResourceInUseException alloc] initWithMessage:@""];
}
if ([[theException errorCode] isEqualToString:@"ScalingActivityInProgress"]) {
+ [newException release];