Edited at

【Swift】UserDefaultsの全データを一括削除する方法

More than 1 year has passed since last update.

func removeUserDefaults() {

let appDomain = Bundle.main.bundleIdentifier
UserDefaults.standard.removePersistentDomain(forName: appDomain!)
}