Esri / arcgis-maps-sdk-swift-toolkit

Mapping components that will simplify your Swift app development with the ArcGIS Maps SDK for Swift.
https://developers.arcgis.com/swift
Apache License 2.0
29 stars 7 forks source link

Remove `MainActor` restriction on `WorldScaleSceneView` initializer #650

Closed philium closed 5 months ago

philium commented 5 months ago

The attribute was added because the view model (which has the attribute) was being instantiated in the initializer, but it shouldn't have been. As specified in the doc, init(initialValue:) should not be called directly—state and state object properties should not be initialized in the enclosing object's initializer. This solves that problem and removes the MainActor attribute.