Post

Replies

Boosts

Views

Activity

Reply to macOS : Accessing UserDefaults when App Group is enabled
Looks like you are right :-) It works and I can ignore the warning. My original issue was that items were never saved, but it was another problem with @State in a SwiftUI view. It was not related to UserDefaults. Thanks for the highlight :-) One more thing : The shared preferences file is corrected created in ~/Library/Group Containers directory, but the defaults command line does not see it. ➜	~ defaults read com.stormacq.mac.MyApp 2020-09-07 10:25:53.188 defaults[82827:947786] Domain com.stormacq.mac.MyApp does not exist ➜	~ defaults read TEAM_ID.com.stormacq.mac.MyApp 2020-09-07 10:26:05.088 defaults[82857:947925] Domain TEAM_ID.com.stormacq.mac.MyApp does not exist The same with non-shared preferences works correctly. Can defaults read Group Containers ?
Sep ’20