VOOZH about

URL: https://qiita.com/fmtonakai/items/2d3ee2e3f84ffb687537

⇱ アプリを約250個以上起動するとUser Defaultsが読み込めなくなる問題について #iOS - Qiita


👁 Image
213

Go to list of users who liked

93

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@fmtonakai(Fuke Masaki)

アプリを約250個以上起動するとUser Defaultsが読み込めなくなる問題について

213
Last updated at Posted at 2017-06-23

最近iOSで発生していた、突然NSUserDefaultsの内容が消えてしまう問題について、Appleから公式にアナウンスがありました。

NSUserDefaults Data Loss Fix

Starting in iOS 9.3, and in subsequent releases of iOS and macOS, NSUserDefaults could fail to load data if more than roughly 250 separate apps (including separate reinstalls of the same app) had been launched since the last reboot. This has been corrected.

原因はiOS9.3以降のiOSで、デバイスを起動してからアプリの再インストールを含めて約250アプリを起動することで、
UserDefaultsのデータの読み込みに失敗するとのことです。

iOS11でこの問題が修正されたと案内されていますが、iOS9.3だけでなくiOS10にも影響があるということで、しばらくは尾を引きそうな問題となっています。
現状では回避が不可能に思われるので、User Defaultのロードに失敗した際のケアをしっかりする必要がありそうです。

213

Go to list of users who liked

93
2

Go to list of comments

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
  3. You can use dark theme
What you can do with signing up
213

Go to list of users who liked

93