According to upcoming privacy manifest document, NSUserDefaults is only allowed for a use for the app itself. It is serious for developers who makes App Extensions.
CA92.1 Declare this reason to access user defaults to read and write information that is only accessible to the app itself. This reason does not permit reading information that was written by other apps or the system, or writing information that can be accessed by other apps.
Developers, please submit a request to add the permission of App Group. https://developer.apple.com/contact/request/privacy-manifest-reason/
The reason codes have been updated.
1C8F.1
Declare this reason to access user defaults to read and write information that is only accessible to the apps, app extensions, and App Clips that are members of the same App Group as the app itself. This reason does not permit reading information that was written by apps, app extensions, or App Clips outside the same App Group or by the system. This reason also does not permit writing information that can be accessed by apps, app extensions, or App Clips outside the same App Group.
Thank you, Apple.