如何在 xcode 项目中禁用推送通知功能?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44568009/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to disable push notification capability in xcode project?
提问by Anh Pham
I use a free Apple developer account, so no push notification support. So when I get an existing xcode project and try to run it on my phone, I get "Your development team, "xxx", does not support the Push Notifications capability."
我使用免费的 Apple 开发者帐户,因此不支持推送通知。所以当我得到一个现有的 xcode 项目并尝试在我的手机上运行它时,我得到“你的开发团队,“xxx”,不支持推送通知功能。”
But when I go to "Capabilities" tab, I don't see it there to disable (It said "10 capabilities Unavailable"). So I guess it hides them? But the project still require the capabilities somewhere?
但是当我转到“功能”选项卡时,我没有看到它可以禁用(它说“10 个功能不可用”)。所以我猜它隐藏了它们?但该项目仍然需要某处的能力?
So how do I disable the push notification capability of the project, so I can run it?
那么如何禁用项目的推送通知功能,以便我可以运行它呢?
回答by ooOlly
UPDATE:Thank KerimG?karslan for remind me that somebody can't see push notifications capability.
更新:感谢 KerimG?karslan 提醒我有人看不到推送通知功能。
If your developer account doesn't have push notifications capability, you must clear current provisioning profile and certificate. Then you can disable it in capabilities tab.
如果您的开发者帐户没有推送通知功能,您必须清除当前的配置文件和证书。然后您可以在功能选项卡中禁用它。
Select capabilities tab of your target and turn off what you want. Make sure configuration of every target is changed.
选择目标的功能选项卡并关闭您想要的功能。确保更改每个目标的配置。
回答by u6690752
回答by u7267550
Just clear "Automatically manage signing" checkbox and select it again, you will find the "push notification capability" or other capability in Capabilitiespage.
只需清除“自动管理签署”复选框,再选择它,你会发现在“推送通知功能”等功能功能页面。