NSURLSession dataTaskForRequest:completion: unrecognized selector sent to instance
You have to init URLSession with a configuration: URLSession(configuration: .default) or use shared session URLSession.shared
You have to init URLSession with a configuration: URLSession(configuration: .default) or use shared session URLSession.shared
It looks like you’re not memory managing the view controller properly and it is being deallocated at some point – which causes the numberButtonClicked: method to be sent to another object that is now occupying the memory that the view controller was previously occupying… Make sure you’re properly retaining/releasing your view controller.