Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Don't blacklist an app version because the app started in background #9

Closed
wants to merge 1 commit into from

Conversation

awwx
Copy link
Contributor

@awwx awwx commented Jul 20, 2016

On iOS the web app local server is careful to avoid blacklisting the app version just because the app transitioned into the background and Meteor startup didn't complete for that reason.

However, it's also possible for an app in iOS to start in the background when it receives a notification.

(See for example URLSessionDidFinishEventsForBackgroundURLSession).

This isn't caught by the "app did enter background" event because that's only called when the app transitions to the background.

This change adds a check so that the startup timer is only started if the app is in the foreground, avoiding blacklisting the app version because the app started in the background.

@martijnwalraven
Copy link
Contributor

martijnwalraven commented Oct 3, 2016

Thanks for the pull request, sorry it took me so long to merge. I've updated it for Swift 3 and I made a small change to the logic. Instead of never creating the timer, it is now not started when the app is in the background. But if the app is in the foreground when reloading the page at a later time, it will start as usual.

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

Successfully merging this pull request may close these issues.

None yet

2 participants