I have a problem when trying to save array of strings into the UserDefaults. I have a simple ObservableObject with one property:
class AppManagerModel: ObservableObject {
    @Published var userData = UserDefaults.standard.array(forKey: "userData") as? [String] ?? [String]()
}
Then when i try to update that data from the view
UserDefaults.standard.set(appManagerModel.userData.append("Test"), forKey: "userData")
I get the following error- "Attempt to insert non-property list object () for key userData"
