Have a Multiplatform app, cannot test my app that uses App Groups properly

Dear Apple Developer Forum community,

I have a Multiplatform SwiftUI app that runs on both iOS and macOS. The app is available in the Mac App Store, and I aim to maintain backward compatibility. I use App Groups to synchronize data between the main app, where users configure content, and the widget, which displays this content. The data is stored using SwiftData.

With macOS Sequoia now in beta testing, I have encountered a breaking change that affects my app.

In macOS Sequoia, apps must use the team identifier number $(TeamIdentifierPrefix) as the prefix for App Groups on macOS. I cannot properly test future versions of my app without instructing my beta testers to turn off System Integrity Protection (SIP). This presents a significant issue for my Multiplatform SwiftUI app. On iOS, the app group identifier must start with group.identifier. Before macOS Sequoia, you could name your app group freely, and testing with TestFlight and publishing to the App Store was straightforward. Now, however, testing an app intended for the App Store is complicated by this rule. On macOS, you must use $(TeamIdentifierPrefix) to bypass this rule and allow for widgets to be tested and allow for synchronization between SwiftData. While on iOS, this approach is not allowed as the App Group becomes considered invalid.

Additionally, this annoying popup appears every time a beta tester tries to open the app if they have SIP turned on:

Instead of prompting for the app extensions, it rejects it. Rejecting this popup also prevents the main SwiftData app from opening.

I am unsure how to proceed. If I want to test widgets (which is a primary focus of the app), I must use macOS Sequoia. I am particularly concerned about the implications if I decide to stop supporting macOS Sonoma in the future.

Thank you in advance, LocalWE

Answered by DTS Engineer in 794962022

To start:

That thread covers a Mac Catalyst issue, but you’re in a different situation. You have native apps on both macOS and iOS.

Fortunately, you’re distributing via the Mac App Store so there’s a path forward that should work for your users: Use an iOS-style app group name (group.*). This will work on iOS and macOS 15, with the latter being based on the first criterion described in the release notes (you’ll have to read the above-mentioned thread for the context here).

When it comes to testing, if you deploy your app to your beta testers via TestFlight then it should follow App Store rules. If it doesn’t, that’s a bug and I encourage you to file it as such.

Note If you do file any bugs, please post their numbers, just for the record.

The remaining problem is day-to-day development. And, yeah, that’s a tricky one. I don’t want to encourage you to disable SIP )-: The alternative is to use a macOS style app group Team ID prefix in your day-to-day builds, but that comes with its own drawbacks.

Share and Enjoy

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

To start:

That thread covers a Mac Catalyst issue, but you’re in a different situation. You have native apps on both macOS and iOS.

Fortunately, you’re distributing via the Mac App Store so there’s a path forward that should work for your users: Use an iOS-style app group name (group.*). This will work on iOS and macOS 15, with the latter being based on the first criterion described in the release notes (you’ll have to read the above-mentioned thread for the context here).

When it comes to testing, if you deploy your app to your beta testers via TestFlight then it should follow App Store rules. If it doesn’t, that’s a bug and I encourage you to file it as such.

Note If you do file any bugs, please post their numbers, just for the record.

The remaining problem is day-to-day development. And, yeah, that’s a tricky one. I don’t want to encourage you to disable SIP )-: The alternative is to use a macOS style app group Team ID prefix in your day-to-day builds, but that comes with its own drawbacks.

Share and Enjoy

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

Dear Quinn,

Creating an additional app for testing purposes won't be ideal for my case as I am looking to preserve backwards compatibility between v2 and v3 of my app with a conversion process.

Additionally, my TestFlight testers expect that my app is backwards compatible with the smooth version so they can jump from smooth to beta (and vice versa) with no issues.

Sincerely LocalWE

my TestFlight testers expect that my app is backwards compatible with the smooth version

What do you mean by “smooth version”?

Share and Enjoy

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

Have a Multiplatform app, cannot test my app that uses App Groups properly
 
 
Q