Thursday, April 20, 2023

Errordomain=NscocoaErrorDomain&ErrorMessage=Could Not Find The Specified Shortcut.&ErrorCode=4

Errordomain=NscocoaErrorDomain&ErrorMessage=Could Not Find The Specified Shortcut.&ErrorCode=4

Error Easily Fix It

Errordomain=NscocoaErrorDomain&ErrorMessage=Could Not Find The Specified Shortcut.&ErrorCode=4

var tempString = String()

for Rezept in alleRezepte { tempString += "\(Rezept.name), \(Rezept.description), \(Rezept.nutrients), \(Rezept.whatToDo)\n" } let dirs = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .allDomainsMask, true) as? [String]) let path = dirs?[0].appending("rezepte.csv") let url = URL(string: path!) do { try tempString.write(to: url!, atomically: true, encoding: String.Encoding.utf8) } catch { print(error) }

print("Daten gesichert")

No comments:

Post a Comment

I SomeTimes Find Myself Constantly Thinking About You Mother

I Sometimes Find Myself Constantly Thinking About You Mother I Sometimes Find Myself Constantly Thinking About You Mother "You Are the ...