iOS8扩展需要自己的配置文件吗?

时间:2023-01-22 23:36:22

I am starting an iOS 8 extension but I can't run it on my device. The error when trying to run it is:

我正在启动一个ios8扩展,但我不能在我的设备上运行它。运行时的错误是:

No matching provisioning profiles found

没有找到匹配的配置文件

The provisioning profile specified in your build settings (“ExtensionName”) has an AppID of net.company.AppName which does not match your bundle identifier net.company.AppName.ExtensionName. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.

在构建设置中指定的配置文件(“ExtensionName”)具有net.company.AppName的AppID,它与bundle标识符net.company.AppName.ExtensionName不匹配。Xcode可以通过从成员中心下载新的配置文件来解决这个问题。

  1. Do I need a separate provisioning profile for both the main app and the extension ?
  2. 我是否需要为主应用程序和扩展程序分别提供配置文件?
  3. Should they share a bundle identifier (by default it adds the extension name to the bundle identifier, so perhaps not) ?
  4. 它们是否应该共享一个bundle标识符(默认情况下,它将扩展名添加到bundle标识符中,所以可能不会)?
  5. If it has a separate bundle identifier how is that reflected in the provisioning profile (if there is a separate one) ?
  6. 如果它有一个单独的bundle标识符,它如何反映在配置文件中(如果有一个单独的包标识符)?

4 个解决方案

#1


22  

It would seem that Xcode would prefer it that way, however there's nothing stopping you from using a wildcard profile until you want to do an Adhoc or Release to the App Store. More to the point of your question though, for every target that you have, you need a profile and bundle ID. So yes, you "need" another provisioning profile for your Extension, although I expect Apple to streamline this process.

看起来Xcode更喜欢这种方式,但是没有什么能阻止您使用通配符配置文件,直到您想要做一个特别的或发布到应用程序商店。更重要的是,对于你的每一个目标,你都需要一个概要文件和绑定ID,所以是的,你“需要”你的扩展的另一个配置文件,尽管我希望苹果能简化这个过程。

All in all, it's probably best to just use a WildCard dev profile until you need a provisioning profile. Remember this is all a beta, and they're still working on pretty much everything.

总之,最好只使用通配符开发配置文件,直到需要配置配置文件。记住,这都是测试版,他们还在做几乎所有的工作。

#2


10  

I've located this documentation pertaining to App Extensions. If you read the bottom of page 20 if seems that using the same distribution certificate is actually suggested. I've gone ahead and changed my bundle identifier for the Today Extension to extend my applications. For example, com.DeveloperName.AppName.TodayExtension, created an App ID in the Dev Center to correspond with that, and created a distribution profile for it. My app +Quotes has successfully been updated by following these steps. I have not experienced any issues with the app or extension, but Xcode does seem to get a little confused when trying to auto assign the correct provisioning profiles for my extension now. Selecting them manually solves this.

我已经找到了与应用程序扩展相关的文档。如果您阅读了第20页的底部,如果似乎建议使用相同的分发证书。我已经修改了今天扩展的包标识符以扩展我的应用程序。例如,com.DeveloperName.AppName。今天的扩展,在Dev Center中创建了一个应用程序ID来对应它,并为它创建了一个发布配置文件。通过以下步骤,我的app +引号已经成功更新。我还没有遇到过这个应用程序或扩展的任何问题,但是Xcode在试图自动为我的扩展分配正确的配置文件时似乎有点困惑。手动选择它们可以解决这个问题。

#3


8  

Extensions are separate targets from the host app. You have to treat them as though they are separate apps with different bundle identifiers and different provisioning profiles.

扩展是独立于宿主应用程序的目标。您必须将它们视为具有不同绑定标识符和不同配置配置文件的独立应用程序。

It's best if you just create them during testing instead of using wildcards because you may need to test some capabilities that you enabled, for example App Group so that your extension and host app can access the same container.

最好是在测试期间创建它们,而不是使用通配符,因为您可能需要测试您启用的某些功能,例如应用程序组,以便扩展和宿主应用程序能够访问相同的容器。

Note that if you want to have any capabilities enabled for your host app and extensions, you have to enable them individually for all of them.

注意,如果您想要为主机应用程序和扩展启用任何功能,您必须为所有这些应用程序单独启用它们。

#4


4  

You do need a separate provisioning profile for you extension but with the same certificate your main app has. When you are creating a new provisioning profile, your Extension's app id will also appear in the list, choose that, and proceed to create a new provisioning profile.

您确实需要一个独立的扩展配置文件,但是要使用主应用程序拥有的相同证书。当您正在创建一个新的配置文件时,扩展的应用程序id也将出现在列表中,选择它,然后继续创建一个新的配置文件。

Also choose that provisioning profile in the target of your extension.

还要在扩展的目标中选择这个配置文件。

iOS8扩展需要自己的配置文件吗?

#1


22  

It would seem that Xcode would prefer it that way, however there's nothing stopping you from using a wildcard profile until you want to do an Adhoc or Release to the App Store. More to the point of your question though, for every target that you have, you need a profile and bundle ID. So yes, you "need" another provisioning profile for your Extension, although I expect Apple to streamline this process.

看起来Xcode更喜欢这种方式,但是没有什么能阻止您使用通配符配置文件,直到您想要做一个特别的或发布到应用程序商店。更重要的是,对于你的每一个目标,你都需要一个概要文件和绑定ID,所以是的,你“需要”你的扩展的另一个配置文件,尽管我希望苹果能简化这个过程。

All in all, it's probably best to just use a WildCard dev profile until you need a provisioning profile. Remember this is all a beta, and they're still working on pretty much everything.

总之,最好只使用通配符开发配置文件,直到需要配置配置文件。记住,这都是测试版,他们还在做几乎所有的工作。

#2


10  

I've located this documentation pertaining to App Extensions. If you read the bottom of page 20 if seems that using the same distribution certificate is actually suggested. I've gone ahead and changed my bundle identifier for the Today Extension to extend my applications. For example, com.DeveloperName.AppName.TodayExtension, created an App ID in the Dev Center to correspond with that, and created a distribution profile for it. My app +Quotes has successfully been updated by following these steps. I have not experienced any issues with the app or extension, but Xcode does seem to get a little confused when trying to auto assign the correct provisioning profiles for my extension now. Selecting them manually solves this.

我已经找到了与应用程序扩展相关的文档。如果您阅读了第20页的底部,如果似乎建议使用相同的分发证书。我已经修改了今天扩展的包标识符以扩展我的应用程序。例如,com.DeveloperName.AppName。今天的扩展,在Dev Center中创建了一个应用程序ID来对应它,并为它创建了一个发布配置文件。通过以下步骤,我的app +引号已经成功更新。我还没有遇到过这个应用程序或扩展的任何问题,但是Xcode在试图自动为我的扩展分配正确的配置文件时似乎有点困惑。手动选择它们可以解决这个问题。

#3


8  

Extensions are separate targets from the host app. You have to treat them as though they are separate apps with different bundle identifiers and different provisioning profiles.

扩展是独立于宿主应用程序的目标。您必须将它们视为具有不同绑定标识符和不同配置配置文件的独立应用程序。

It's best if you just create them during testing instead of using wildcards because you may need to test some capabilities that you enabled, for example App Group so that your extension and host app can access the same container.

最好是在测试期间创建它们,而不是使用通配符,因为您可能需要测试您启用的某些功能,例如应用程序组,以便扩展和宿主应用程序能够访问相同的容器。

Note that if you want to have any capabilities enabled for your host app and extensions, you have to enable them individually for all of them.

注意,如果您想要为主机应用程序和扩展启用任何功能,您必须为所有这些应用程序单独启用它们。

#4


4  

You do need a separate provisioning profile for you extension but with the same certificate your main app has. When you are creating a new provisioning profile, your Extension's app id will also appear in the list, choose that, and proceed to create a new provisioning profile.

您确实需要一个独立的扩展配置文件,但是要使用主应用程序拥有的相同证书。当您正在创建一个新的配置文件时,扩展的应用程序id也将出现在列表中,选择它,然后继续创建一个新的配置文件。

Also choose that provisioning profile in the target of your extension.

还要在扩展的目标中选择这个配置文件。

iOS8扩展需要自己的配置文件吗?