IOS真机运行带有Notification Content target的时候证书报错This application or a bundle it contains has the same bun

来源:互联网 发布:网络监控技术 编辑:程序博客网 时间:2024/06/04 19:59

上两篇文章说了本地通知的相关内容,做了测试的推送证书,运行在真机上出现如下问题:
1、第一次报如下错误

This application or a bundle it contains has the same bundle identifier as this application or another bundle that it contains. Bundle identifiers must be unique.

这里写图片描述

原因是demo的Bundle id  与 我们新建的target的Bundle id 不能一致,他们是相互独立的

2、修改了target的bundle id,但是出现了如下问题

"This app contains an app extension with an illegal bundle identifier. App extension bundle identifiers must have a prefix consisting of their containing application's bundle identifier followed by a '.'."

这是因为target的bundle id 与app的证书是有关联的,比如你app的bundle id是
com.company.appname ,那么你的target的bundle id 应该是com.company.appname.extensionname

这个的问题参考这篇文章

0 0
原创粉丝点击