Post

Replies

Boosts

Views

Activity

Reply to SwiftUI MapKit - MapAnnotation - Publishing changes from within view updates is not allowed, this will cause undefined behavior.
Having this problem as well (Xcode 14.3 iOS 16.4). The problem only happens with MapAnnotation. Using MapMarker causes the purple warnings to go away. Another option to suppress the warnings is to use a constant value for the map's coordinateRegion binding. Not possible if you actually need the value but thought I'd post it here anyways. E.g., Use Map( coordinateRegion: .constant(mapRegion), // <-- use .constant(mapRegion) instead of $mapRegion annotationItems: items, ...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23
Reply to Xcode 26.1 RC issue
Confirmed settings wallpaper in simulator resolved the high CPU via ReportCrash.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Error when displaying Map() Annotation but not Marker
I'm having the same issue. It seems related to the same warning with the older API which is discussed here: https://developer.apple.com/forums/thread/718697 What is interesting is that if you use the old API on Xcode 15 beta 1 the warning goes away but if you use the new API it comes back :(
Replies
Boosts
Views
Activity
Jun ’23
Reply to SwiftUI MapKit - MapAnnotation - Publishing changes from within view updates is not allowed, this will cause undefined behavior.
Having this problem as well (Xcode 14.3 iOS 16.4). The problem only happens with MapAnnotation. Using MapMarker causes the purple warnings to go away. Another option to suppress the warnings is to use a constant value for the map's coordinateRegion binding. Not possible if you actually need the value but thought I'd post it here anyways. E.g., Use Map( coordinateRegion: .constant(mapRegion), // <-- use .constant(mapRegion) instead of $mapRegion annotationItems: items, ...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23