I've got an SFAuthoizationView I'm using in my app and I'm trying to call the authorize method from my code to prompt the user to authorize if they currently are not authorized.
My issue is that this method does not seem to work!
My code is as follows, where authView
is the SFAuthorizationView
and authorizeMe is the method that gets called when a button is clicked (and the log message does show, so I know it's getting called).
If the lock is locked the authorize message just returns false and does not seem to prompt the user for a password.
Does anybody know what's up with this?
- (void) mainViewDidLoad {
[authView setDelegate:self];
[authView setString:"Test String"];
[authView setAutoupdate:YES];
}
- (IBAction)authorizeMe:(id)sender {
NSLog(@"Authorizing...");
[authView authorize:authView];
}
- (void)authorizationViewDidAuthorize:(SFAuthorizationView *)view {
self.enabled = YES;
}
- (void)authorizationViewDidDeauthorize:(SFAuthorizationView *)view {
self.enabled = NO;
}