App Group container being recreated on app update, causing complete data loss

I'm experiencing an issue where the App Group shared container appears to be recreated (with a new creation date) during an app update, resulting in complete loss of locally stored data.

Background

My app uses UserDefaults, Realm, Core Data, and CloudKit, with all local data stored in the App Group container (FileManager.containerURL(forSecurityApplicationGroupIdentifier:)). The app has been available since 2016 and has a stable user base.

Starting last year, I began receiving occasional reports from users saying all their data in the app had disappeared. To investigate, I added diagnostic logging that detects when an existing user's data appears to have been reset — specifically by checking the App Group container's file system creation date, and the existence and values of expected files.

What the diagnostics revealed

When the issue occurs, I observe the following:

  • The App Group container has a recent creation date, far newer than the user's first launch date
  • The Core Data store file's creation date is also immediately after the App Group container's recreation date
  • I write the same values to both standard UserDefaults and the App Group version (UserDefaults(suiteName:)). Only the App Group version is reset — the standard side retains historical data
  • The standard side still holds firstLaunchDate, initialVersion, and launchCount, confirming this is not a fresh install

Here is a sample diagnostic log from an affected user:

appGroupContainerCreationDate: 2026-03-30T18:44:10Z

firstLaunchDate: 2025/01/05 4:00

initialVersion: 10.8.0

currentAppVersion: 10.14.14

previousVersion: 10.10.0

launchCount: 44

availableStorageMB: 46646

The container creation date (2026-03-30) is clearly inconsistent with the user's first launch date (2025-01-05) and launch count (44). The container creation date is obtained with the following code:

  let appGroupURL = FileManager.default.containerURL(                                                                                                                                                                                                         
      forSecurityApplicationGroupIdentifier: "group.xxx.xxx"
  )!
  let attributes = try? FileManager.default.attributesOfItem(atPath: appGroupURL.path)                                                                                                                                                                        
  let containerCreationDate = attributes?[.creationDate] as? Date

Scale and pattern

  • Reports began increasing in late November last year
  • Over 85% of affected cases are on iOS 26
  • Most affected devices have plenty of available storage (46GB+ in the example above)
  • This is likely occurring during a normal app update (not a fresh install or device restore)

Ruled-out hypotheses

  • Not a fresh install — firstLaunchDate, initialVersion, and launchCount are preserved in standard UserDefaults
  • Not a storage issue — affected users typically have tens of GBs of free space, making it unlikely that iOS purged the data due to low storage
  • Not an app-side code change — the App Group identifier and entitlements have not been changed
  • Not triggered by silent notifications, background tasks, or widget activity — these processes do write to the App Group container, but the recreation does not appear to occur immediately after any of these operations

Questions

  1. Has anyone else observed App Group containers being recreated (new creation date, empty contents) during a standard app update?
  2. Is there a known iOS behavior or bug that could cause this, particularly on iOS 26?
  3. Are there any recommended mitigations?

Any insight would be greatly appreciated. This is a data loss issue affecting real users, and I'd like to understand whether this is an iOS-level problem or something I should be handling differently on my end.

App Group container being recreated on app update, causing complete data loss
 
 
Q