vdhamer / Photo-Club-Hub

iOS app for showcasing and viewing portfolios with curated fine-art photographic images.
MIT License
13 stars 1 forks source link

“Performing I/O on the main thread can cause hangs.” #421

Closed vdhamer closed 3 months ago

vdhamer commented 3 months ago

Performing I/O on the main thread can cause hangs. Messages only seen once in the debugger. Seems to be a feature of new Xcode 16.

@MainActor
@Observable
class LocationManager {
    var location: CLLocation?

    private let locationManager = CLLocationManager()

CoreLocation is covered in the WWDC24 Swift 6 talk with associated sample code. Seems to be a concurrency aware API for CoreLocation.

vdhamer commented 3 months ago

I don’t see the issue anymore on iOS 18.x betas.