LoginSignup
9

More than 5 years have passed since last update.

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

Last updated at Posted at 2016-12-28
func removeUserDefaults() {
    let appDomain = Bundle.main.bundleIdentifier
    UserDefaults.standard.removePersistentDomain(forName: appDomain!)
}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
9