Post

Replies

Boosts

Views

Activity

Reply to Xcode 14: Publishing changes from within view updates
This code was producing the same warning: struct AreaMap: View {   @Binding var region: MKCoordinateRegion   var body: some View {     Map(coordinateRegion: $region)   } } Where region was passed in the initializer of AreaMap from its parent view. This resolved the issue: struct AreaMap: View {   @Binding var region: MKCoordinateRegion   var body: some View {     let binding = Binding(       get: { self.region },       set: { newValue in         DispatchQueue.main.async {           self.region = newValue         }       }     )     return Map(coordinateRegion: binding)   } }
Oct ’22
Reply to SwiftUI sheet dismiss warning
OK, moving the property from the ObservedObject to become a private view @State variable solves the issue. But, it was an @Publisehd inside an ObservedObject for a reason (being calculated from other conditions for example). So, no more @Published calculated properties?
Oct ’22
Reply to Xcode 11 crashes when opening the project
I had the same issue and used git status to check the modified files and found a file that was not expected to be modified: modified: <PROJECT_NAME>.xcworkspace/xcuserdata/tonyayoub.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist I checked out this file to undo any changes and this resolved my issue: git checkout <PROJECT_NAME>.xcworkspace/xcuserdata/tonyayoub.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist That's why deleting the whole xcuserdata folder as others suggest also resolves the issue.
Aug ’20