Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch never happens #9

Open
gdignard opened this issue Jun 3, 2016 · 4 comments
Open

Fetch never happens #9

gdignard opened this issue Jun 3, 2016 · 4 comments
Assignees

Comments

@gdignard
Copy link

gdignard commented Jun 3, 2016

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

@MikeCodesDotNET
Copy link
Owner

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?

@gdignard
Copy link
Author

gdignard commented Jun 7, 2016

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
#9 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFgtjo6GzWJUto75okQzlUocWyLCcb89ks5qJY-YgaJpZM4IttCW
.

@MikeCodesDotNET
Copy link
Owner

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

@gdignard
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants