performFetchWithCompletionHandler never gets fired
Solution 1:
Running your app in the iOS Simulator, in Xcode Debug mode, you can force a background fetch from the Xcode menu:
Debug > Simulate Background Fetch
May work for a tethered device, I haven't tried it recently.
Solution 2:
I'm afraid this is hard to debug on a device because you're not guaranteed it is called in the amount of time you specify.
setMinimumBackgroundFetchInterval
means that it is not called in an interval which is smaller than the value you specified. But there's no setMaximumBackgroundFetchInterval
.
So if iOS decides to call your app just once a day or even just once a week than it won't be called more often regardless your minimumBackgroundFetchInterval
. AFAIK iOS decides when to call performFetchWithCompletionHandler
measured by the pattern when and how often the users start the app.