Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variable suddenly removed
- - (void)checkIfPreviouslyLoggedIn:(BOOL)didLogin andLogin:(BOOL)doLogin {
- // some logic to get it out of the keychain
- NSLog(@"checkIfPreviouslyLggedIn: ACCOUNT %@ / %@", tmpUsername, tmpPassword);
- // RETURN: checkIfPreviouslyLggedIn: ACCOUNT /
- }
- - (void)loginWithUsername:(NSString *)username andPassword:(NSString *)password {
- NSLog(@"loginWithUsername: ACCOUNT %@ / %@", username, password);
- // RETURN: loginWithUsername: ACCOUNT testUser / password
- // save it for later use
- _username = username;
- _password = password;
- NSLog(@"loginWithUsername: ACCOUNT %@ / %@", _username, _password);
- // RETURN: loginWithUsername: ACCOUNT testUser / password
- // Attach a notification handler
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginCheck:) name:@"LoginCheck" object:nil];
- // call the web API
- [self doRequestFromLocation:@"/groups" withPostType:@"GET" andData:nil whichTriggersNotification:@"LoginCheck"];
- }
- - (void)doRequestFromLocation:(NSString *)location withPostType:(NSString *)type andData:(NSData *)data whichTriggersNotification:(NSString *)notification {
- NSLog(@"doRequestFromLocation: ACCOUNT %@ / %@", _username, _password);
- // RETURN: doRequestFromLocation: ACCOUNT testUser / password
- }
- NSLog(@"doRequest: ACCOUNT %@ / %@", _username, _password);
- - (void)loginCheck:(NSNotification *)notification {
- NSLog(@"loginCheck: ACCOUNT %@ / %@", _username, _password);
- }
- // save it for later use
- _username = username;
- _password = password;
- self._username = username;
- self._password = password;
- @property (nonatomic, retain) NSString * _username;
- @property (nonatomic, retain) NSString * _password;
Add Comment
Please, Sign In to add comment