r80392 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80391‎ | r80392 | r80393 >
Date:12:37, 15 January 2011
Author:hartman
Status:deferred
Tags:
Comment:
Make it possible to set title and description.
Modified paths:
  • /trunk/tools/Snap-to-Commons/Classes/CommonsUpload.h (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/CommonsUpload.m (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/Configuration.h (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.h (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.m (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.xib (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/PhotoPickerAppDelegate.h (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/PhotoPickerAppDelegate.m (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/PhotoPickerViewController.h (modified) (history)
  • /trunk/tools/Snap-to-Commons/Classes/PhotoPickerViewController.m (modified) (history)
  • /trunk/tools/Snap-to-Commons/PhotoPickerViewController.xib (modified) (history)
  • /trunk/tools/Snap-to-Commons/SettingsViewController.m (modified) (history)
  • /trunk/tools/Snap-to-Commons/SettingsViewController.xib (modified) (history)

Diff [purge]

Index: trunk/tools/Snap-to-Commons/SettingsViewController.xib
@@ -129,9 +129,36 @@
130130 <string key="NSFrameSize">{320, 416}</string>
131131 <reference key="NSSuperview"/>
132132 <object class="NSColor" key="IBUIBackgroundColor">
133 - <int key="NSColorSpace">3</int>
134 - <bytes key="NSWhite">MQA</bytes>
135 - <reference key="NSCustomColorSpace" ref="437644164"/>
 133+ <int key="NSColorSpace">10</int>
 134+ <object class="NSImage" key="NSImage">
 135+ <int key="NSImageFlags">549453824</int>
 136+ <string key="NSSize">{84, 1}</string>
 137+ <object class="NSMutableArray" key="NSReps">
 138+ <bool key="EncodedWithXMLCoder">YES</bool>
 139+ <object class="NSArray">
 140+ <bool key="EncodedWithXMLCoder">YES</bool>
 141+ <integer value="0"/>
 142+ <object class="NSBitmapImageRep">
 143+ <object class="NSData" key="NSTIFFRepresentation">
 144+ <bytes key="NS.bytes">TU0AKgAAAVjFzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/
 145+y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/
 146+xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/
 147+xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/
 148+xczU/8XM1P/FzNL/y9LY/8vS2P/FzNT/xczU/8XM1P/FzNT/xczS/8vS2P/L0tj/xczU/8XM1P/FzNT/
 149+xczU/8XM0v/L0tj/y9LY/8XM1P/FzNT/xczU/8XM1P/FzNL/y9LY/8vS2P8ADQEAAAMAAAABAFQAAAEB
 150+AAMAAAABAAEAAAECAAMAAAAEAAAB+gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAERAAQAAAABAAAACAES
 151+AAMAAAABAAEAAAEVAAMAAAABAAQAAAEWAAMAAAABAAEAAAEXAAQAAAABAAABUAEcAAMAAAABAAEAAAFS
 152+AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
 153+ </object>
 154+ </object>
 155+ </object>
 156+ </object>
 157+ <object class="NSColor" key="NSColor">
 158+ <int key="NSColorSpace">3</int>
 159+ <bytes key="NSWhite">MCAwAA</bytes>
 160+ </object>
 161+ </object>
 162+ <string key="IBUIColorCocoaTouchKeyPath">groupTableViewBackgroundColor</string>
136163 </object>
137164 <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
138165 <object class="IBUISimulatedNavigationBarMetrics" key="IBUISimulatedTopBarMetrics">
Index: trunk/tools/Snap-to-Commons/SettingsViewController.m
@@ -58,6 +58,9 @@
5959
6060
6161 - (void)dealloc {
 62+ [username release];
 63+ [password release];
 64+ [save release];
6265 [super dealloc];
6366 }
6467
Index: trunk/tools/Snap-to-Commons/Classes/PhotoPickerViewController.m
@@ -9,31 +9,26 @@
1010 #import "NSData+PhotoPicker.h"
1111 #import "PhotoPickerAppDelegate.h"
1212 #import "UIImage+PhotoPicker.h"
 13+#import "CommonsUpload.h"
 14+#import "ImageDetailsViewController.h"
1315
1416 static int kPhotoPickerViewControllerSourceIndexCamera = 0;
1517 static int kPhotoPickerViewControllerSourceIndexPhotoLibrary = 1;
 18+static int kPhotoPickerViewControllerSettings = 2;
1619
1720
1821 @interface PhotoPickerViewController ()
19 - @property (nonatomic, retain) NSURLConnection *connection;
2022 @property (nonatomic, retain) NSData *imageData;
21 - @property (nonatomic, retain) NSHTTPURLResponse *response;
22 - @property (nonatomic, retain) NSMutableData *responseData;
2323 - (void)cancelApp;
2424 - (void)pickPhoto:(UIImagePickerControllerSourceType)sourceType;
2525 - (void)showPhotoSourceMenu;
2626 - (void)showPhotoSourceMenuOrPhotoSourceDirectly;
27 - - (void)uploadImage;
2827 @end
2928
3029
3130 @implementation PhotoPickerViewController
3231
33 -
34 -@synthesize connection;
3532 @synthesize imageData;
36 -@synthesize response;
37 -@synthesize responseData;
3833
3934
4035 #pragma mark UIActionSheetDelegate Methods
@@ -50,7 +45,9 @@
5146 [self onCameraClicked];
5247 } else if (buttonIndex == kPhotoPickerViewControllerSourceIndexPhotoLibrary) {
5348 [self onPhotoLibraryClicked];
54 - }
 49+ } else if (buttonIndex == kPhotoPickerViewControllerSettings) {
 50+ [self onSettingsClicked];
 51+ }
5552 }
5653
5754
@@ -68,18 +65,26 @@
6966
7067 image = [image correctOrientation:image];
7168
72 - self.imageData = UIImageJPEGRepresentation(image, 0.85f);
 69+ CommonsUpload *ourUpload = [[CommonsUpload alloc] init];
 70+ ourUpload.imageData = UIImageJPEGRepresentation(image, 0.85f);
7371
74 - uploadOverlayImage.image = image;
75 - uploadProgressMessage.text = @"uploading";
76 - uploadProgress.progress = 0.0f;
 72+ //uploadOverlayImage.image = image;
 73+ //uploadProgressMessage.text = @"uploading";
 74+ //uploadProgress.progress = 0.0f;
7775
78 - uploadPhotoOverlay.frame = CGRectMake(0, 20, 320, 460);
79 - [[UIApplication sharedApplication].keyWindow addSubview:uploadPhotoOverlay];
 76+ //uploadPhotoOverlay.frame = CGRectMake(0, 20, 320, 460);
 77+ //[[UIApplication sharedApplication].keyWindow addSubview:uploadPhotoOverlay];
 78+
 79+ ImageDetailsViewController *detailsController = [[ImageDetailsViewController alloc] init];
 80+
 81+ detailsController.upload = ourUpload;
 82+ [ourUpload release];
8083
81 - [self uploadImage];
82 -
83 - [picker.view removeFromSuperview];
 84+ //to push the UIView.
 85+ [self.navigationController pushViewController:detailsController animated:YES];
 86+ [detailsController release];
 87+
 88+ [picker.view removeFromSuperview];
8489 [picker release];
8590 }
8691
@@ -108,6 +113,8 @@
109114
110115
111116 - (void)viewDidLoad {
 117+ [super viewDidLoad];
 118+
112119 #ifdef FORCE_ENABLE_CAMERA
113120 cameraAvailable = YES;
114121 fakeCameraAvailable = ![UIImagePickerController
@@ -132,79 +139,6 @@
133140 #endif
134141 }
135142
136 -
137 -#pragma mark URL Connection Event Handlers
138 -
139 -
140 -// Final event, memory is cleaned up at the end of this.
141 -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
142 - self.connection = nil;
143 - self.response = nil;
144 -
145 - uploadProgress.progress = 0.0f;
146 - uploadProgressMessage.text = @"An error occurred, retrying in 10 seconds...";
147 -
148 - retryCounter = 10;
149 - [self performSelector:@selector(retry) withObject:nil afterDelay:1.0f];
150 -}
151 -
152 -
153 -// Final event, memory is cleaned up at the end of this.
154 -- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
155 - self.connection = nil;
156 -
157 - if ([self.response statusCode] == 200) {
158 - uploadProgress.progress = 1.0f;
159 -
160 - NSString *responseString = [[[NSString alloc] initWithBytes:[self.responseData bytes]
161 - length:[self.responseData length]
162 - encoding:NSUTF8StringEncoding] autorelease];
163 - responseString =
164 - [responseString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
165 -
166 - NSString *successContinueUrl = CONTINUE_URL;
167 -
168 - successContinueUrl =
169 - [successContinueUrl stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
170 -
171 - BOOL hasQuestionMark = [successContinueUrl rangeOfString:@"?"].location != NSNotFound;
172 -
173 - successContinueUrl =
174 - [successContinueUrl stringByAppendingString:hasQuestionMark ? @"&" : @"?"];
175 - successContinueUrl = [successContinueUrl stringByAppendingFormat:@"success=1&response=%@",
176 - responseString];
177 -
178 - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:successContinueUrl]];
179 - } else {
180 - uploadProgress.progress = 0.0f;
181 - uploadProgressMessage.text = @"An error occurred, retrying in 10 seconds...";
182 -
183 - retryCounter = 10;
184 - [self performSelector:@selector(retry) withObject:nil afterDelay:1.0f];
185 - }
186 -
187 - self.response = nil;
188 -}
189 -
190 -
191 -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)newData {
192 - [responseData appendData:newData];
193 -}
194 -
195 -
196 -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)newResponse {
197 - self.response = (NSHTTPURLResponse *) newResponse;
198 -}
199 -
200 -
201 -- (void)connection:(NSURLConnection *)connection
202 - didSendBodyData:(NSInteger)bytesWritten
203 - totalBytesWritten:(NSInteger)totalBytesWritten
204 - totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite {
205 - uploadProgress.progress = (float) totalBytesWritten / totalBytesExpectedToWrite;
206 -}
207 -
208 -
209143 #pragma mark Public
210144
211145
@@ -212,18 +146,20 @@
213147 [self pickPhoto:UIImagePickerControllerSourceTypeCamera];
214148 }
215149
 150+- (IBAction)onPhotoLibraryClicked {
 151+ [self pickPhoto:UIImagePickerControllerSourceTypePhotoLibrary];
 152+}
216153
217 -- (IBAction)onCancelUploadClicked {
218 - [self.connection cancel];
219 - self.connection = nil;
 154+- (IBAction)onSettingsClicked {
 155+ [self.navigationController popToRootViewControllerAnimated:YES];
 156+}
220157
 158+- (IBAction)onCancelUploadClicked {
 159+/*
221160 [NSObject cancelPreviousPerformRequestsWithTarget:self
222 - selector:@selector(retry)
223 - object:nil];
224 - [NSObject cancelPreviousPerformRequestsWithTarget:self
225161 selector:@selector(uploadImage)
226162 object:nil];
227 -
 163+*/
228164 [uploadPhotoOverlay removeFromSuperview];
229165
230166 [self showPhotoSourceMenuOrPhotoSourceDirectly];
@@ -235,27 +171,13 @@
236172 }
237173
238174
239 -- (IBAction)onPhotoLibraryClicked {
240 - [self pickPhoto:UIImagePickerControllerSourceTypePhotoLibrary];
241 -}
242175
243176
244177 #pragma mark Private
245178
246179
247180 - (void)cancelApp {
248 - NSString *cancelContinueUrl = CONTINUE_URL;
249 -
250 - cancelContinueUrl =
251 - [cancelContinueUrl stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
252 -
253 - BOOL hasQuestionMark = [cancelContinueUrl rangeOfString:@"?"].location != NSNotFound;
254 -
255 - cancelContinueUrl =
256 - [cancelContinueUrl stringByAppendingString:hasQuestionMark ? @"&" : @"?"];
257 - cancelContinueUrl = [cancelContinueUrl stringByAppendingString:@"success=0"];
258 -
259 - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:cancelContinueUrl]];
 181+ [self.navigationController popToRootViewControllerAnimated:YES];
260182 }
261183
262184
@@ -279,22 +201,6 @@
280202 }
281203
282204
283 -- (void)retry {
284 - retryCounter--;
285 -
286 - if (retryCounter <= 0) {
287 - [self uploadImage];
288 - } else {
289 - uploadProgressMessage.text =
290 - [NSString stringWithFormat:@"An error occurred, retrying in %d second%@...",
291 - retryCounter,
292 - retryCounter != 1 ? @"s" : @""];
293 -
294 - [self performSelector:@selector(retry) withObject:nil afterDelay:1.0f];
295 - }
296 -}
297 -
298 -
299205 - (void)showPhotoSourceMenu {
300206 if (cameraAvailable) {
301207 photoSourceActionSheet = [[UIActionSheet alloc]
@@ -302,24 +208,27 @@
303209 delegate:self
304210 cancelButtonTitle:@"Cancel"
305211 destructiveButtonTitle:nil
306 - otherButtonTitles:@"Camera", @"Photo Library", nil];
 212+ otherButtonTitles:@"Camera", @"Photo Library", @"Settings", nil];
307213 kPhotoPickerViewControllerSourceIndexCamera = 0;
308214 kPhotoPickerViewControllerSourceIndexPhotoLibrary = 1;
 215+ kPhotoPickerViewControllerSettings = 2;
309216 } else {
310217 photoSourceActionSheet = [[UIActionSheet alloc]
311218 initWithTitle:nil
312219 delegate:self
313220 cancelButtonTitle:@"Cancel"
314221 destructiveButtonTitle:nil
315 - otherButtonTitles:@"Choose Photo", nil];
 222+ otherButtonTitles:@"Choose Photo", @"Settings", nil];
316223 kPhotoPickerViewControllerSourceIndexCamera = -99;
317224 kPhotoPickerViewControllerSourceIndexPhotoLibrary = 0;
 225+ kPhotoPickerViewControllerSettings = 1;
318226 }
319227 photoSourceActionSheet.actionSheetStyle = UIBarStyleDefault;
320228
321229 UIImage *backgroundImage = [UIImage imageNamed:@"home-background.png"];
322230 UIView *background = [[UIImageView alloc] initWithImage:backgroundImage];
323231 background.frame = CGRectMake(0, cameraAvailable ? -253 : -320, 320, 460);
 232+
324233 [photoSourceActionSheet insertSubview:background atIndex:0];
325234
326235 [photoSourceActionSheet showInView:self.view];
Index: trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.m
@@ -13,6 +13,7 @@
1414
1515 @synthesize titleField;
1616 @synthesize descriptionText;
 17+@synthesize upload;
1718
1819 // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
1920 /*
@@ -25,13 +26,14 @@
2627 }
2728 */
2829
29 -/*
 30+
3031 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
3132 - (void)viewDidLoad {
3233 [super viewDidLoad];
 34+ self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle: @"Upload" style: UIBarButtonItemStyleDone target: self action: @selector( doUpload: ) ];
3335 }
34 -*/
3536
 37+
3638 /*
3739 // Override to allow orientations other than the default portrait orientation.
3840 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -55,6 +57,9 @@
5658
5759
5860 - (void)dealloc {
 61+ [titleField release];
 62+ [descriptionText release];
 63+ [upload release];
5964 [super dealloc];
6065 }
6166
@@ -66,6 +71,40 @@
6772 [sender resignFirstResponder];
6873 }
6974
 75+- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range
 76+ replacementText:(NSString *)text
 77+{
 78+ return YES;
 79+}
7080
 81+- (void)doUpload:(id)sender {
 82+ upload.title = [NSString stringWithFormat: @"%@.jpg", titleField.text];
 83+ upload.description = descriptionText.text;
 84+ [descriptionText resignFirstResponder];
 85+ upload.delegate = self;
 86+
 87+ [upload uploadImage];
 88+}
7189
 90+- (void)uploadSucceeded {
 91+ UIAlertView *alert =
 92+ [[UIAlertView alloc] initWithTitle: @"Upload succeeded"
 93+ message: nil
 94+ delegate: self
 95+ cancelButtonTitle: @"Show upload"
 96+ otherButtonTitles: nil];
 97+ [alert show];
 98+ [alert release];
 99+}
 100+
 101+- (void)uploadFailed:(NSString *)error {
 102+ NSLog(error);
 103+ [self.navigationController popToRootViewControllerAnimated:YES];
 104+}
 105+
 106+- (void) alertView: (UIAlertView *) alertView clickedButtonAtIndex: (NSInteger) buttonIndex {
 107+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString: [NSString stringWithFormat:@"http://commons.wikimedia.org/wiki/File:%@", [upload.title stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];
 108+ //[self.navigationController popToRootViewControllerAnimated:YES];
 109+} // clickedButtonAtIndex
 110+
72111 @end
Index: trunk/tools/Snap-to-Commons/Classes/Configuration.h
@@ -17,5 +17,5 @@
1818
1919 // Constants
2020 #define API_URL @"http://commons.wikimedia.org/w/api.php"
21 -#define DEFAULT_LICENSE @"{{cc-by-sa-3.0}}"
 21+#define DEFAULT_LICENSE @"{{self|cc-by-sa-3.0}}"
2222 #define APPLICATION_CATEGORY @"Images uploaded with WikiSnaps"
\ No newline at end of file
Index: trunk/tools/Snap-to-Commons/Classes/CommonsUpload.h
@@ -19,7 +19,7 @@
2020
2121
2222 @interface CommonsUpload : NSObject {
23 - UIImage *imageData;
 23+ NSData *imageData;
2424 NSString *title;
2525 NSString *description;
2626 NSString *token;
@@ -28,7 +28,7 @@
2929 id <CommonsUploadDelegate> delegate;
3030 }
3131
32 -@property (nonatomic, retain) UIImage *imageData;
 32+@property (nonatomic, retain) NSData *imageData;
3333 @property (nonatomic, retain) NSString *title;
3434 @property (nonatomic, retain) NSString *description;
3535 @property (nonatomic, assign) id <CommonsUploadDelegate> delegate;
Index: trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.xib
@@ -70,7 +70,7 @@
7171 <object class="IBUITextView" id="786444300">
7272 <reference key="NSNextResponder" ref="191373211"/>
7373 <int key="NSvFlags">292</int>
74 - <string key="NSFrame">{{20, 59}, {280, 155}}</string>
 74+ <string key="NSFrame">{{20, 84}, {280, 142}}</string>
7575 <reference key="NSSuperview" ref="191373211"/>
7676 <object class="NSColor" key="IBUIBackgroundColor">
7777 <int key="NSColorSpace">1</int>
@@ -79,13 +79,35 @@
8080 <bool key="IBUIClipsSubviews">YES</bool>
8181 <bool key="IBUIMultipleTouchEnabled">YES</bool>
8282 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
83 - <string key="IBUIText">Description</string>
 83+ <string key="IBUIText"/>
8484 <object class="IBUITextInputTraits" key="IBUITextInputTraits">
8585 <int key="IBUIAutocapitalizationType">2</int>
8686 <int key="IBUIAutocorrectionType">2</int>
8787 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
8888 </object>
8989 </object>
 90+ <object class="IBUILabel" id="995657542">
 91+ <reference key="NSNextResponder" ref="191373211"/>
 92+ <int key="NSvFlags">292</int>
 93+ <string key="NSFrame">{{20, 59}, {86, 21}}</string>
 94+ <reference key="NSSuperview" ref="191373211"/>
 95+ <bool key="IBUIOpaque">NO</bool>
 96+ <bool key="IBUIClipsSubviews">YES</bool>
 97+ <int key="IBUIContentMode">7</int>
 98+ <bool key="IBUIUserInteractionEnabled">NO</bool>
 99+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 100+ <string key="IBUIText">Description</string>
 101+ <object class="NSColor" key="IBUITextColor">
 102+ <int key="NSColorSpace">1</int>
 103+ <bytes key="NSRGB">MCAwIDAAA</bytes>
 104+ </object>
 105+ <object class="NSColor" key="IBUIHighlightedColor">
 106+ <int key="NSColorSpace">3</int>
 107+ <bytes key="NSWhite">MQA</bytes>
 108+ </object>
 109+ <int key="IBUIBaselineAdjustment">1</int>
 110+ <float key="IBUIMinimumFontSize">10</float>
 111+ </object>
90112 </object>
91113 <string key="NSFrameSize">{320, 416}</string>
92114 <reference key="NSSuperview"/>
@@ -197,6 +219,7 @@
198220 <bool key="EncodedWithXMLCoder">YES</bool>
199221 <reference ref="717110592"/>
200222 <reference ref="786444300"/>
 223+ <reference ref="995657542"/>
201224 </object>
202225 <reference key="parent" ref="0"/>
203226 </object>
@@ -221,6 +244,11 @@
222245 <reference key="object" ref="786444300"/>
223246 <reference key="parent" ref="191373211"/>
224247 </object>
 248+ <object class="IBObjectRecord">
 249+ <int key="objectID">15</int>
 250+ <reference key="object" ref="995657542"/>
 251+ <reference key="parent" ref="191373211"/>
 252+ </object>
225253 </object>
226254 </object>
227255 <object class="NSMutableDictionary" key="flattenedProperties">
@@ -231,8 +259,11 @@
232260 <string>-2.CustomClassName</string>
233261 <string>1.IBEditorWindowLastContentRect</string>
234262 <string>1.IBPluginDependency</string>
 263+ <string>15.IBPluginDependency</string>
 264+ <string>15.IBViewBoundsToFrameTransform</string>
235265 <string>4.IBPluginDependency</string>
236266 <string>5.IBPluginDependency</string>
 267+ <string>5.IBViewBoundsToFrameTransform</string>
237268 </object>
238269 <object class="NSMutableArray" key="dict.values">
239270 <bool key="EncodedWithXMLCoder">YES</bool>
@@ -241,7 +272,14 @@
242273 <string>{{791, 124}, {320, 480}}</string>
243274 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
244275 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 276+ <object class="NSAffineTransform">
 277+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAwpQAAA</bytes>
 278+ </object>
245279 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 280+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 281+ <object class="NSAffineTransform">
 282+ <bytes key="NSTransformStruct">P4AAAL+AAABBoAAAw0cAAA</bytes>
 283+ </object>
246284 </object>
247285 </object>
248286 <object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -260,7 +298,7 @@
261299 </object>
262300 </object>
263301 <nil key="sourceID"/>
264 - <int key="maxID">14</int>
 302+ <int key="maxID">15</int>
265303 </object>
266304 <object class="IBClassDescriber" key="IBDocument.Classes">
267305 <object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -269,15 +307,36 @@
270308 <string key="className">ImageDetailsViewController</string>
271309 <string key="superclassName">UIViewController</string>
272310 <object class="NSMutableDictionary" key="actions">
273 - <string key="NS.key.0">textFieldDidEnd:</string>
274 - <string key="NS.object.0">id</string>
 311+ <bool key="EncodedWithXMLCoder">YES</bool>
 312+ <object class="NSArray" key="dict.sortedKeys">
 313+ <bool key="EncodedWithXMLCoder">YES</bool>
 314+ <string>doUpload:</string>
 315+ <string>textFieldDidEnd:</string>
 316+ </object>
 317+ <object class="NSMutableArray" key="dict.values">
 318+ <bool key="EncodedWithXMLCoder">YES</bool>
 319+ <string>id</string>
 320+ <string>id</string>
 321+ </object>
275322 </object>
276323 <object class="NSMutableDictionary" key="actionInfosByName">
277 - <string key="NS.key.0">textFieldDidEnd:</string>
278 - <object class="IBActionInfo" key="NS.object.0">
279 - <string key="name">textFieldDidEnd:</string>
280 - <string key="candidateClassName">id</string>
 324+ <bool key="EncodedWithXMLCoder">YES</bool>
 325+ <object class="NSArray" key="dict.sortedKeys">
 326+ <bool key="EncodedWithXMLCoder">YES</bool>
 327+ <string>doUpload:</string>
 328+ <string>textFieldDidEnd:</string>
281329 </object>
 330+ <object class="NSMutableArray" key="dict.values">
 331+ <bool key="EncodedWithXMLCoder">YES</bool>
 332+ <object class="IBActionInfo">
 333+ <string key="name">doUpload:</string>
 334+ <string key="candidateClassName">id</string>
 335+ </object>
 336+ <object class="IBActionInfo">
 337+ <string key="name">textFieldDidEnd:</string>
 338+ <string key="candidateClassName">id</string>
 339+ </object>
 340+ </object>
282341 </object>
283342 <object class="NSMutableDictionary" key="outlets">
284343 <bool key="EncodedWithXMLCoder">YES</bool>
@@ -419,6 +478,14 @@
420479 </object>
421480 </object>
422481 <object class="IBPartialClassDescription">
 482+ <string key="className">UILabel</string>
 483+ <string key="superclassName">UIView</string>
 484+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
 485+ <string key="majorKey">IBFrameworkSource</string>
 486+ <string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
 487+ </object>
 488+ </object>
 489+ <object class="IBPartialClassDescription">
423490 <string key="className">UIResponder</string>
424491 <string key="superclassName">NSObject</string>
425492 <reference key="sourceIdentifier" ref="240916425"/>
Index: trunk/tools/Snap-to-Commons/Classes/PhotoPickerAppDelegate.h
@@ -15,7 +15,6 @@
1616 @interface PhotoPickerAppDelegate : NSObject <UIApplicationDelegate> {
1717 int defaultImageSource;
1818 BOOL justInstalled;
19 - BOOL launchedAsUrlHandler;
2019 NSString *postContext;
2120 UIWindow *window;
2221 PhotoPickerViewController *viewController;
@@ -28,7 +27,6 @@
2928 // the first time they run the app.
3029 @property (nonatomic, assign) BOOL justInstalled;
3130
32 -@property (nonatomic, assign) BOOL launchedAsUrlHandler;
3331 @property (nonatomic, retain) NSString *postContext;
3432 @property (nonatomic, retain) IBOutlet PhotoPickerViewController *viewController;
3533 @property (nonatomic, retain) IBOutlet UINavigationController *navController;
Index: trunk/tools/Snap-to-Commons/Classes/CommonsUpload.m
@@ -20,14 +20,16 @@
2121 }
2222
2323 - (NSString *)getUploadDescription {
24 - NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
25 - [formatter setDateFormat:@"%Y-%m-%d"];
26 - NSString *date = [formatter stringFromDate:[NSDate date] ];
 24+ NSDate *today = [NSDate date];
 25+ NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
 26+ [formatter setDateFormat:@"yyyy-MM-dd"];
 27+ NSString *dateString = [formatter stringFromDate:today];
 28+ NSLog(dateString);
2729
2830 return [NSString stringWithFormat: @"{{Information\n|Description={{en|1=%@}}\n|Author=[[User:%@]]\n|Source={{own}}\n|Date=%@\n|Permission=\n|other_versions=\n}}\n\n== {{int:license}} ==\n%@\n\n[[Category:%@]]",
2931 description,
3032 [[NSUserDefaults standardUserDefaults] valueForKey: COMMONS_USERNAME_KEY],
31 - date,
 33+ dateString,
3234 DEFAULT_LICENSE,
3335 APPLICATION_CATEGORY,
3436 nil
@@ -35,9 +37,6 @@
3638 }
3739
3840 - (void)uploadImage {
39 -// uploadProgress.progress = 0.0f;
40 -// uploadProgressMessage.text = @"uploading";
41 -
4241 NSURL *url = [NSURL URLWithString:API_URL];
4342 ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
4443 [request setPostFormat:ASIURLEncodedPostFormat];
@@ -130,7 +129,7 @@
131130 [newRequest addPostValue:@"query" forKey:@"action"];
132131 [newRequest addPostValue:@"xml" forKey: @"format"];
133132 [newRequest addPostValue:@"edit" forKey:@"intoken"];
134 - [newRequest addPostValue:@"WikiSnaps.jpg" forKey:@"titles"];
 133+ [newRequest addPostValue:title forKey:@"titles"];
135134 [newRequest addPostValue:@"info" forKey:@"prop"];
136135
137136 [newRequest setDelegate:self];
@@ -174,10 +173,10 @@
175174 [newRequest addPostValue:@"upload" forKey:@"action"];
176175 [newRequest addPostValue:@"xml" forKey: @"format"];
177176 [newRequest addPostValue:editToken forKey:@"token"];
178 - [newRequest addPostValue:@"WikiSnaps.jpg" forKey:@"filename"];
179 - [newRequest addPostValue:@"TestComment" forKey:@"comment"];
180 - [newRequest addPostValue:@"TestText" forKey:@"text"];
181 - [newRequest addData:self.imageData forKey:@"file"];
 177+ [newRequest addPostValue:title forKey:@"filename"];
 178+ [newRequest addPostValue:[self getUploadDescription] forKey:@"comment"];
 179+ [newRequest addPostValue:[self getUploadDescription] forKey:@"text"];
 180+ [newRequest addData:imageData forKey:@"file"];
182181
183182
184183 [newRequest setDelegate:self];
@@ -200,6 +199,7 @@
201200 // Use when fetching text data
202201 NSString *responseString = [request responseString];
203202 NSLog(responseString );
 203+ [delegate uploadSucceeded];
204204 }
205205
206206 - (void)requestUploadFailed:(ASIHTTPRequest *)request
Index: trunk/tools/Snap-to-Commons/Classes/PhotoPickerViewController.h
@@ -13,13 +13,9 @@
1414 UIImagePickerControllerDelegate,
1515 UINavigationControllerDelegate> {
1616 BOOL cameraAvailable;
17 - NSURLConnection *connection;
1817 BOOL fakeCameraAvailable;
1918 NSData *imageData;
2019 UIActionSheet *photoSourceActionSheet;
21 - NSHTTPURLResponse *response;
22 - NSMutableData *responseData;
23 - int retryCounter;
2420 IBOutlet UIButton *takePhotoButton;
2521 IBOutlet UIView *uploadPhotoOverlay;
2622 IBOutlet UIImageView *uploadOverlayImage;
@@ -29,8 +25,8 @@
3026 }
3127
3228 - (IBAction)onCameraClicked;
33 -- (IBAction)onCancelUploadClicked;
3429 - (IBAction)onPhotoLibraryClicked;
35 -
 30+- (IBAction)onSettingsClicked;
 31+- (IBAction)onCancelUploadClicked;
3632 @end
3733
Index: trunk/tools/Snap-to-Commons/Classes/ImageDetailsViewController.h
@@ -7,17 +7,23 @@
88 //
99
1010 #import <UIKit/UIKit.h>
 11+#import "CommonsUpload.h"
1112
1213
1314 @interface ImageDetailsViewController : UIViewController <UINavigationControllerDelegate,
14 - UITextFieldDelegate> {
 15+ UITextFieldDelegate,
 16+ UITextViewDelegate,
 17+ CommonsUploadDelegate,
 18+ UIAlertViewDelegate> {
1519 IBOutlet UITextField *titleField;
1620 IBOutlet UITextView *descriptionText;
 21+ CommonsUpload *upload;
1722 }
1823
1924 @property (nonatomic, retain) UITextField *titleField;
2025 @property (nonatomic, retain) UITextView *descriptionText;
 26+@property (nonatomic, retain) CommonsUpload *upload;
2127
22 -
23 --(IBAction)textFieldDidEnd:(id)sender;
 28+- (IBAction)textFieldDidEnd:(id)sender;
 29+- (void)doUpload:(id)sender;
2430 @end
Index: trunk/tools/Snap-to-Commons/Classes/PhotoPickerAppDelegate.m
@@ -11,7 +11,6 @@
1212
1313 @interface PhotoPickerAppDelegate ()
1414 - (void)checkIfJustInstalled;
15 - - (void)setupForUrl:(NSURL *)url;
1615 @end
1716
1817
@@ -19,7 +18,6 @@
2019
2120 @synthesize defaultImageSource;
2221 @synthesize justInstalled;
23 -@synthesize launchedAsUrlHandler;
2422 @synthesize postContext;
2523 @synthesize viewController;
2624 @synthesize navController;
@@ -28,16 +26,9 @@
2927
3028 - (BOOL)application:(UIApplication *)application
3129 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
32 - self.launchedAsUrlHandler = !!launchOptions;
3330
3431 self.defaultImageSource = -1;
35 - self.postContext = @"";
3632
37 - /*if (launchOptions) {
38 - NSURL *url = [launchOptions valueForKey:@"UIApplicationLaunchOptionsURLKey"];
39 - [self setupForUrl:url];
40 - }*/
41 -
4233 [self checkIfJustInstalled];
4334
4435 [window addSubview:navController.view];
@@ -48,8 +39,8 @@
4940
5041
5142 - (void)dealloc {
52 - self.postContext = nil;
5343 self.viewController = nil;
 44+ self.navController = nil;
5445 self.window = nil;
5546
5647 [super dealloc];
@@ -70,27 +61,4 @@
7162 }
7263
7364
74 -- (void)setupForUrl:(NSURL *)url {
75 - NSString *query = [url query];
76 - if ([query length]) {
77 - NSArray *queryParts = [query componentsSeparatedByString:@"&"];
78 - for (NSString *queryPart in queryParts) {
79 - NSArray *kvp = [queryPart componentsSeparatedByString:@"="];
80 - NSString *key = [kvp objectAtIndex:0];
81 - NSString *value = [kvp objectAtIndex:1];
82 -
83 - if ([key isEqualToString:@"context"]) {
84 - self.postContext = value;
85 - } else if ([key isEqualToString:@"source"]) {
86 - if ([value isEqualToString:@"camera"]) {
87 - self.defaultImageSource = UIImagePickerControllerSourceTypeCamera;
88 - } else if ([value isEqualToString:@"library"]) {
89 - self.defaultImageSource = UIImagePickerControllerSourceTypePhotoLibrary;
90 - }
91 - }
92 - }
93 - }
94 -}
95 -
96 -
9765 @end
Index: trunk/tools/Snap-to-Commons/PhotoPickerViewController.xib
@@ -1,19 +1,17 @@
22 <?xml version="1.0" encoding="UTF-8"?>
33 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
44 <data>
5 - <int key="IBDocument.SystemTarget">768</int>
6 - <string key="IBDocument.SystemVersion">10C540</string>
7 - <string key="IBDocument.InterfaceBuilderVersion">740</string>
8 - <string key="IBDocument.AppKitVersion">1038.25</string>
9 - <string key="IBDocument.HIToolboxVersion">458.00</string>
 5+ <int key="IBDocument.SystemTarget">1056</int>
 6+ <string key="IBDocument.SystemVersion">10H574</string>
 7+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
 8+ <string key="IBDocument.AppKitVersion">1038.35</string>
 9+ <string key="IBDocument.HIToolboxVersion">461.00</string>
1010 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
1111 <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
12 - <string key="NS.object.0">62</string>
 12+ <string key="NS.object.0">132</string>
1313 </object>
1414 <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
1515 <bool key="EncodedWithXMLCoder">YES</bool>
16 - <integer value="6"/>
17 - <integer value="13"/>
1816 </object>
1917 <object class="NSArray" key="IBDocument.PluginDependencies">
2018 <bool key="EncodedWithXMLCoder">YES</bool>
@@ -32,15 +30,18 @@
3331 <bool key="EncodedWithXMLCoder">YES</bool>
3432 <object class="IBProxyObject" id="372490531">
3533 <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
 34+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
3635 </object>
3736 <object class="IBProxyObject" id="843779117">
3837 <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
 38+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
3939 </object>
4040 <object class="IBUIView" id="774585933">
4141 <reference key="NSNextResponder"/>
4242 <int key="NSvFlags">274</int>
4343 <string key="NSFrameSize">{320, 460}</string>
4444 <reference key="NSSuperview"/>
 45+ <reference key="NSWindow"/>
4546 <object class="NSColor" key="IBUIBackgroundColor">
4647 <int key="NSColorSpace">5</int>
4748 <bytes key="NSCMYK">MCAwIDAgMAA</bytes>
@@ -51,6 +52,7 @@
5253 </object>
5354 <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
5455 <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
 56+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
5557 </object>
5658 <object class="IBUIView" id="79809793">
5759 <reference key="NSNextResponder"/>
@@ -62,14 +64,17 @@
6365 <int key="NSvFlags">290</int>
6466 <string key="NSFrameSize">{320, 44}</string>
6567 <reference key="NSSuperview" ref="79809793"/>
 68+ <reference key="NSWindow"/>
6669 <bool key="IBUIOpaque">NO</bool>
6770 <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 71+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
6872 <int key="IBUIBarStyle">1</int>
6973 <object class="NSArray" key="IBUIItems">
7074 <bool key="EncodedWithXMLCoder">YES</bool>
7175 <object class="IBUINavigationItem" id="766765125">
7276 <reference key="IBUINavigationBar" ref="923235693"/>
7377 <string key="IBUITitle"/>
 78+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
7479 </object>
7580 </object>
7681 </object>
@@ -78,18 +83,22 @@
7984 <int key="NSvFlags">292</int>
8085 <string key="NSFrame">{{20, 64}, {279, 310}}</string>
8186 <reference key="NSSuperview" ref="79809793"/>
 87+ <reference key="NSWindow"/>
8288 <bool key="IBUIOpaque">NO</bool>
8389 <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
8490 <int key="IBUIContentMode">1</int>
8591 <bool key="IBUIUserInteractionEnabled">NO</bool>
 92+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
8693 </object>
8794 <object class="IBUIButton" id="106179972">
8895 <reference key="NSNextResponder" ref="79809793"/>
8996 <int key="NSvFlags">292</int>
9097 <string key="NSFrame">{{21, 394}, {278, 46}}</string>
9198 <reference key="NSSuperview" ref="79809793"/>
 99+ <reference key="NSWindow"/>
92100 <bool key="IBUIOpaque">NO</bool>
93101 <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 102+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
94103 <int key="IBUIContentHorizontalAlignment">0</int>
95104 <int key="IBUIContentVerticalAlignment">0</int>
96105 <object class="NSFont" key="IBUIFont">
@@ -123,9 +132,11 @@
124133 <int key="NSvFlags">292</int>
125134 <string key="NSFrame">{{78, 26}, {164, 11}}</string>
126135 <reference key="NSSuperview" ref="79809793"/>
 136+ <reference key="NSWindow"/>
127137 <bool key="IBUIOpaque">NO</bool>
128138 <bool key="IBUIClipsSubviews">YES</bool>
129139 <bool key="IBUIMultipleTouchEnabled">YES</bool>
 140+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
130141 <float key="IBUIProgress">0.5</float>
131142 <int key="IBUIProgressViewStyle">1</int>
132143 </object>
@@ -134,9 +145,11 @@
135146 <int key="NSvFlags">292</int>
136147 <string key="NSFrameSize">{320, 23}</string>
137148 <reference key="NSSuperview" ref="79809793"/>
 149+ <reference key="NSWindow"/>
138150 <bool key="IBUIOpaque">NO</bool>
139151 <bool key="IBUIClipsSubviews">YES</bool>
140152 <bool key="IBUIUserInteractionEnabled">NO</bool>
 153+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
141154 <string key="IBUIText">uploading</string>
142155 <object class="NSFont" key="IBUIFont">
143156 <string key="NSName">Helvetica</string>
@@ -164,11 +177,13 @@
165178 </object>
166179 <string key="NSFrameSize">{320, 460}</string>
167180 <reference key="NSSuperview"/>
 181+ <reference key="NSWindow"/>
168182 <object class="NSColor" key="IBUIBackgroundColor">
169183 <int key="NSColorSpace">3</int>
170184 <bytes key="NSWhite">MC4xMzMwNjQ1MTYxAA</bytes>
171185 </object>
172186 <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 187+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
173188 </object>
174189 </object>
175190 <object class="IBObjectContainer" key="IBDocument.Objects">
@@ -331,7 +346,7 @@
332347 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
333348 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
334349 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
335 - <string>{{150, 209}, {320, 480}}</string>
 350+ <string>{{329, 209}, {320, 480}}</string>
336351 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
337352 </object>
338353 </object>
@@ -366,14 +381,45 @@
367382 <string>onCameraClicked</string>
368383 <string>onCancelUploadClicked</string>
369384 <string>onPhotoLibraryClicked</string>
 385+ <string>onSettingsClicked</string>
370386 </object>
371387 <object class="NSMutableArray" key="dict.values">
372388 <bool key="EncodedWithXMLCoder">YES</bool>
373389 <string>id</string>
374390 <string>id</string>
375391 <string>id</string>
 392+ <string>id</string>
376393 </object>
377394 </object>
 395+ <object class="NSMutableDictionary" key="actionInfosByName">
 396+ <bool key="EncodedWithXMLCoder">YES</bool>
 397+ <object class="NSArray" key="dict.sortedKeys">
 398+ <bool key="EncodedWithXMLCoder">YES</bool>
 399+ <string>onCameraClicked</string>
 400+ <string>onCancelUploadClicked</string>
 401+ <string>onPhotoLibraryClicked</string>
 402+ <string>onSettingsClicked</string>
 403+ </object>
 404+ <object class="NSMutableArray" key="dict.values">
 405+ <bool key="EncodedWithXMLCoder">YES</bool>
 406+ <object class="IBActionInfo">
 407+ <string key="name">onCameraClicked</string>
 408+ <string key="candidateClassName">id</string>
 409+ </object>
 410+ <object class="IBActionInfo">
 411+ <string key="name">onCancelUploadClicked</string>
 412+ <string key="candidateClassName">id</string>
 413+ </object>
 414+ <object class="IBActionInfo">
 415+ <string key="name">onPhotoLibraryClicked</string>
 416+ <string key="candidateClassName">id</string>
 417+ </object>
 418+ <object class="IBActionInfo">
 419+ <string key="name">onSettingsClicked</string>
 420+ <string key="candidateClassName">id</string>
 421+ </object>
 422+ </object>
 423+ </object>
378424 <object class="NSMutableDictionary" key="outlets">
379425 <bool key="EncodedWithXMLCoder">YES</bool>
380426 <object class="NSArray" key="dict.sortedKeys">
@@ -393,6 +439,40 @@
394440 <string>UILabel</string>
395441 </object>
396442 </object>
 443+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
 444+ <bool key="EncodedWithXMLCoder">YES</bool>
 445+ <object class="NSArray" key="dict.sortedKeys">
 446+ <bool key="EncodedWithXMLCoder">YES</bool>
 447+ <string>takePhotoButton</string>
 448+ <string>uploadOverlayImage</string>
 449+ <string>uploadPhotoOverlay</string>
 450+ <string>uploadProgress</string>
 451+ <string>uploadProgressMessage</string>
 452+ </object>
 453+ <object class="NSMutableArray" key="dict.values">
 454+ <bool key="EncodedWithXMLCoder">YES</bool>
 455+ <object class="IBToOneOutletInfo">
 456+ <string key="name">takePhotoButton</string>
 457+ <string key="candidateClassName">UIButton</string>
 458+ </object>
 459+ <object class="IBToOneOutletInfo">
 460+ <string key="name">uploadOverlayImage</string>
 461+ <string key="candidateClassName">UIImageView</string>
 462+ </object>
 463+ <object class="IBToOneOutletInfo">
 464+ <string key="name">uploadPhotoOverlay</string>
 465+ <string key="candidateClassName">UIView</string>
 466+ </object>
 467+ <object class="IBToOneOutletInfo">
 468+ <string key="name">uploadProgress</string>
 469+ <string key="candidateClassName">UIProgressView</string>
 470+ </object>
 471+ <object class="IBToOneOutletInfo">
 472+ <string key="name">uploadProgressMessage</string>
 473+ <string key="candidateClassName">UILabel</string>
 474+ </object>
 475+ </object>
 476+ </object>
397477 <object class="IBClassDescriptionSource" key="sourceIdentifier">
398478 <string key="majorKey">IBProjectSource</string>
399479 <string key="minorKey">Classes/PhotoPickerViewController.h</string>
@@ -440,13 +520,6 @@
441521 <string key="className">NSObject</string>
442522 <object class="IBClassDescriptionSource" key="sourceIdentifier">
443523 <string key="majorKey">IBFrameworkSource</string>
444 - <string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
445 - </object>
446 - </object>
447 - <object class="IBPartialClassDescription">
448 - <string key="className">NSObject</string>
449 - <object class="IBClassDescriptionSource" key="sourceIdentifier">
450 - <string key="majorKey">IBFrameworkSource</string>
451524 <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
452525 </object>
453526 </object>
@@ -454,13 +527,6 @@
455528 <string key="className">NSObject</string>
456529 <object class="IBClassDescriptionSource" key="sourceIdentifier">
457530 <string key="majorKey">IBFrameworkSource</string>
458 - <string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
459 - </object>
460 - </object>
461 - <object class="IBPartialClassDescription">
462 - <string key="className">NSObject</string>
463 - <object class="IBClassDescriptionSource" key="sourceIdentifier">
464 - <string key="majorKey">IBFrameworkSource</string>
465531 <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
466532 </object>
467533 </object>
@@ -468,13 +534,6 @@
469535 <string key="className">NSObject</string>
470536 <object class="IBClassDescriptionSource" key="sourceIdentifier">
471537 <string key="majorKey">IBFrameworkSource</string>
472 - <string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
473 - </object>
474 - </object>
475 - <object class="IBPartialClassDescription">
476 - <string key="className">NSObject</string>
477 - <object class="IBClassDescriptionSource" key="sourceIdentifier">
478 - <string key="majorKey">IBFrameworkSource</string>
479538 <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
480539 </object>
481540 </object>
@@ -496,13 +555,6 @@
497556 <string key="className">NSObject</string>
498557 <object class="IBClassDescriptionSource" key="sourceIdentifier">
499558 <string key="majorKey">IBFrameworkSource</string>
500 - <string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
501 - </object>
502 - </object>
503 - <object class="IBPartialClassDescription">
504 - <string key="className">NSObject</string>
505 - <object class="IBClassDescriptionSource" key="sourceIdentifier">
506 - <string key="majorKey">IBFrameworkSource</string>
507559 <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
508560 </object>
509561 </object>
@@ -614,6 +666,13 @@
615667 <string key="className">UIView</string>
616668 <object class="IBClassDescriptionSource" key="sourceIdentifier">
617669 <string key="majorKey">IBFrameworkSource</string>
 670+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
 671+ </object>
 672+ </object>
 673+ <object class="IBPartialClassDescription">
 674+ <string key="className">UIView</string>
 675+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
 676+ <string key="majorKey">IBFrameworkSource</string>
618677 <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
619678 </object>
620679 </object>
@@ -636,6 +695,20 @@
637696 <string key="className">UIViewController</string>
638697 <object class="IBClassDescriptionSource" key="sourceIdentifier">
639698 <string key="majorKey">IBFrameworkSource</string>
 699+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
 700+ </object>
 701+ </object>
 702+ <object class="IBPartialClassDescription">
 703+ <string key="className">UIViewController</string>
 704+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
 705+ <string key="majorKey">IBFrameworkSource</string>
 706+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
 707+ </object>
 708+ </object>
 709+ <object class="IBPartialClassDescription">
 710+ <string key="className">UIViewController</string>
 711+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
 712+ <string key="majorKey">IBFrameworkSource</string>
640713 <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
641714 </object>
642715 </object>
@@ -650,9 +723,10 @@
651724 </object>
652725 </object>
653726 <int key="IBDocument.localizationMode">0</int>
 727+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
654728 <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
655729 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
656 - <integer value="768" key="NS.object.0"/>
 730+ <integer value="1056" key="NS.object.0"/>
657731 </object>
658732 <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
659733 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -661,6 +735,19 @@
662736 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
663737 <string key="IBDocument.LastKnownRelativeProjectPath">photopicker.xcodeproj</string>
664738 <int key="IBDocument.defaultPropertyAccessControl">3</int>
665 - <string key="IBCocoaTouchPluginVersion">3.1</string>
 739+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
 740+ <bool key="EncodedWithXMLCoder">YES</bool>
 741+ <object class="NSArray" key="dict.sortedKeys">
 742+ <bool key="EncodedWithXMLCoder">YES</bool>
 743+ <string>cancel-button-pressed.png</string>
 744+ <string>cancel-button.png</string>
 745+ </object>
 746+ <object class="NSMutableArray" key="dict.values">
 747+ <bool key="EncodedWithXMLCoder">YES</bool>
 748+ <string>{278, 46}</string>
 749+ <string>{278, 46}</string>
 750+ </object>
 751+ </object>
 752+ <string key="IBCocoaTouchPluginVersion">132</string>
666753 </data>
667754 </archive>

Status & tagging log