Beer-Drinkin icon indicating copy to clipboard operation
Beer-Drinkin copied to clipboard

Fetch never happens

Open gdignard opened this issue 9 years ago • 4 comments

AppDelegate.SetMinimumBackgroundFetchInterval() doesn't seem to ever get invoked (and the default fetch interval is UIApplication.BackgroundFetchIntervalNever)

gdignard avatar Jun 03 '16 16:06 gdignard

Hey, thanks for taking the time to log an issue. I've not noticed this myself but will double check. Are you testing on the simulator or a real device?

MikeCodesDotNET avatar Jun 07 '16 15:06 MikeCodesDotNET

Actually, I was just looking around for sample code, found this and was looking to understand exactly when I needed to initialize the fetch interval.

FinishedLaunching was where I presumed it would be, but I didn't see it there so I grabbed a copy and had VS do a solution search for the term and it didn't find any calls either to your method or to the OS (other than from your method).

The Apple Documentation said the fetch didn't happen unless it was initialized so it was then that I posted what I'd found. And my thanks to you for taking the time to post the project! :-)

Unfortunately, I only had a small window to monkey with this stuff and didn't actually get it to work in my own test project and got pulled back into the main project before I had a chance to figure out why my own fetch isn't triggering.

On Tue, Jun 7, 2016 at 11:34 AM, Mike James [email protected] wrote:

Hey, thanks for taking the time to log an issue. I've not noticed this myself but will double check. Are you testing on the simulator or a real device?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MikeCodesDotNet/BeerDrinkin/issues/9#issuecomment-224319571, or mute the thread https://github.com/notifications/unsubscribe/AFgtjo6GzWJUto75okQzlUocWyLCcb89ks5qJY-YgaJpZM4IttCW .

gdignard avatar Jun 07 '16 15:06 gdignard

Quick question, are you testing this on the simulator or a real device?

MikeCodesDotNET avatar Jun 11 '16 16:06 MikeCodesDotNET

I based the code in my app on the code in BeerDrinkin, but made the call to

UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(MINIMUM_BACKGROUND_FETCH_INTERVAL)

in AppDelegate.FinishedLaunching(...)

Tested on a device (iPhone 6s). My PerformFetch implementation included a logger and nothing ever was added to the log, and based on that, I'm presuming that it never got triggered. Haven't had a chance to explore further.

Again, though, the specific bug I was pointing out here was that in the BeerDrinkin, the call to SetMinimumBackgroundFetchInterval never happens.

gdignard avatar Jun 11 '16 17:06 gdignard