Post

Replies

Boosts

Views

Activity

Removing NSPersistentHistoryTrackingKey causes error.
So when I turn off NSPersistentHistoryTrackingKey I get this error then the App Crashes:error: Store opened without NSPersistentHistoryTrackingKey but previously had been opened with NSPersistentHistoryTrackingKey - Forcing into Read Only mode store at ...CoreData: error: Store opened without NSPersistentHistoryTrackingKey but previously had been opened with NSPersistentHistoryTrackingKey - Forcing into Read Only mode store at...error: (8) attempt to write a readonly databaseCoreData: error: (8) attempt to write a readonly databaseFile is in Read Only mode due to Persistent History being detected but NSPersistentHistoryTrackingKey was not includedHow do I turn it off without having this happen?Ray
3
0
2.5k
Mar ’20
SwiftUI unintentional Root View navigation from sheetView
I'm having an issue where when I am in a nested navigation view and use a popup view to add a core data object where when I dismiss the view instead of going 1 view back it goes to the root view. I've tried many ways to dismiss the view. I have tried different ways of calling the popup view including: Dismissing view: @Environment(\.presentationMode) var presentationModel then self.presentationMode.wrappedValue.dismiss() Calling and Dismissing view: @State var showAddObjectView = false .navigationBarItems(trailing: Button(action: {                 self.showAddObjectView.toggle()             }) {                 Image(systemName: "plus").imageScale(.large).font(Font.system(.body)).padding(15).accentColor(Color("BlackWhite"))             }.sheet(isPresented: $showAddObjectView) {                 AddMoodView(showAddMood: $showAddMood, person: person).environment(\.managedObjectContext, self.managedObjectContext)             }                          ) Then in the sheet view: @Binding var showAddObjectView: Bool Then on the save button: self.showAddMood = false Navigation work but instead of just going back one view it goes back to the root view. This is frustrating especially when you are 5 views in and just want to go back one view.
0
0
637
Feb ’21