Note that there are some explanatory texts on larger screens.

plurals
  1. POMessage wont connect to method
    text
    copied!<p>I'm kind of new to this, so it might be a beginners mistake. The problem is that when i send a message to a method it doesn't connect.</p> <p>Here's the calling method:</p> <pre><code>-(BOOL) login:(LoginInfo *) info{ NSString *url = [NSString stringWithFormat:@"%@/%@?name=%@&amp;password=%@", FAMORABLE_API_URL,FAMORABLE_API_ACTION_LOGIN, info.username, info.password]; NSDictionary* json = [self getJson:url]; NSString *token = [json objectForKey:@"Token"]; NSLog(@"results: %@", token); LoginInfo *loginResult = [LoginInfo alloc]; loginResult.token = token; //TODO NSLog(@"test 1 %@", loginResult.token); [clientService saveLoginInfo:loginResult]; return YES; } </code></pre> <p>On the line above the last you can see I'm sending to saveLoginInfo in clientService which is declared in ClientService.h which is imported in this file.</p> <pre><code>-(void) saveLoginInfo:(LoginInfo *)info{ NSLog(@"test 2 %@", info); NSLog(@"test 3%@", info.token); NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:info.token forKey:KEY_TOKEN]; NSString *string = [defaults stringForKey:KEY_TOKEN]; NSLog(@"test 4%@", string); // save it [defaults synchronize]; if (!(info.token)){ self.currentUser = nil; self.isLoggedOn=false; }else{ self.currentUser = info; self.isLoggedOn=true; } } </code></pre> <p>This is the method being called. I've put out a bunch of logs, mostly as a safe if i did one wrong, but none of them are being executed...</p> <p>Do you have any ideas of what might be wrong?</p> <p>Thanks in advance Tom</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload