xcode 应用程序不包含有效的包标识符。
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8578769/
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
The application does not contain a valid bundle identifier.
提问by coder
I know this question has been asked before, but I have tried the given solutions, and none have worked. I am switching development computers, and starting a brand new project on my new computer. We already have a certificate that we used on the old computer, so I exported the Developer Certificate from my old computer, and installed it in my new machine. I created and downloaded a provisioning profile for my new application on the new computer. I am trying to run the application on a test device, whose UDID I added to the provisioning profile, so it would be valid for this device.
我知道以前有人问过这个问题,但我已经尝试了给定的解决方案,但没有一个奏效。我正在更换开发计算机,并在我的新计算机上开始一个全新的项目。我们已经有了旧电脑上使用的证书,所以我从旧电脑上导出了开发者证书,并安装在我的新机器上。我在新计算机上为我的新应用程序创建并下载了配置文件。我正在尝试在测试设备上运行该应用程序,我将其 UDID 添加到配置文件中,因此它对该设备有效。
The provisioning profile was created with the apple ID I created online with the the form com.mycompany.projectname.
供应配置文件是使用我在线创建的 Apple ID 创建的,格式为 com.mycompany.projectname。
When I try to run the application on the test device(it does not work on the simulator either), I get an error popup that says The application does not contain a valid bundle identifier.
当我尝试在测试设备上运行应用程序时(它也不适用于模拟器),我收到一个错误弹出窗口,提示应用程序不包含有效的包标识符。
My bundle identifier, which I checked both the Targets -> Summary -> Identifier and the Info.plist is showing correctly in the form of com.mycompany.projectname, with neither the company name, nor the project name having any special characters in it.
我的包标识符,我检查了 Targets -> Summary -> Identifier 和 Info.plist 以 com.mycompany.projectname 的形式正确显示,公司名称和项目名称中都没有任何特殊字符.
Am I missing something? I have been beating my head against the wall with this for a while now...
我错过了什么吗?我已经用这个把头撞在墙上有一段时间了......
采纳答案by CodaFi
I remember the last time this happened to us was when we noobishly trashed our app's plist. Luckily, we had an older copy on the old time capsule, and restored it. But we had changed the bundle ID since and it kept showing us that error. Matching the cert with the Bundle ID is critical. Make ABSOLUTELY sure the names on the cert match the bundle ID, or check the organizer to see if the cert even installed in the first place. If need be, as an absolute last resort, change the bundle ID and get a new cert.
我记得上一次发生在我们身上的时候是我们笨拙地破坏了我们应用程序的 plist。幸运的是,我们在旧时间胶囊上有一个旧副本,并恢复了它。但是从那以后我们更改了包 ID,它一直向我们显示该错误。将证书与捆绑 ID 匹配至关重要。绝对确保证书上的名称与捆绑 ID 匹配,或者检查组织者以查看证书是否已经安装。如果需要,作为绝对的最后手段,更改捆绑 ID 并获取新证书。
回答by tongzhendelanman
We ensure that “the plist” and “ general->identify->Bundle Identifier ” have a same Bundle Identifier。and the Bundle Identifier's stytle maybe be like "com.mycompany.projectname "
我们确保“plist”和“general->identify->Bundle Identifier”具有相同的Bundle Identifier。Bundle Identifier的样式可能类似于“com.mycompany.projectname”
Follow these steps:
按着这些次序:
look plist whether have the Bundle Identifier
look general->identify->Bundle Identifier whether the same as plist in Xcode
if the same maybe Bundle Identifier is inAppropriate。 so you can set Bundle Identifier like "com.mycompany.projectname "
查看 plist 是否有 Bundle Identifier
看general->identify->Bundle Identifier 是否和Xcode中的plist一样
如果相同,可能 Bundle Identifier 是不合适的。 所以你可以设置 Bundle Identifier 如“com.mycompany.projectname”