2
我有一个函数在60秒内发送一次HTTP请求,但是当我锁定手机时它会停止。那么,有没有办法在手机被锁定时发送HTTP请求? 我试过去做当应用程序在后台时发送http请求
func application(application: UIApplication, performFetchWithCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void)
但它没有奏效。
也许这是能够帮助你http://stackoverflow.com/questions/15749486/sending-an-http-post-request-on-ios – KSigWyatt