iOS - Share a Today Extension with multiple app targets?

ios, ios-app-extension, target, today-extension, widget

Solution

It is possible, but with some manipulations. To connect extension with a target you need:

- Add your extension to target's embedded binaries ("General" tab of project's settings)

- Add extension's target to target dependencies ("Build Phases" tab of project's settings)

- Prefix your extension's bundle identifier with the parent app's (your current target) bundle identifier or you will get an error:

So when you will build or distribute your target make this manipulations and fix provisioning profile's issues with Xcode (it can do this automatically).

Problem

I have a project with multiple app targets (about 25). I'm going to make a Today Extension for those apps but I don't want to create about 25 extensions with the same code and configuration. Is it possible to create only one Today Extension that I assign to the 25 apps ?

Original source

Related problems