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

Fix infinite loop when monitoring regions when exceeding maximums #1286

Merged
merged 2 commits into from Nov 20, 2020

Conversation

zacwest
Copy link
Member

@zacwest zacwest commented Nov 20, 2020

At least on iOS 13 and 14, initially monitoring a region causes the system to always fire a did-change-state delegate method for that zone. When users exceed the 20 region threshold, the delegate firing can cause us to bounce back and forth between sets of zones that we want to monitor, and each chain can cause another set of updates to occur. This is especially apparent for users using the iCloud3 integration which creates a multitude of 1m zones.

Fixes #1267

At least on iOS 13 and 14, initially monitoring a region causes the system to always fire a did-change-state delegate method for that zone. When users exceed the 20 region threshold, the delegate firing can cause us to bounce back and forth between sets of zones that we want to monitor, and each chain can cause another set of updates to occur. This is especially apparent for users using the iCloud3 integration which creates a multitude of 1m zones.
@zacwest zacwest merged commit 8d6f78e into master Nov 20, 2020
@zacwest zacwest deleted the monitor-update branch November 20, 2020 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monitor region updating occurs in response to monitored region creation/ending events
2 participants