I have an issue with NSURLSession
. My iOS8 iPhone app relies on this class in order to fetch data from a server continuously (every 5 - 10 seconds). So I create a session object when I init a custom controller designed to interact with the server. This is what I do:
override init() {
super.init()
var configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(thisSessionIdentifier)
session = NSURLSession(configuration: configuration, delegate:self, delegateQueue:NSOperationQueue.mainQueue())
...
}
Everything was working fine until yesterday. Today the call to the NSURLSession
simply blocks the app completely when I test it on a physical iPhone 6.
This does not happen on the simulator.
Uninstalling the app and reinstalling it again (even with a different bundle id) doesn't solve the issue.
Anybody with some clue?