Guest User

Untitled

a guest
Sep 13th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. Variable suddenly removed
  2. - (void)checkIfPreviouslyLoggedIn:(BOOL)didLogin andLogin:(BOOL)doLogin {
  3. // some logic to get it out of the keychain
  4. NSLog(@"checkIfPreviouslyLggedIn: ACCOUNT %@ / %@", tmpUsername, tmpPassword);
  5.  
  6. // RETURN: checkIfPreviouslyLggedIn: ACCOUNT /
  7. }
  8.  
  9. - (void)loginWithUsername:(NSString *)username andPassword:(NSString *)password {
  10. NSLog(@"loginWithUsername: ACCOUNT %@ / %@", username, password);
  11. // RETURN: loginWithUsername: ACCOUNT testUser / password
  12.  
  13. // save it for later use
  14. _username = username;
  15. _password = password;
  16.  
  17. NSLog(@"loginWithUsername: ACCOUNT %@ / %@", _username, _password);
  18. // RETURN: loginWithUsername: ACCOUNT testUser / password
  19.  
  20. // Attach a notification handler
  21. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginCheck:) name:@"LoginCheck" object:nil];
  22.  
  23. // call the web API
  24. [self doRequestFromLocation:@"/groups" withPostType:@"GET" andData:nil whichTriggersNotification:@"LoginCheck"];
  25. }
  26.  
  27. - (void)doRequestFromLocation:(NSString *)location withPostType:(NSString *)type andData:(NSData *)data whichTriggersNotification:(NSString *)notification {
  28. NSLog(@"doRequestFromLocation: ACCOUNT %@ / %@", _username, _password);
  29. // RETURN: doRequestFromLocation: ACCOUNT testUser / password
  30. }
  31.  
  32. NSLog(@"doRequest: ACCOUNT %@ / %@", _username, _password);
  33.  
  34. - (void)loginCheck:(NSNotification *)notification {
  35. NSLog(@"loginCheck: ACCOUNT %@ / %@", _username, _password);
  36. }
  37.  
  38. // save it for later use
  39. _username = username;
  40. _password = password;
  41.  
  42. self._username = username;
  43. self._password = password;
  44.  
  45. @property (nonatomic, retain) NSString * _username;
  46. @property (nonatomic, retain) NSString * _password;
Add Comment
Please, Sign In to add comment