Search code examples
iosobjective-cjsonxcodedispatch

Undeclared identifier 'DISPATCH_QUEUE­_PRIORITY_DEFAULT'


I defined this:

#define kQueue dispatch_get_global_queue(DISPATCH_QUEUE­_PRIORITY_DEFAULT, 0)
#define kJSONUrl [NSURL URLWithString:@"https://www.facebook.com/feeds/page.php?id=403704786354846&format=json"]

and in the viewDidLoad:

dispatch_async(kQueue, ^{
    ...
});

but i get:

undeclared identifier "DISPATCH QUEUE­ PRIORITY DEFAULT"

Any ideas what may be causing this?


Solution

  • It's just a typo issue... There's an invisible character (it's a soft hyphen) between QUEUE and _

    When I copy/paste your DISPATCH_QUEUE­_PRIORITY_DEFAULT in a browser, here's the Google's result :

    https://www.google.fr/search?q=DISPATCH_QUEUE%C2%AD_PRIORITY_DEFAULT&etc...