Extension with multiple schemes and bundle IDs

Was wondering if someone could help me out. I have a an Xcode project set up with 1 main app target with 2 schemes (dev, live). Each scheme has a different bundle ID so that i can have both apps installed on the device at the same time. All is working fine, although I’m now trying to also add an notification extension. I have set the bundle id of the extension to be dynamic so that it matches its parent id. Although, when building from dev scheme it stills says the parent id does not match. Live seems to be build fine. Im not sure what I’m doing wrong. It looks like the extension doesn’t get built when i change schemes. Any suggestions have i can have 1 extension and 2 different schemes? Thanks 🙂

Hi, it may be late, but I have the exactly same thing going on, and maybe someone finds it still useful.

You can only reference 1 target for each extension, and the extension's bundle id has to match the target.extension scheme. And a App group will not work.


That is why one of your targets is building without issue, and the other one is not.

I had to duplicate the extensions for the second target as well and fix the duplicates bundle ids, along with the references in the 2nd target.


If there is another way to change the extensions bundle ids by any targets build scripts or anything like that, so it's just updating the bundle ids all the time, I will be very interested in how you did that.

Extension with multiple schemes and bundle IDs
 
 
Q