NSURLSession with NSBlockOperation and queues

The harshest criticisms of synchronous network requests are reserved for those who do it from the main queue (as we know that one should never block the main queue). But you’re doing it on your own background queue, which addresses the most egregious problem with synchronous requests. But you’re losing some wonderful features that asynchronous … Read more

How do I create a NSTimer on a background thread?

If you need this so timers still run when you scroll your views (or maps), you need to schedule them on different run loop mode. Replace your current timer: [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(timerFired:) userInfo:nil repeats:YES]; With this one: NSTimer *timer = [NSTimer timerWithTimeInterval:0.5 target:self selector:@selector(timerFired:) userInfo:nil repeats:YES]; [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; For details, check this … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)