First up, I wanted to drop a link to App Groups: macOS vs iOS: Fight! This explains, in gory detail, the difference between apps groups on the two platforms.
I also manually created a development profile through the Developer Portal, and the group still wasn’t added, even though it’s activated for the identifier.
Hmmm, that’s weird. Let me run through the manual process and you can try replicating that:
-
In the Certificates, Identifiers, and Profiles section of the Developer website, switch to Identifiers.
-
Click the add (+) button to create a new App ID.
-
Select App and click Continue.
-
Enter the name and the App ID. In my case these were Test660802
and com.example.apple-samplecode.Test660802
, respectively.
-
In the Capabilities tab, enable App Groups.
-
Click Continue.
-
Click Register.
-
Back in the Identifiers section, search for the new App ID.
-
Click on it.
-
In the Capabilities tab, click Configure.
-
Enable a specific App Group. In my case it was group.eskimo1.test
.
-
Click Save and confirm the change.
Next create a profile from that App ID:
-
Back in Certificates, Identifiers, and Profiles, switch to Profiles.
-
Click the add (+) button to create a new profile.
-
Select iOS App Development and click Continue.
-
Select the new App ID and click Continue.
-
Go through the rest of the workflow until you hit the Review, Name and Generate step.
-
Enter a name, in my case that was Test660802 Dev
, and click Generate.
-
Click Download.
-
In Finder, dump that profile:
% security cms -D -i Test660802.mobileprovision | plutil -p -
{
…
"Entitlements" => {
"application-identifier" => "SKMME9E2Y8.com.example.apple-samplecode.Test660802"
…
"com.apple.security.application-groups" => [
0 => "group.eskimo1.test"
]
…
}
…
}
As you can see, the profile authorises this App ID to use the group.eskimo1.test
app group.
I recommend that you work through this process to confirm that it’s working as described above. After that, you can use your experience to check the behaviour of your real App ID.
IMPORTANT When you test this, use a different App ID and group. The App ID of com.example.apple-samplecode.Test660802
and app group ID of group.eskimo1.test
are allocated to my individual work account.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"