But as soon as I publish the App on TestFlight, the Data disappears.
This sounds like an entitlement issue. On iOS your App Group access is encoded as an entitlement in your code signature and that entitlement must be allowlisted by your provisioning profile. If the entitlement is missing, you won’t be able to access your App Group.
A good way to debug this is export a Distribution-signed version of the app using the Organizer (Distribute App > App Store Connection > Export, instead of Upload). You can unpack the resulting
.ipa by renaming it to
.zip, and then dump your entitlements using:
Code Block % codesign -d --entitlements :- /path/to/your.app |
Also dump the entitlements of your Widget app extension (the
.appex inside
PlugIns) to confirm that they’re aligned.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"