15

我有一个包含多个应用程序目标的项目(大约 25 个)。

我将为这些应用程序制作一个 Today Extension,但我不想创建大约 25 个具有相同代码和配置的扩展。

是否可以只创建一个我分配给 25 个应用程序的 Today Extension?

4

1 回答 1

8

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

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

enter image description here

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

enter image description here

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

enter image description here

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).

于 2015-04-16T19:24:44.103 回答