如何在XCode 6.3 iOS项目中找到授权plist文件 [英] How to locate the entitlements plist file in an XCode 6.3 iOS project

查看:143
本文介绍了如何在XCode 6.3 iOS项目中找到授权plist文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相对复杂的问题,下面将针对上下文进行描述。解决方案似乎归结为手动编辑权利plist文件。

I have a relatively complicated problem, described below for the context. The solution seems to boil down to editing the entitlements plist file manually.

我在项目中找不到任何entitlements.plist文件,也找不到任何权利部分在找到的其他plist文件中。

I cannot find any entitlements.plist file in my project, and could not find any "entitlements" sections in other plist files I found.

问题是,如何找到授权plist文件?

The question is, how can I locate the entitlements plist file?

现在来了解背景故事:

我需要为我们已部署的企业应用程序创建一个新的配置文件(旧的一个将很快过期)。有几种版本可以在不同的环境中运行(所有版本都具有相同的应用程序ID)。由于某种原因,该应用程序的当前版本不再包含权利 com.apple.developer.team-identifier。续订配置文件时,此权利也会自动从配置文件中删除。这会导致该应用程序的所有较旧版本停止工作。他们无法从控制台日志中的此错误开始:

I need to create a new provisioning profile for an enterprise app we have deployed (the old one will expire shortly). There are several versions out there running in different environments (all with the same app ID). For some reason the current version of the app no longer includes the entitlement "com.apple.developer.team-identifier". When renewing the provisioning profile, this entitlement is automatically removed from the profile as well. This causes all the older versions of the app to stop working. They fail to start with this error in the console log:

entitlement 'com.apple.developer.team-identifier' has value not permitted by provisioning profile 'My Profile'

根据Apple支持,我们必须更新所有这些应用到最新版本,这当然是不可能的,因为某些版本是在较旧的环境中生产的,并且并不都与最新功能兼容。 (我们也不打算给所有客户免费升级)。因此,Apple的官方解决方案不是一个选择。

According to Apple Support, we have to update all those apps to the latest version, which of course is not possible since some are in production on older environments and are not all compatible with the newest capabilities. (We are not planning to give all customers a free upgrade either). So, Apple's official solution is not an option.

根据有关相关问题的评论,应该可以重新引入对缺少权利的依赖性。我认为,如果可以将权利添加到当前应用中,重新生成它,然后为其生成新的配置文件,则可以解决该问题。

According to this comment on a related issue it should be possible to re-introduce the dependency on the missing entitlement. I figured that if I could add the entitlement to the current app, regenerate it and then generate a new provisioning profile for it, the problem might be solved.

推荐答案

答案

我的应用正在使用默认功能,在这种情况下,没有entitlements.plist文件。我可以通过在UI中添加一些功能(然后再次删除它们)来添加一个功能。

My app was using the default capabilities in which case there is no entitlements.plist file. I was able to add one by adding some capabilities in the UI (and then removing them again).

跟进

最后,这并不能解决我的问题,事实证明这是不同的,因为该权利已经在先前生成的配置文件中(具有默认功能)。我只是在比较生成的配置文件时发现它们(它们是相同的)。

In the end this did not solve my problem, which turned out to be different since this entitlement was already in the previously generated profile (with default capabilities). I only noticed this when comparing the generated profiles (they were identical).

控制台日志中的错误似乎是由于plist的不同引起的:

The error in the console log seems to be caused by a difference in the plist:

先前的配置文件:

<key>com.apple.developer.team-identifier</key>
<array>
    <string>SomeIdentifier</string>
</array>

新的配置文件:

<key>com.apple.developer.team-identifier</key>
<string>SomeIdentifier</string>

有可能通过添加额外的团队标识符来再次使供应配置文件兼容再次变为数组,但这是一个不同的问题,即我在这里问

It may be possible to get the provisioning profile compatible again by adding an extra team-identifier so that it becomes an array again, but that's a different question that the one I asked here.

这篇关于如何在XCode 6.3 iOS项目中找到授权plist文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆