ItunesConnect:"Missing Push Notification Entitlement"警告-----以及解决方法

最近开发的cordova应用,要做ios的适配,并且发布版本,但是有一次在发测试版本的时候,突然收到一封邮件警告,原文如下:

复制代码
Missing Push Notification Entitlement - 
Your app appears to include API used to register with the Apple Push Notification service, 
but the app signature’s entitlements do not include the “aps-environment” entitlement. If your app uses the Apple Push Notification 
service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with 
a Distribution provisioning profile that includes the “aps-environment” entitlement. See “Provisioning and Development” in the Local 
and Push Notification Programming Guide for more information. 
If your app does not use the Apple Push Notification service, no action is required. 
You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact 
the developer for information on removing the API.
复制代码
看了看,虽然提示可以忽略,官网也有提到,并不影响审核的通过,但是对于有强迫症的人来说,总收到这样的邮件,每发一回就会有一回警告,心里总感觉有点不舒服!
 
废话不多说,直接上解决方案:
首先看邮件就知道问题所在,你的App IDs中打开了Push Notification功能,也就是推送,但是在软件中并没有用到推送这个功能,这里有两种方法:
1.你可以登陆到开发者中心https://developer.apple.com,找到相应应用的App IDs,点击Edit,关闭Push Notifications功能。如下图

2.要是用第一种方法的话,以后要添加这个功能的时候还要重新设置,重新编辑修改app ids,然后重新生成证书,有点麻烦。相比之下,第二种方法就没有那么麻烦了,只需要在xcode中添加一句话就行(DISABLE_PUSH_NOTIFICATIONS=1),如下

以后要是用到了推送功能,直接删掉这句话就行了,方便快捷,还好记!推荐用第二种方法!

posted on   梁飞宇  阅读(813)  评论(0编辑  收藏  举报

编辑推荐:
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示