r/iOSProgramming • • 17h ago

Question Niche question, anyone successfully built a crossplatform (ios+macos) app that shares one entry for Focus mode?

This is super specific. But just in case anyone came across this. I built a cross platform app (iOS + macos) using the default template and everything is done with SwiftUI. Seems look to work great. Except for one thing.

For whatever reason, even though the two apps have the same BundleIdentifier they are treated as two separate apps in terms of Focus mode's allowed apps. And the worst thing is that you can add the iOS app to say "Work focus" and separately add the macOS app to also the same Work focus, but it will conflict and the OS will choose to keep one. So only ever one side will be "allowed" in work focus mode. What is the right way to tell the OS that they are really the same app?

1 Upvotes

2 comments sorted by

1

u/fidgiesapp 9h ago

I haven't seen a way to make Focus treat the iOS and macOS builds as one allowed app, since each platform keeps its own list. What may help is adding a Focus Filter with SetFocusFilterIntent, so the app itself reacts when a Focus turns on and doesn't depend only on the allowed-apps list. That at least lets you control notifications and content per device from one shared piece of code. It's worth filing a Feedback Assistant report about the duplicate-entry conflict too, since the one-or-the-other behavior sounds like a bug.