works good on iOS 16 and prior, but on iOS 17, User Defaults gets cleared.
I don't use Data Protection Entitlement. I use app groups, and tried both UserDefaults.standard and UserDefaults(suiteName:"group.com.aaa").
On a new project it works fine, but in my mature project (in AppStore for over 10 years) User Defaults get refreshed.
What changed from iOS 16 to iOS 17?
tried both UserDefaults.standard and UserDefaults(suiteName:"group.com.aaa") and it doesn't work
tried new project and it works tried keychain and it works (but it's too much work to migrate all user defaults data to keychain)
New user privacy requirements.
UserDefaults at the very bottom of the page: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api