Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bissal Pushen zwecksn Keychain

  • Loading branch information...
commit a75942044b50ad95cb737bc135e6505e40bdec5b 1 parent a21d914
Philip Messlehner authored
30 Classes/SettingsSyncViewController.m
View
@@ -58,17 +58,36 @@ - (void)dealloc {
}
- (void)saveSettings {
- NSError *error;
+ NSError *error=nil;
if([self.settings.useTDSync intValue] == 1) {
[SFHFKeychainUtils deleteItemForUsername:self.settings.tdEmail andServiceName:@"Less2DoToodleDoAccount" error:&error];
}
+ if (error != nil) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
+ message:@"Error with Keychain during delete"
+ delegate:self
+ cancelButtonTitle:@"Ok"
+ otherButtonTitles:nil];
+ [alert show];
+ [alert release];
+ }
+ error = nil;
if([self.eMail.text length]!=0) {
[SFHFKeychainUtils storeUsername:[self.eMail text]
andPassword:[self.password text]
forServiceName:@"Less2DoToodleDoAccount"
updateExisting:YES
error:&error];
+ if (error != nil) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
+ message:@"Error with Keychain during save"
+ delegate:self
+ cancelButtonTitle:@"Ok"
+ otherButtonTitles:nil];
+ [alert show];
+ [alert release];
+ }
self.settings.tdEmail = [self.eMail text];
self.settings.useTDSync = [NSNumber numberWithInt:1];
self.settings.preferToodleDo = self.preferToodleDo.on == YES ? [NSNumber numberWithInt:1] : [NSNumber numberWithInt:0];
@@ -134,6 +153,15 @@ - (IBAction)forceRemoteToLocalSync:(id)sender {
- (IBAction)unlinkAccount:(id)sender {
NSError *error;
[SFHFKeychainUtils deleteItemForUsername:self.settings.tdEmail andServiceName:@"Less2DoToodleDoAccount" error:&error];
+ if (error != nil) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
+ message:@"Error with Keychain during delete"
+ delegate:self
+ cancelButtonTitle:@"Ok"
+ otherButtonTitles:nil];
+ [alert show];
+ [alert release];
+ }
self.settings.useTDSync = [NSNumber numberWithInt:0];
self.eMail.text = @"";
self.password.text = @"";
6 Less2Do.xcodeproj/project.pbxproj
View
@@ -768,7 +768,7 @@
39B659F910B7080D00825C1D /* Products */ = {
isa = PBXGroup;
children = (
- 39B65A0110B7080D00825C1D /* liblibToodledoAPI.a */,
+ 39B65A0110B7080D00825C1D /* libToodledoAPI.a */,
39F5AFCA10ED19AF00E54EB1 /* libToodledoAPIMac.a */,
39B65A0310B7080D00825C1D /* UnitTests.octest */,
39F5AFCC10ED19AF00E54EB1 /* liblibToodledoAPIiPhone.a */,
@@ -1019,10 +1019,10 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
- 39B65A0110B7080D00825C1D /* liblibToodledoAPI.a */ = {
+ 39B65A0110B7080D00825C1D /* libToodledoAPI.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
- path = liblibToodledoAPI.a;
+ path = libToodledoAPI.a;
remoteRef = 39B65A0010B7080D00825C1D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
Please sign in to comment.
Something went wrong with that request. Please try again.