1

I added the following method to my app delegate and enabled background fetch in capabilities:

-(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{

NSLog(@"Background fetch started...");
completionHandler(UIBackgroundFetchResultNewData);
NSLog(@"Background fetch completed...");
}

When I run my app on my device and go to Debug-> Simulate Background Fetch, the background fetch ran twice. It works fine on the simulator. Is this a bug or I'm doing something wrong? Is there any workaround?

iamarnold
  • 705
  • 1
  • 8
  • 22
  • 1
    This is a bug with iOS 9, but this post helped me find a workaround when I ran into this problem.: http://stackoverflow.com/questions/33105744/performfetchwithcompletionhandler-called-twice-when-simulating-with-xcode – MSU_Bulldog Jan 22 '16 at 20:33

0 Answers0