defining an app group shared between macOS and iOS

My understanding is that iOS app group names must begin with "group.", but macOS group names must begin with the team identifier.

If I check a "group." name in the iOS section, it's also added to the macOS section, despite being invalid.

If I add a "team-id:" name in the macOS section, it's also added to the iOS section, and marked in red as invalid. If I uncheck it from the iOS section, it also gets removed from the macOS section.

Is there a way to define the equivalent group names in the two sections?

Xcode 14.1b3 screenshot:

This is a complex topic. One day I’ll get around to fixing the documentation for this (r. 92322409) but today is not that day )-:

Some factoids about macOS and app groups:

  • macOS does not, in general, require that app groups be authorised by an entitlement.

  • The exception here is for sandboxed apps. To access on app group from a sandboxed app, your app must authorise that access by listing it in the com.apple.security.application-groups entitlement.

  • Your claim to that entitlement does not need to be authorised by a provisioning profile. Specifically, in the terminology defined by TN3125 Inside Code Signing: Provisioning Profiles, it is an unrestricted entitlements.

  • The App Store checks the app group’s claimed by your app during the App Review process.

So:

  • If your macOS app is not sandboxed, you can use any app group ID you like, including one using the group.GGG convention used by iOS.

  • If your app is sandboxed, your app group ID must be backed by an entitlement.

  • If you submit that to the Mac App Store, your app group ID must ‘belong’ to you. That means that you must either follow the macOS convention (TTT.GGG, where TTT is your Team ID) or the iOS convention (group.ggg, where that group ID is registered to your team on the Developer website).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

defining an app group shared between macOS and iOS
 
 
Q