iOS App Groups Issue

981 Views Asked by At

I am trying to setup App Groups for iOS so that I can save data in a host app, to later access the same data from a today extension.

I have followed all of the guides to a T, and still cannot get this working. This is what I have done.

  1. Created the app group on the apple dev portal ("group.com.xxxxxxxxx.app").
  2. Assigned the group to the app id for the host app, as well as the extension.
  3. Enabled App Groups in xcode with the host target selected, and then with the extension selected.

The extension is all checking out okay, but this is what I get when I have the main target selected:

enter image description here

I checked, and the group is added to my app id:

enter image description here

One thing I do notice (possibly not related), is that when I check the group in xcode, it duplicates and looks like this:

enter image description here

That being said, I know for a fact that there is only one app group on the dev portal. When I deselect the app group in xcode, the other disappears:

enter image description here

I have deleted provisioning profiles, and certs. Rebuild the app and tried both automatic and manual signing. I still cannot get the last issue to resolve.

Thank you for looking into it with me!

1

There are 1 best solutions below

0
Rocksaurus On

This happened to me as well, and it turned out somewhere along the line Xcode had nuked the "Team" I had set on my main app target in "General".

If this doesn't solve it for you, I had also cleaned the project and deleted DerivedData before stumbling upon this and setting my Team back to normal, so you may need to follow those steps before going to the "General" tab on your main app target.