title: openURL method works with a string, but not with a variable holding the same string
body: <p>Edit: I figured out what was wrong, but can't post an answer yet since I am a new user. I will post my solution once I can.</p>
  
  <p>I am using this code to open a link in the iPhone's web browser:</p>
  
  <pre><code>NSString *url;
  NSLog(@"%d", [sender tag]);
  if([sender tag] == 0) 
      url = [approvedDict objectForKey:@"ig"];
  else if([sender tag] == 1) 
      url = [approvedDict objectForKey:@"yt"];
  else if([sender tag] == 2) 
      url = [approvedDict objectForKey:@"tw"];
  else if([sender tag] == 3) 
      url = [approvedDict objectForKey:@"pt"];
  else if([sender tag] == 4) 
      url = [approvedDict objectForKey:@"fb"];
  NSLog(@"%@", url);
  [[UIApplication sharedApplication] openURL:[NSURL URLWithString: url]];
  </code></pre>
  
  <p>When using this code (which is the target action of a button press), nothing happens. However, if I take the EXACT string given by <strong>NSLog(@"%@", url)</strong> and put it where "url" is in the last line it works. I'm stumped as to what is going on; anyone have any clue? Thanks.</p>