This post is in response to the information on app groups posted here: https://developer.apple.com/forums/thread/721701
I have a multi-platform (macOS and iOS) app that uses an app group to store the Core Data database, so that extensions and widgets can also access the database.
It seems to be impossible to add an app group in Xcode that doesn't start with group.
. When I use the team identifier as detailed here , Xcode prepends group.
to the app group identifier.
So far, I've simply been using an app group identifier that looks like this: group.com.example.MyAppName
. This has worked on macOS and iOS. However, I noticed that when the app launches on macOS 15, the user is shown a dialog that says "<app name> would like to access data from other apps." If the user selects "Don't Allow", the app will crash, since it can't access the Core Data database located in the app group directory.
How can I work around this, considering that this is a multi-platform app, and both the iOS and macOS versions need to store the Core Data database in the app group directory? What is the proper way to configure app groups for multi-platform apps?
I’ve been talking to other folks about the multiplatform app problem. See this thread for example.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"