Merge lp:~aaronbrethorst-deactivatedaccount/ubuntuone-ios-client/ubuntuone-artwork into lp:ubuntuone-ios-client

Proposed by Aaron Brethorst
Status: Superseded
Proposed branch: lp:~aaronbrethorst-deactivatedaccount/ubuntuone-ios-client/ubuntuone-artwork
Merge into: lp:ubuntuone-ios-client
Diff against target: 636 lines (+228/-161)
6 files modified
iPhoneApp/Info.plist (+22/-6)
iPhoneApp/SyncEngine/src/iPhoneDefaultConfigFactory.cpp (+1/-1)
iPhoneApp/UI/include/AccountView.h (+8/-13)
iPhoneApp/UI/src/AccountView.mm (+175/-136)
iPhoneApp/UI/src/main.mm (+1/-0)
iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj (+21/-5)
To merge this branch: bzr merge lp:~aaronbrethorst-deactivatedaccount/ubuntuone-ios-client/ubuntuone-artwork
Reviewer Review Type Date Requested Status
Zachery Bir (community) Approve
Review via email: mp+30805@code.launchpad.net

This proposal has been superseded by a proposal from 2010-07-26.

Description of the change

This commit includes the following:
- Updated artwork for the Default.png and Icon files (including iPhone 4/Retina Display-optimized artwork)
- String changes to remove overt Funambol references (i.e. make the app's text identical to the one in the App Store, again)
- Add a button to the credentials page that will externally open Mobile Safari and allow the user to retrieve their syncml server creds
- Plumb through the credentials retrieved from the ubuntuone:// URL so that when the user comes back to the app, their creds are automatically populated.a

To post a comment you must log in.
Revision history for this message
Zachery Bir (urbanape) wrote :

Looks good to me. Runs fine in the simulator.

We need to change the URL that "Retrieve My Credentials..." points to, and we need to get the provisioning profile to be a team profile, but this is good to merge.

review: Approve
3. By Aaron Brethorst <email address hidden>

Clean up the AccountView a bit. Change it from being a UIViewController to a plain, old UITableViewController, which lets us get rid of a bunch of unnecessary code.

4. By Aaron Brethorst <email address hidden>

Improved management of placeholder values in the three account view controller fields (placeholders need not be removed when a value is present in their fields). Removed manual event management from the three fields and replaced them with a UITextFieldDelegate callback method. Also added proper management of firstResponder status, so each text field gains focus in turn when the return key is pressed.

5. By Aaron Brethorst <email address hidden>

Remove duplicate method declarations from AccountView. The method signatures removed are declared on subclasses of UITableViewController, and should not be repeated here.

6. By Aaron Brethorst <email address hidden>

Ripped out a ton of redundant code around instantiating the text fields used in the account view and replaced them with a single, internal method that generates the needed text fields in a single place. Much easier to figure out what's going on, now

7. By Aaron Brethorst <email address hidden>

Finish overhauling the AccountView: I think I have resolved all of the memory leaks in that class, I have cut out about 25% of LOC from the file, and the class now behaves like I would expect a UITableViewController subclass to work.

8. By Aaron Brethorst <email address hidden>

Turn SettingsSingleView into a UITableViewController. Get rid of some unnecessary code in the process.

9. By Aaron Brethorst <email address hidden>

updated sync artwork with the Ubuntu CoF logo. IMPORTANT: this MUST be cleared with the appropriate folks, since a casual read of the branding requirements seems to indicate that this might be in violation...

Unmerged revisions

9. By Aaron Brethorst <email address hidden>

updated sync artwork with the Ubuntu CoF logo. IMPORTANT: this MUST be cleared with the appropriate folks, since a casual read of the branding requirements seems to indicate that this might be in violation...

8. By Aaron Brethorst <email address hidden>

Turn SettingsSingleView into a UITableViewController. Get rid of some unnecessary code in the process.

7. By Aaron Brethorst <email address hidden>

Finish overhauling the AccountView: I think I have resolved all of the memory leaks in that class, I have cut out about 25% of LOC from the file, and the class now behaves like I would expect a UITableViewController subclass to work.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'iPhoneApp/Default.png'
2Binary files iPhoneApp/Default.png 1970-01-01 00:00:00 +0000 and iPhoneApp/Default.png 2010-07-26 21:44:45 +0000 differ
3=== added file 'iPhoneApp/Default@2x.png'
4Binary files iPhoneApp/Default@2x.png 1970-01-01 00:00:00 +0000 and iPhoneApp/Default@2x.png 2010-07-26 21:44:45 +0000 differ
5=== added file 'iPhoneApp/Icon.png'
6Binary files iPhoneApp/Icon.png 1970-01-01 00:00:00 +0000 and iPhoneApp/Icon.png 2010-07-26 21:44:45 +0000 differ
7=== added file 'iPhoneApp/Icon@2x.png'
8Binary files iPhoneApp/Icon@2x.png 1970-01-01 00:00:00 +0000 and iPhoneApp/Icon@2x.png 2010-07-26 21:44:45 +0000 differ
9=== modified file 'iPhoneApp/Info.plist'
10--- iPhoneApp/Info.plist 2010-07-22 20:21:36 +0000
11+++ iPhoneApp/Info.plist 2010-07-26 21:44:45 +0000
12@@ -2,20 +2,23 @@
13 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
14 <plist version="1.0">
15 <dict>
16- <key>UISupportedInterfaceOrientations</key>
17- <false/>
18 <key>LSRequiresIPhoneOS</key>
19 <true/>
20 <key>CFBundleDevelopmentRegion</key>
21 <string>en</string>
22 <key>CFBundleDisplayName</key>
23- <string>Funambol</string>
24+ <string>Ubuntu One</string>
25 <key>CFBundleExecutable</key>
26 <string>${EXECUTABLE_NAME}</string>
27 <key>CFBundleIconFile</key>
28- <string>apple-touch-icon.png</string>
29+ <string>Icon.png</string>
30+ <key>CFBundleIconFiles</key>
31+ <array>
32+ <string>Icon.png</string>
33+ <string>Icon@2x.png</string>
34+ </array>
35 <key>CFBundleIdentifier</key>
36- <string>com.funambol.iphoneplugin</string>
37+ <string>com.structlab.one.iphoneplugin</string>
38 <key>CFBundleInfoDictionaryVersion</key>
39 <string>6.0</string>
40 <key>CFBundleName</key>
41@@ -25,6 +28,19 @@
42 <key>CFBundleSignature</key>
43 <string>????</string>
44 <key>CFBundleVersion</key>
45- <string>8.7.0</string>
46+ <string>8.7.0</string>
47+ <key>UIPrerenderedIcon</key>
48+ <false/>
49+ <key>CFBundleURLTypes</key>
50+ <array>
51+ <dict>
52+ <key>CFBundleURLName</key>
53+ <string>com.structlab.one.iphoneplugin</string>
54+ <key>CFBundleURLSchemes</key>
55+ <array>
56+ <string>ubuntuone</string>
57+ </array>
58+ </dict>
59+ </array>
60 </dict>
61 </plist>
62
63=== modified file 'iPhoneApp/SyncEngine/src/iPhoneDefaultConfigFactory.cpp'
64--- iPhoneApp/SyncEngine/src/iPhoneDefaultConfigFactory.cpp 2010-07-22 20:21:36 +0000
65+++ iPhoneApp/SyncEngine/src/iPhoneDefaultConfigFactory.cpp 2010-07-26 21:44:45 +0000
66@@ -65,7 +65,7 @@
67 ac->setProxyPort (8080);
68 ac->setProxyUsername ("");
69 ac->setProxyPassword ("");
70- ac->setSyncURL ("http://my.funambol.com/sync");
71+ ac->setSyncURL ("https://syncml.one.ubuntu.com");
72 ac->setBeginSync (0);
73 ac->setEndSync (0);
74 ac->setServerAuthRequired (false);
75
76=== modified file 'iPhoneApp/UI/include/AccountView.h'
77--- iPhoneApp/UI/include/AccountView.h 2010-07-22 20:21:36 +0000
78+++ iPhoneApp/UI/include/AccountView.h 2010-07-26 21:44:45 +0000
79@@ -35,14 +35,11 @@
80
81 #import <UIKit/UIKit.h>
82
83-
84 #import "common.h"
85 #import "base/Log.h"
86
87 USE_NAMESPACE
88-@interface AccountView : UIViewController <UIScrollViewDelegate, UITextFieldDelegate, UITableViewDelegate, UITableViewDataSource> {
89-
90- UITableView* accountTable;
91+@interface AccountView : UITableViewController <UITextFieldDelegate> {
92
93 UITextField* URLValue;
94 UITextField* usernameValue;
95@@ -51,6 +48,11 @@
96 UITableViewCell* URLParameter;
97 UITableViewCell* usernameParameter;
98 UITableViewCell* passwordParameter;
99+
100+ //AB 21 July 2010 - Add a 'Retrieve Creds Section'
101+ UITableViewCell* credentialsButton;
102+ //
103+
104 UIActivityIndicatorView* activityIndicator;
105
106 UIFont* small_font;
107@@ -62,22 +64,15 @@
108 NSString* password;
109
110 UIColor* funBlue;
111- NSNotificationCenter *nCenter;
112 UIAlertView *animationAlert;
113 NSString* credentials;
114 }
115-- (id)init;
116 - (BOOL) isPortal;
117-- (void)dealloc;
118 - (void) reload;
119-- (void) viewDidAppear:(BOOL) animated;
120-- (void) viewWillDisappear:(BOOL) animated;
121-- (void) URLValueEditedAction: (id)sender;
122-- (void) usernameValueEditedAction: (id)sender;
123-- (void) passwordValueEditedAction: (id)sender;
124-
125 - (void) startWaitingAnimation:(NSNotification *) aNotification ;
126 - (void) stopWaitingAnimation:(NSNotification *) aNotification ;
127 - (void) setCredentials:(NSString*)value;
128+//AB 21 July 2010 - Add a 'Retrieve Creds Section'
129+- (void)loadCredentials;
130 //- (void)alertView: (UIAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex;
131 @end
132
133=== modified file 'iPhoneApp/UI/l10n/English.lproj/Localizable.strings'
134Binary files iPhoneApp/UI/l10n/English.lproj/Localizable.strings 2010-07-22 20:21:36 +0000 and iPhoneApp/UI/l10n/English.lproj/Localizable.strings 2010-07-26 21:44:45 +0000 differ
135=== modified file 'iPhoneApp/UI/src/AccountView.mm'
136--- iPhoneApp/UI/src/AccountView.mm 2010-07-22 20:21:36 +0000
137+++ iPhoneApp/UI/src/AccountView.mm 2010-07-26 21:44:45 +0000
138@@ -42,21 +42,28 @@
139 #import "customs.h"
140 #import "LoginManager.h"
141
142+@interface AccountView ()
143+- (UITextField*)buildTextFieldWithFrame:(CGRect)aFrame text:(NSString*)text keyboardType:(UIKeyboardType)keyboardType returnKeyType:(UIReturnKeyType)returnKeyType;
144+@end
145+
146+
147 @implementation AccountView
148
149 - (id)init {
150- self = [super init];
151- if (self)
152+ if (self = [super initWithStyle:UITableViewStyleGrouped])
153 {
154 // this title will appear in the navigation bar
155 self.title = NSLocalizedString(@"Account",@"Account");
156+ funBlue = [[UIColor alloc] initWithRed:FUNBLUE_RGB_RED green:FUNBLUE_RGB_GREEN blue:FUNBLUE_RGB_BLUE alpha:1.0];
157+ showerror = true;
158 }
159- funBlue = [[UIColor alloc] initWithRed:FUNBLUE_RGB_RED green:FUNBLUE_RGB_GREEN blue:FUNBLUE_RGB_BLUE alpha:1.0];
160- showerror = true;
161+
162 return self;
163 }
164
165-
166+- (BOOL) isPortal{
167+ return FALSE;
168+}
169
170 - (void) noCredsAlert: (NSString*) text{
171 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Alert", @"Alert") message:text
172@@ -109,57 +116,84 @@
173
174 }
175
176+//AB 21 July 2010 - Add a 'Retrieve Creds Section'
177+- (void)loadCredentials
178+{
179+ if (credentials)
180+ {
181+ NSURL *credURL = [NSURL URLWithString:credentials];
182+
183+ if ([credURL user])
184+ {
185+ usernameValue.text = [credURL user];
186+ [[FunambolAPI getInstance] saveUsernameConfig:[credURL user]];
187+ }
188+
189+ if ([credURL password])
190+ {
191+ passwordValue.text = [credURL password];
192+ [[FunambolAPI getInstance] savePasswordConfig:[credURL password]];
193+ }
194+
195+ if ([credURL host])
196+ {
197+ URLValue.text = [credURL host];
198+ [[FunambolAPI getInstance] saveURLConfig:[credURL host]];
199+ }
200+ }
201+}
202+
203 - (void) setCredentials:(NSString*)value{
204-
205+ [value retain];
206+ [credentials release];
207+ credentials = value;
208+
209+#if 0 //AB 21 July 2010 - Add a 'Retrieve Creds Section'
210 [self startWaitingAnimation:nil];
211 credentials = value;
212+
213 LoginManager* loginmanager = [[LoginManager alloc]init];
214 [loginmanager setCredentials:value];
215 [loginmanager login];
216-}
217-
218-
219-- (void) loadView{
220- UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
221- self.view = contentView;
222- [contentView release];
223-
224- self.view.autoresizesSubviews = YES;
225-
226+#endif
227+}
228+
229+- (UITextField*)buildTextFieldWithFrame:(CGRect)aFrame text:(NSString*)text keyboardType:(UIKeyboardType)keyboardType returnKeyType:(UIReturnKeyType)returnKeyType
230+{
231+ UITextField *field = [[UITextField alloc] initWithFrame:aFrame];
232+ field.borderStyle = UITextBorderStyleNone;
233+ field.font = small_font;
234+ field.exclusiveTouch = YES;
235+ field.autocorrectionType = UITextAutocorrectionTypeNo;
236+ field.text = text;
237+ field.keyboardType = keyboardType;
238+ field.returnKeyType = returnKeyType;
239+ field.clearButtonMode = UITextFieldViewModeNever;
240+ field.autocapitalizationType = UITextAutocapitalizationTypeNone;
241+ field.textColor = funBlue;
242+ field.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
243+ field.delegate = self;
244+
245+ return field;
246+}
247+
248+
249+- (void) viewDidLoad{
250+ [super viewDidLoad];
251+
252 small_font = [UIFont systemFontOfSize:15];
253-
254- accountTable = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
255- accountTable.delegate = self;
256- accountTable.dataSource = self;
257- accountTable.scrollEnabled = NO;
258- //accountTable.rowHeight = 60;
259- [accountTable reloadData];
260-
261+
262 [[FunambolAPI getInstance] loadSyncConfig:&URL username:&username password:&password];
263-
264
265 URLParameter = [[UITableViewCell alloc] init];
266 URLParameter.textLabel.text = NSLocalizedString(@"Server",@"Server");
267 [URLParameter setSelectionStyle:UITableViewCellSelectionStyleNone];
268- URLValue = [[UITextField alloc] initWithFrame:CGRectMake(116.0, 3.0, 185.0, 40 )];
269- //URLValue = [[UITextField alloc] initWithFrame:CGRectMake(15.0, 3.0, 290, 40 )];
270- URLValue.borderStyle = UITextBorderStyleNone;
271- URLValue.font = small_font;
272- URLValue.exclusiveTouch = YES;
273- URLValue.autocorrectionType = UITextAutocorrectionTypeNo;
274- if ([URL isEqualToString:@""]){
275- URLValue.text = @"http://my.funambol.com/sync";
276- }else{
277- URLValue.text = URL;
278- }
279- URLValue.backgroundColor = [UIColor whiteColor];
280- URLValue.keyboardType = UIKeyboardTypeURL;
281- URLValue.returnKeyType = UIReturnKeyDone;
282- URLValue.clearButtonMode = UITextFieldViewModeNever;
283- URLValue.autocapitalizationType = UITextAutocapitalizationTypeNone;
284- URLValue.textColor = funBlue;
285- URLValue.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
286- [URLValue addTarget:self action:@selector(URLValueEditedAction:) forControlEvents:UIControlEventEditingDidEnd];
287+
288+ URLValue = [self buildTextFieldWithFrame:CGRectMake(116.0, 3.0, 185.0, 40)
289+ text:([URL isEqual:@""] ? @"https://syncml.one.ubuntu.com" : URL)
290+ keyboardType:UIKeyboardTypeURL
291+ returnKeyType:UIReturnKeyNext];
292+
293 [URLParameter addSubview:URLValue];
294
295 //smart dimension of the labels
296@@ -167,75 +201,48 @@
297 NSString* passwordLabel = NSLocalizedString(@"Password",@"Password");
298
299
300- double label_start = 115.0;
301- double label_width = 185.0;
302+ float label_start = 115.0;
303+ float label_width = 185.0;
304 if( [usernameLabel length] > 10 || [passwordLabel length] > 10 ){
305- int val;
306- ([usernameLabel length] > [passwordLabel length]) ? val = [usernameLabel length] : [passwordLabel length];
307+ int val = MAX([usernameLabel length],[passwordLabel length]);
308 label_start = 12 * val;
309 label_width = 300 - label_start;
310-
311 }
312
313 usernameParameter = [[UITableViewCell alloc] init];
314-
315- usernameParameter.textLabel.text = usernameLabel;
316-// [usernameParameter setText: usernameLabel];
317-
318+ usernameParameter.textLabel.text = usernameLabel;
319 [usernameParameter setSelectionStyle:UITableViewCellSelectionStyleNone];
320- usernameValue = [[UITextField alloc] initWithFrame:CGRectMake(label_start, 3.0, label_width, 40)];
321- usernameValue.borderStyle = UITextBorderStyleNone;
322- usernameValue.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
323- //usernameValue.textAlignment = UITextAlignmentRight;
324- usernameValue.font = small_font;
325- if([username isEqualToString:@""]||[username isEqualToString:@"guest "]){
326- usernameValue.placeholder = @"username";
327- //usernameValue.text = username;
328- }else{
329- usernameValue.text = username;
330- }
331- usernameValue.backgroundColor = [UIColor whiteColor];
332- usernameValue.keyboardType = UIKeyboardTypeEmailAddress;
333- usernameValue.returnKeyType = UIReturnKeyDone;
334- usernameValue.autocorrectionType = UITextAutocorrectionTypeNo;
335- usernameValue.textColor = funBlue;
336- usernameValue.clearButtonMode = UITextFieldViewModeNever;
337- usernameValue.autocapitalizationType = UITextAutocapitalizationTypeNone;
338- [usernameValue addTarget:self action:@selector(usernameValueEditedAction:) forControlEvents:UIControlEventAllEditingEvents];
339+
340+ usernameValue = [self buildTextFieldWithFrame:CGRectMake(label_start, 3.0, label_width, 40)
341+ text:([username length] > 0 && ![username isEqual:@"guest "] ? username : @"")
342+ keyboardType:UIKeyboardTypeEmailAddress
343+ returnKeyType:UIReturnKeyNext];
344+
345 [usernameParameter addSubview:usernameValue];
346
347 passwordParameter = [[UITableViewCell alloc] init];
348 [passwordParameter setSelectionStyle:UITableViewCellSelectionStyleNone];
349 passwordParameter.textLabel.text = passwordLabel;
350- //[passwordParameter setText:passwordLabel];
351- passwordValue = [[UITextField alloc] initWithFrame:CGRectMake(label_start, 3.0,label_width, 40)];
352- passwordValue.borderStyle = UITextBorderStyleNone;
353- passwordValue.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
354- //passwordValue.textAlignment = UITextAlignmentRight;
355- passwordValue.textColor = funBlue;
356- passwordValue.font = small_font;
357- if([password isEqualToString:@""]){
358- passwordValue.placeholder = @"password";
359- }else {
360- passwordValue.text = password;
361- }
362- //[passwordValue setEditing:TRUE];
363- passwordValue.backgroundColor = [UIColor whiteColor];
364- passwordValue.autocorrectionType = UITextAutocorrectionTypeNo;
365- passwordValue.keyboardType = UIKeyboardTypeDefault;
366- passwordValue.returnKeyType = UIReturnKeyDone;
367- passwordValue.clearButtonMode = UITextFieldViewModeNever;
368- passwordValue.secureTextEntry = YES;
369- [passwordValue addTarget:self action:@selector(passwordValueEditedAction:) forControlEvents:UIControlEventAllEditingEvents];
370+
371+ passwordValue = [self buildTextFieldWithFrame:CGRectMake(label_start, 3.0,label_width, 40)
372+ text:(0 == [password length] ? @"" : password)
373+ keyboardType:UIKeyboardTypeDefault
374+ returnKeyType:UIReturnKeyDone];
375+
376+ passwordValue.secureTextEntry = YES;
377 [passwordParameter addSubview:passwordValue];
378-
379- [self.view addSubview:accountTable];
380-
381- [accountTable reloadData];
382-
383- nCenter = [NSNotificationCenter defaultCenter];
384-
385- [nCenter addObserver:self
386+
387+ //AB 21 July 2010 - Add a 'Retrieve Creds Section'
388+ credentialsButton = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CredentialsButton"];
389+ credentialsButton.textLabel.text = NSLocalizedString(@"Retrieve My Credentials...",@"Credentials button in AccountView.mm");
390+ credentialsButton.textLabel.textAlignment = UITextAlignmentCenter;
391+
392+ [self loadCredentials];
393+ //
394+
395+ [self.tableView reloadData];
396+
397+ [[NSNotificationCenter defaultCenter] addObserver:self
398 selector:@selector(stopWaitingAnimation:)
399 name:@LOGIN_END_NOTIFICATION
400 object:nil];
401@@ -280,7 +287,7 @@
402 break;
403 }
404 }else{
405-
406+#if 0 //AB 21 July 2010 - Add a 'Retrieve Creds Section'
407 switch (indexPath.row) {
408 case 0:
409 return URLParameter;
410@@ -291,6 +298,22 @@
411 default:
412 break;
413 }
414+#endif
415+ if (0 == indexPath.section) {
416+ switch (indexPath.row) {
417+ case 0:
418+ return URLParameter;
419+ case 1:
420+ return usernameParameter;
421+ case 2:
422+ return passwordParameter;
423+ default:
424+ break;
425+ }
426+ }else if (1 == indexPath.section){
427+ return credentialsButton;
428+ }
429+
430 }
431 return nil;
432 }
433@@ -299,7 +322,14 @@
434 if([self isPortal]){
435 return 2;
436 }else{
437+#if 0 //AB 21 July 2010 - Add a 'Retrieve Creds Section'
438 return 3;
439+#endif
440+ if (0 == section){
441+ return 3;
442+ }else{
443+ return 1;
444+ }
445 }
446 }
447
448@@ -314,46 +344,55 @@
449 }
450
451 - (NSInteger)numberOfSectionsInTableView:(UITableView *)accountTable {
452+#if 0 //AB 21 July 2010 - Add a 'Retrieve Creds Section'
453 return 1;
454-}
455-
456-- (BOOL) isPortal{
457- return FALSE;
458-}
459-
460-- (void)URLValueEditedAction:(id)sender
461-{
462- StringBuffer val;
463- val = [URLValue.text UTF8String];
464- val.replaceAll("%", "");
465- [URLValue setText:[[NSString alloc] initWithUTF8String:val.c_str()]];
466- [[FunambolAPI getInstance] saveURLConfig:URLValue.text];
467-}
468-
469-- (void)usernameValueEditedAction:(id)sender
470-{
471- if([usernameValue.text isEqualToString:@""]){
472- usernameValue.placeholder = @"username";
473- }else{
474-
475- }
476-
477- [[FunambolAPI getInstance] saveUsernameConfig:usernameValue.text];
478-}
479-
480-- (void)passwordValueEditedAction:(id)sender
481-{
482- if([passwordValue.text isEqualToString:@""]){
483- passwordValue.placeholder = @"password";
484- }else{
485- }
486-
487- [[FunambolAPI getInstance] savePasswordConfig:passwordValue.text];
488+#endif
489+ return 2;
490+}
491+
492+//AB 21 July 2010 - Add a 'Retrieve Creds Section'
493+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
494+{
495+ if (1 == indexPath.section && 0 == indexPath.row)
496+ {
497+ NSURL *credentialsURL = [NSURL URLWithString:@"http://structlab.com/u1.html"];
498+ [tableView deselectRowAtIndexPath:indexPath animated:YES];
499+ [[UIApplication sharedApplication] openURL:credentialsURL];
500+ }
501+}
502+
503+#pragma mark -
504+#pragma mark UITextFieldDelegate
505+
506+- (BOOL)textFieldShouldReturn:(UITextField *)textField{
507+ if (URLValue == textField){
508+
509+ //AB: I'm trying to figure out if this method is doing something spectacularly
510+ //clever that my total lack of C++-fu is unable to figure out, or if this is
511+ //actually just ripping out instances of the % character.
512+ StringBuffer val;
513+ val = [URLValue.text UTF8String];
514+ val.replaceAll("%", "");
515+ [URLValue setText:[[NSString alloc] initWithUTF8String:val.c_str()]];
516+ [[FunambolAPI getInstance] saveURLConfig:URLValue.text];
517+ [usernameValue becomeFirstResponder];
518+
519+ }else if(usernameValue == textField){
520+
521+ [[FunambolAPI getInstance] saveUsernameConfig:usernameValue.text];
522+ [passwordValue becomeFirstResponder];
523+
524+ }else if(passwordValue == textField){
525+
526+ [[FunambolAPI getInstance] savePasswordConfig:passwordValue.text];
527+ [passwordValue resignFirstResponder];
528+
529+ }
530+ return YES;
531 }
532
533 - (void)dealloc {
534 // TODO dealloc all items
535- [accountTable release];
536
537 [URLValue release];
538 [usernameValue release];
539
540=== modified file 'iPhoneApp/UI/src/main.mm'
541--- iPhoneApp/UI/src/main.mm 2010-07-22 20:21:36 +0000
542+++ iPhoneApp/UI/src/main.mm 2010-07-26 21:44:45 +0000
543@@ -70,6 +70,7 @@
544 NSURL *url = (NSURL*)[launchOptions valueForKey: UIApplicationLaunchOptionsURLKey] ;
545 if (url) {
546 credentials = [url absoluteString];
547+ NSLog(@"CREDS: %@", credentials);
548 }
549 }
550
551
552=== modified file 'iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj'
553--- iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj 2010-07-22 20:21:36 +0000
554+++ iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj 2010-07-26 21:44:45 +0000
555@@ -24,6 +24,10 @@
556 7C9F581B0DAF5C50007E0091 /* UIController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F57E90DAF5C50007E0091 /* UIController.mm */; };
557 7C9F59500DAF67B9007E0091 /* stringUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F594F0DAF67B9007E0091 /* stringUtils.cpp */; };
558 7C9F59620DAF683B007E0091 /* AddressBookSyncSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F59610DAF683B007E0091 /* AddressBookSyncSource.cpp */; };
559+ 930D5A6A11F9FB8800DD6D06 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 930D5A6611F9FB8800DD6D06 /* Default.png */; };
560+ 930D5A6B11F9FB8800DD6D06 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 930D5A6711F9FB8800DD6D06 /* Default@2x.png */; };
561+ 930D5A6C11F9FB8800DD6D06 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 930D5A6811F9FB8800DD6D06 /* Icon.png */; };
562+ 930D5A6D11F9FB8800DD6D06 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 930D5A6911F9FB8800DD6D06 /* Icon@2x.png */; };
563 AB2107D30DE1C5820026FA2F /* FunambolAPIWrapperImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB2107D20DE1C5820026FA2F /* FunambolAPIWrapperImpl.cpp */; };
564 AB33A9900E5AD6750098F0A2 /* TimeUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB33A98D0E5AD6750098F0A2 /* TimeUtils.mm */; };
565 AB33AA930E5AE0460098F0A2 /* icon_sync_154x154_frame01.png in Resources */ = {isa = PBXBuildFile; fileRef = AB33AA830E5AE0460098F0A2 /* icon_sync_154x154_frame01.png */; };
566@@ -144,6 +148,10 @@
567 7C9F59600DAF683B007E0091 /* AddressBookSyncSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressBookSyncSource.h; sourceTree = "<group>"; };
568 7C9F59610DAF683B007E0091 /* AddressBookSyncSource.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = AddressBookSyncSource.cpp; sourceTree = "<group>"; };
569 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
570+ 930D5A6611F9FB8800DD6D06 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
571+ 930D5A6711F9FB8800DD6D06 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
572+ 930D5A6811F9FB8800DD6D06 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
573+ 930D5A6911F9FB8800DD6D06 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
574 AB084D3F0E7576CA008FDF08 /* Date.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Date.h; sourceTree = "<group>"; };
575 AB2107D10DE1C57A0026FA2F /* FunambolAPIWrapperImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FunambolAPIWrapperImpl.h; sourceTree = "<group>"; };
576 AB2107D20DE1C5820026FA2F /* FunambolAPIWrapperImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunambolAPIWrapperImpl.cpp; sourceTree = "<group>"; };
577@@ -265,6 +273,10 @@
578 29B97317FDCFA39411CA2CEA /* Resources */ = {
579 isa = PBXGroup;
580 children = (
581+ 930D5A6611F9FB8800DD6D06 /* Default.png */,
582+ 930D5A6711F9FB8800DD6D06 /* Default@2x.png */,
583+ 930D5A6811F9FB8800DD6D06 /* Icon.png */,
584+ 930D5A6911F9FB8800DD6D06 /* Icon@2x.png */,
585 ABA164000D9178CF0033F591 /* icons */,
586 8D1107310486CEB800E47090 /* Info.plist */,
587 AB3785B90E5AF345003E51F8 /* dist.plist */,
588@@ -610,6 +622,10 @@
589 AB33AAA20E5AE0460098F0A2 /* icon_sync_154x154_frame16.png in Resources */,
590 AB3785BA0E5AF345003E51F8 /* dist.plist in Resources */,
591 ABBF2921104BCE15004A9F09 /* Localizable.strings in Resources */,
592+ 930D5A6A11F9FB8800DD6D06 /* Default.png in Resources */,
593+ 930D5A6B11F9FB8800DD6D06 /* Default@2x.png in Resources */,
594+ 930D5A6C11F9FB8800DD6D06 /* Icon.png in Resources */,
595+ 930D5A6D11F9FB8800DD6D06 /* Icon@2x.png in Resources */,
596 );
597 runOnlyForDeploymentPostprocessing = 0;
598 };
599@@ -666,7 +682,7 @@
600 isa = XCBuildConfiguration;
601 buildSettings = {
602 ALWAYS_SEARCH_USER_PATHS = YES;
603- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Matteo Vitolo";
604+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Aaron Brethorst (F47V3NDKL2)";
605 COPY_PHASE_STRIP = NO;
606 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
607 FRAMEWORK_SEARCH_PATHS = "$(inherited)";
608@@ -712,7 +728,7 @@
609 );
610 PREBINDING = NO;
611 PRODUCT_NAME = Funambol;
612- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "87F25073-C3B8-4832-A6EA-3861F52C8E73";
613+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "593A3158-7296-4E4E-9F26-663515C90E99";
614 SDKROOT = iphoneos4.0;
615 TARGETED_DEVICE_FAMILY = 1;
616 };
617@@ -848,8 +864,8 @@
618 buildSettings = {
619 ALWAYS_SEARCH_USER_PATHS = YES;
620 ARCHS = "$(ARCHS_STANDARD_32_BIT)";
621- CODE_SIGN_ENTITLEMENTS = dist.plist;
622- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Matteo Vitolo";
623+ CODE_SIGN_ENTITLEMENTS = "";
624+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Aaron Brethorst (F47V3NDKL2)";
625 CURRENT_PROJECT_VERSION = 0.8.2;
626 GCC_C_LANGUAGE_STANDARD = c99;
627 GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp;
628@@ -867,7 +883,7 @@
629 );
630 ONLY_ACTIVE_ARCH = NO;
631 PREBINDING = NO;
632- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "87F25073-C3B8-4832-A6EA-3861F52C8E73";
633+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "593A3158-7296-4E4E-9F26-663515C90E99";
634 SDKROOT = iphoneos4.0;
635 STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = dynamic;
636 STRIP_STYLE = all;

Subscribers

People subscribed via source and target branches

to all changes: