I have a multiplatform app that I've been working on that targets iphones, ipad, and macos. I also have a widgetextension that targets all three devices. On iphones and ipads, the widgets show up in the widget gallery with no problems. But on the mac, the widget center does show my app, but its widgets are "from iPhone" meaning that if my app was not install on an iphone, they just won't show up on the mac at all.
I have not idea of what I'm doing wrong or how to fix it. Do I need to create a widget extension for the mac seperately?
Post
Replies
Boosts
Views
Activity
I am in the process of creating a multiplatform app with a shared code base using swiftUI for iOS and mac. This app has a widget extension target for both iOS and mac and a helper app for mac only. I am trying to share data and userdefaults between the main app and the widget extension for ios, and for the mac share data between the main app, widget extension and the helper app.
I have setup an app group container to share data between all targets. However this is only working on iOS. The app group capability is not extended to macOS.
I have been researching for weeks now and all the answers I can find are for if the macOS were a different target, which would entail me having the macos group container prefixed with my team identifier.
With a multiplatform app, the main app simply won't let me prefix the group container with my team identifier. Which unfortunately xcode prevents me from doing for a multiplatform app.
I have no idea of how to solve this issue and any help will be appreciated.