googlemaps / googlemaps/google-maps-ios-utils
GMUDefaultClusterRenderer uses UIView API off main thread
- Dominant language
- Objective-C
- Stars
- 778
- Forks
- 441
- PR merge metrics
- No merged PRs in 30d
Description
Calling GMUClusterManager.cluster() from a background queue causes UIKit violations due to GMUDefaultClusterRenderer internally accessing UIView and CALayer properties off the main thread.
Steps to Reproduce:
1. Use GMUDefaultClusterRenderer in a Swift app
2. Call .cluster() from a background queue
3. Observe runtime warnings:
• -[UIView bounds] must be used from main thread only
• -[UIView layer] must be used from main thread only
Suggested Fix:
Ensure all UIKit access in GMUDefaultClusterRenderer is performed on the main thread, or document that .cluster() must be called on the main thread when using GMUDefaultClusterRenderer.
Contributor guide
Assessment
This issue has not been assessed yet.