Running URL Requests in the Background

前端 未结 3 1301
面向向阳花
面向向阳花 2021-01-28 07:02

I want to make url request in a certain time interval (e.g. every 10 minutes app should make a url call and get some json data). App should be able to do this when running in ba

3条回答
  •  -上瘾入骨i
    2021-01-28 07:28

    I think there are some restrictions in iOS, You can not continuously send the request when app is in Background mode. iOS allows a little time to finish the web request when App is going to background mode. please check this Apple Documentation: https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/beginBackgroundTaskWithExpirationHandler:/

提交回复
热议问题