Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>the code seems to be ok!<br> anyway, you could replace the first line with this one to see if it works or not:</p> <pre><code>NSString *token = [[[NSUserDefaults standardUserDefaults] objectForKey:TRELLOTOKEN] description]; </code></pre> <p>this is just a thought and it may be the case or not! my thought is the method you used is returning <code>(id)</code>, which is OK to pass it to <code>NSString</code>, it should work as it is working in the output of <code>NSLog</code> message (and the previous operating systems). the description method just returns <code>(NSString *)</code> which is the same kind of the token object. <code>(id)</code> is dynamic typing and may cause some problems. It's good to write code the way you tell that you want exactly to return <code>NSString</code>!<br> by the way, <code>[[NSUserDefaults standardUserDefaults] objectForKey:TRELLOTOKEN]</code> may return <code>nil</code> (depending on the logic of your code!). so it's best practice to use it like this:</p> <pre><code>NSString *token; NSObject *tokenObj = [[NSUserDefaults standardUserDefaults] objectForKey:TRELLOTOKEN]; if (token != nil) { token = [tokenObj description]; } else { token = @""; } NSString *urlString = [NSString stringWithFormat:@"/1/cards/%@/idList?value=%@&amp;key=%@&amp;token=%@", taskID, DOINGLISTID, TRELLOKEY, token]; NSURL *url = [NSURL URLWithString:urlString relativeToURL:[NSURL URLWithString:TRELLOLOGENDPOINT]]; NSLog(@"URL: %@", url); </code></pre> <p>hope to solve your dilemma! ;) </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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