Save a parameter isNotFirstInstall in user defaults.standard. Set it to true after you do your 'first install' stuff. If you need this value in the app groups other apps, the main app should make a copy of this value under a different name in the app groups user defaults. When the main app is uninstalled and then installed again, isNotFirstInstall will be nil and then the main app can delete the values in the app groups user defaults since you know all the keys. Let me know if this helps.
Post
Replies
Boosts
Views
Activity
I opened a bug in the feedback assistant. I'm waiting for a replay
I moved the flag from UserDefaults to existence of a directory that I create on first launch. If it's not important to preserve the existing flag (for example, you don't care that everybody will see the onboarding again) then you can just move to this mechanism. If it is important then you need to "migrate" the current setting: if flag exists then create the directory and delete the flag. In this way the first uninstall + install will not work but the second will
I still don't know when this bug occurs, but I have a phone in which this occurs and I fixed it by changing this flag to look at the existence of a folder instead of a flag in user defaults (I create/delete the folder according to the flag). Annoying indeed... If you want I'll post the code.
Can you try uninstall + install twice after removing family sharing and also restart the phone? Can you remove iCloud sync also and try uninstall + install twice?
I reported a bug. I will post the answer when I receive it