In the following example I am saving a String with @AppStorage:
struct ContentView: View {
@AppStorage("text") private var text = ""
var body: some View {
Button("Append text: \(text)") {
text.append("APPEND")
}
}
}
But I want to save a String array, something like this:
@AppStorage("text") private var text = [
"APPEND",
"APPEND"
]