background-fetch

how to call function after every 1 hour?(Swift). Background fetch work when app is terminated?

谁都会走 提交于 2019-11-29 07:15:40
i am making app. which providing functionality of fetch data after every one hour. so even when my app terminate how can i call that function? after too much searching i found Background fetching by performFetchWithCompletionHandler but i want to know that this function will work if my app is terminated?what i mean is if my app is in closed or terminated state how can i call function automatically? You can't do anything if your app is in terminated state. Apple is not allowing anything (except receiving notification) in terminated or closed state. You are also restricted for background

iOS10 Background fetch

ぐ巨炮叔叔 提交于 2019-11-29 01:54:40
I have tried to implement background fetch, to hopefully can wake the app from time to time. I have done these: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { application.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum) return true } func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { debugPrint("performFetchWithCompletionHandler") getData() completionHandler

How to troubleshoot iOS background app fetch not working?

被刻印的时光 ゝ 提交于 2019-11-28 17:08:29
问题 I am trying to get iOS background app fetch to work in my app. While testing in Xcode it works, when running on the device it doesn't! My test device is running iOS 9.3.5 (my deployment target is 7.1) I have enabled "Background fetch" under "Background modes" under "Capabilities" on the target in Xcode In application:didFinishLaunchingWithOptions I have tried various intervals with setMinimumBackgroundFetchInterval, including UIApplicationBackgroundFetchIntervalMinimum - (BOOL)application:

iOS background fetch

心不动则不痛 提交于 2019-11-28 02:09:57
问题 I'm little bit confused with background fetch. I read in Apple Developer documentation that fetch happens when OS decides that it should, user can't control background fetch, while on Apple Developer forum post by Apple employee says that if user kills app (double tap on home and button swipe up) background fetch wont happen, in that case user can control background fetch. So can someone please clarify to me if user kills the app with task manager will background fetch still continue in the

iOS11 swift silent push (background fetch, didReceiveRemoteNotification) is not working anymore

让人想犯罪 __ 提交于 2019-11-27 08:29:32
I was hoping that the iOS11 release will fix the silent push issue, which was in the latest betas and GM version of iOS. Currently I'm struggling to understand, why I don't receive any silent push messages, which should actually wake up my app to perform some needed tasks in the background. In iOS 10 I just use the background fetch capability and implemented the 'wake-up-code' in my AppDelegate like the code below. In iOS 11 the registering code is still working fine and my backend is also delivering the push notification to Apples DEV servers (sandbox) and also to the PROD servers (production