Post

Replies

Boosts

Views

Activity

Reply to Observation feedback loop on simple Map() view declaration
I'm facing a similar issue in my project. Upon launching the app I'm getting similar Layout invalidations as @Jokerjko - except relating to my UIWindow Map is not yet present anywhere in view hierarchy at this point, however as soon as I open a screen containing a Map(selection:scope:), the app hangs indefinitely, hammering a single core, and leaking memory: going up to over 1 gig within two minutes. Using Instruments I was able to track most of the activity to MKMapView _updateAttribution (with _layoutAttribution taking up 90% of the cpu time), followed by MKMapView _setPreferredConfiguration:onInit: _updateCartographicConfigurationOnInit: Observable object key path '\_UICornerProvider.<computed 0x000000018527ffd8 (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <_MapKit_SwiftUI._SwiftUIMKMapView: 0x107909c00; frame = (0 0; 440 873); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x600000cc4ed0>> Observable object key path '\_UICornerProvider.<computed 0x000000018527ffd8 (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <_TtGC7SwiftUI21UIKitPlatformViewHostGVS_P10$1d9259ab432PlatformViewRepresentableAdaptorGV15_MapKit_SwiftUI15MapBridgingViewV10Foundation4UUIDOs5Never___: 0x11e293d90; baseClass = _TtGC5UIKit22UICorePlatformViewHostGV7SwiftUIP10$1d9259ab432PlatformViewRepresentableAdaptorGV15_MapKit_SwiftUI15MapBridgingViewV10Foundation4UUIDOs5Never___; frame = (0 0; 440 873); anchorPoint = (0, 0); tintColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x600000cf4cc0>> Observable object key path '\_UICornerProvider.<computed 0x000000018527ffd8 (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <_MapKit_SwiftUI._SwiftUIMKMapView: 0x107909c00; frame = (0 0; 440 873); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x600000cc4ed0>> Observable object key path '\_UICornerProvider.<computed 0x000000018527ffd8 (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <_MapKit_SwiftUI._SwiftUIMKMapView: 0x107909c00; frame = (0 0; 440 873); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x600000cc4ed0>> Observable object key path '\_UICornerProvider.<computed 0x000000018527ffd8 (Optional<UICoordinateSpace>)>' changed; performing invalidation for [layout] of: <_MapKit_SwiftUI._SwiftUIMKMapView: 0x107909c00; frame = (0 0; 440 873); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x600000cc4ed0>> Tested on both Xcode 26 beta 3, and Xcode 16.4, on iOS Simulator 26.0 (23A5287g) and iPhone 15 Pro Max running iOS 26.0 (23A5297i).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25