欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

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

程序员文章站 2023-11-28 23:02:40
上两篇文章说了本地通知的相关内容,做了测试的推送证书,运行在真机上出现如下问题: 1、第一次报如下错误 this application or a bundle it contains has...

上两篇文章说了本地通知的相关内容,做了测试的推送证书,运行在真机上出现如下问题:
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.

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

原因是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