flutter – How to implement home screen widget for iOS app with multiple schemes for different apps?


I have a flutter app with two flavors and I want to add home screen widget for iOS deployment for only one flavor of app.

Each flavor of my app is corresponding to a unique bundle ID (my.domain.app1 and my.domain.app2).

I set scheme in Xcode following flutter tutorial.

I created home screen widget in iOS using this tutorial.

I give bundle ID for my home screen widget my.domain.app2.homeWidget as I want home widget for only app2. I do not need home widget for app1.

I try running app2 and it has no issue.
However, I try debugging my app1, it causes this error.
Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier

I tried removing homeWidget from Build Phases > Embed Foundation Extensions but it removes my home widget from both app1 and app2. I cannot keep home widget for only one app scheme.

How can I assign home widget in iOS to only my.domain.app2 but not my.domain.app1?

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img