ios Xcode 中没有推送通知功能
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30979218/
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
No Push Notification Capability in Xcode
提问by Víctor Martín
I don't know why, but the option Push Notifications of Capabilities in Xcode is not displayed. Why?
我不知道为什么,但是没有显示 Xcode 中的功能推送通知选项。为什么?
I follow the developer guides, creating cers, enabling push in provisiong profiles, etc.
我遵循开发人员指南,创建 cer,启用推送配置文件等。
I had refreshed the account in Xcode preferences. What I am doing wrong?
我在 Xcode 首选项中刷新了帐户。我做错了什么?
回答by RadicalPotato
You need a apple account not free,Please see the picture:
您需要一个不是免费的苹果账号,请看图片:
回答by shyamsundar1988
Try checking all the following.
尝试检查以下所有内容。
- Make sure Push notifications is turned on under developer.apple.com.
- If yes, then make sure you are running the same provisioning profile and certificate.
- Also in Xcode, under Project -> General -> Select the qualifying team.
- 确保在 developer.apple.com 下打开推送通知。
- 如果是,请确保您正在运行相同的配置文件和证书。
- 同样在 Xcode 中,在 Project -> General -> 选择合格团队。
This should work.
这应该有效。
回答by Borzh
I had this problem because my Apple Developer membership was expired. Renew it and you are good to go.
我遇到这个问题是因为我的 Apple Developer 会员资格已过期。更新它,你就可以开始了。
回答by Simon
I was using the free developer's account and decided to upgrade to a paid 99 USD account. Because I was using free, the advanced capabilities did not display until I removed my account by clicking on the '-' and clicked on the '+' to re-add my account. Then all the capabilities appeared.
我使用的是免费的开发者帐户,并决定升级到付费的 99 美元帐户。因为我是免费使用的,所以直到我通过单击“-”删除我的帐户并单击“+”重新添加我的帐户后,才显示高级功能。然后所有的能力都出现了。
回答by Quentin Hayot
This setting does not exist anymore. Just make sure that your App ID includes Push Notifications in the dev center.
Then, register for push notifications with
此设置不再存在。只需确保您的 App ID 在开发中心包含推送通知即可。
然后,注册推送通知
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
and you should be good to go.
你应该很高兴去。