Swift AppStorage vs UserDefaults - Storing Data in Swift Both AppStorage and UserDefaults are used in Swift to store user preferences