app groups user defaults are not returning values in macOS27 beta

Hi, I have a app group registered in mac os app called gorup.com.company.app and i am saving the key/values in userdefaults to this with suitname. within the mac os app the group userdedaults write/read are working fine.

I have a switt cli app with same app group registered in the code signing entitilement for the swit cli app. trying to read the group user default key value registered in mac os app in swift cli app returning no value. this was working fine with macOS 26. Is there some changes have been made in macos 27 in regaard to this?

Answered by rbmanian75 in 894696022

To answer my question, according to https://developer.apple.com/documentation/Xcode/configuring-app-groups

You can also create macOS app groups using the naming convention <Developer team ID>.<group name>. By using this naming scheme, macOS checks that the code signature of processes that try to access the app group container contains the same Developer-Team-ID as app group container ID.

so i need to register the group id something like this <teamid>.group.com.company.app and it worked in macOS 27. apple hase closed the loop of using ios style app group for mac os app that was working with macOS 26

Accepted Answer

To answer my question, according to https://developer.apple.com/documentation/Xcode/configuring-app-groups

You can also create macOS app groups using the naming convention <Developer team ID>.<group name>. By using this naming scheme, macOS checks that the code signature of processes that try to access the app group container contains the same Developer-Team-ID as app group container ID.

so i need to register the group id something like this <teamid>.group.com.company.app and it worked in macOS 27. apple hase closed the loop of using ios style app group for mac os app that was working with macOS 26

the fix causes problems with widgets i am using. when i use the teamid.group.com.company.app appgroup in the widget it is not getting values from main mac os app it seems to be that widget needs group.com.company.app appgroup then it works in macOS 27.

where as for for swift cli app it needs to teamid.group.com.company.app.

but when i try to create the appgroup prefixed with teamid it is not allowed by xcode or identifiers in apple develope site.

it is very confusing. what is the appgroup we need to use for sharing between mac os app and swift cli app and widget.

the apple documentation says for mac os app use teamid prefix but we cant create appgroup with teamid prefix. could some one from dts support clarify this. Thanks

app groups user defaults are not returning values in macOS27 beta
 
 
Q