Xcode 8:每种方案的不同权利会导致错误 [英] Xcode 8: different entitlements for each scheme causing errors

查看:107
本文介绍了Xcode 8:每种方案的不同权利会导致错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了XCode 8的问题,其中没有为每个方案正确引用.entitlements文件.基本上,我的Debug方案引用了我的Debug .entitlements文件.这引起了一个问题,因为我们实现了新的Rich Push通知逻辑,并且需要使用App组.

I found an issue with XCode 8 where .entitlements files are not being referenced properly for each scheme. Basically, my Debug .entitlements file is being referenced for my Release scheme. This is causing an issue because we implemented the new Rich push notification logic and that requires the use of App groups.

我正在使用两个不同的团队(开发和生产),因此将有两个特定的应用程序组.

I am using two different teams (Development and Production), so there will be two specific App Groups.

有人知道如何解决此问题吗?

Anyone know how to resolve this issue?

谢谢

推荐答案

我找到了解决方案.制作一个.entitlements文件,添加以下内容:

I found a solution. Make one .entitlements file add this:

<key>aps-environment</key>
<string>$(APS_ENVIRONMENT)</string>
<key>com.apple.security.application-groups</key>
<array>
    <string>$(APP_GROUP)</string>
</array>

然后在目标">构建设置"中 在签名">代码签名权利"中设置相同的.entitlements文件 添加用户定义的APS_ENVIRONMENT设置,APP_GROUP为每个目标设置正确的组.

Then in Target > Build settings Set the same .entitlements file in Signing > Code Signing Entitlements Add User-Defined Setting for APS_ENVIRONMENT and APP_GROUP setting the correct group for each target.

因此,基于目标Xcode,将使用您为APS_ENVIRONMENT和APP_GROUP设置的内容.

So, based on the target Xcode will use what you set for APS_ENVIRONMENT and APP_GROUP.

您也可以在plist中执行此操作...今天做了一些惊人的清理.

You can do this in plist too...did some amazing clean up today.

这篇关于Xcode 8:每种方案的不同权利会导致错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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