xcode 找不到此可执行文件的有效配置文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17200176/
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
A valid provisioning profile for this executable was not found
提问by Jenny
"A valid provisioning profile for this executable was not found." Is what it says. The device I am trying to test on worked in the past and shows up in the developer certificate section, and in the Xcode organizer. I've tried following similar stack overflow questions, which have had me doing a lot of confusing things like deleting profiles or certificates, but nothing is working. I'm worried I've somehow made things worse.
“未找到此可执行文件的有效配置文件。” 就是它所说的。我正在尝试测试的设备过去工作过,并显示在开发人员证书部分和 Xcode 管理器中。我试过遵循类似的堆栈溢出问题,这让我做了很多令人困惑的事情,例如删除配置文件或证书,但没有任何效果。我担心我以某种方式让事情变得更糟。
I can use the Organizer to view the device just fine, and can see that it has a provisioning profile.
我可以使用管理器很好地查看设备,并且可以看到它有一个配置文件。
I can use a completely new device to connect, and it is added in Xcode and in the developer center, and it still says that my application can't run on the device.
我可以用一个全新的设备来连接,并且在Xcode和开发者中心中添加了它,它仍然说我的应用程序无法在该设备上运行。
In organizer, when I click on the device, it shows two applications, one of which is the old name of the application I am trying to run (with the old icon). Not sure if this is relevant.
在管理器中,当我单击设备时,它会显示两个应用程序,其中一个是我尝试运行的应用程序的旧名称(带有旧图标)。不确定这是否相关。
If I go to the new device, it has no applications at all listed.
如果我转到新设备,它根本没有列出任何应用程序。
I have no idea what to do.
我不知道该怎么做。
Edit:
编辑:
I made another test application, added it's app id in apple developer, made a provisioning profile for it, installed the profile on the device, and was able to run just fine. I followed the exact same steps I had used to re-make a provisioning profile for the original app (even confirming by making a new profile and reprovisioning)
我制作了另一个测试应用程序,在苹果开发者中添加了它的应用程序 ID,为它制作了一个配置文件,在设备上安装了该配置文件,并且能够正常运行。我遵循了与为原始应用程序重新制作配置文件时使用的完全相同的步骤(甚至通过创建新配置文件和重新配置文件进行确认)
So...something's wrong with the original app, but not xcode or the device(s) in question.
所以......原始应用程序有问题,但不是 xcode 或有问题的设备。
I deleted EVERY development profile besides the test one that worked on a different app. I made a new development profile that was as identical to the distribution profile (which still works) as possible. I deleted all old profiles in xcode, and on the device. I tried to run on the device and it still didn't work.
除了在不同应用程序上运行的测试配置文件之外,我删除了所有开发配置文件。我制作了一个新的开发配置文件,它尽可能与分发配置文件(仍然有效)相同。我删除了 xcode 和设备上的所有旧配置文件。我尝试在设备上运行,但仍然无法正常工作。
Does anybody have any ideas?
有人有任何想法吗?
Edit:
编辑:
I have found a potential problem, that I am trying to solve. My distribution certificate (which works) has my current last name, but my development certificate has my maiden name (I was married between making my account and distributing my app, and had to do name change things with apple). Is it possible it's an error on their end. When I view the certificate on the developer website it has the correct name, but when I download it the name is incorrect.
我发现了一个潜在的问题,我正在努力解决。我的分发证书(有效)有我现在的姓氏,但我的开发证书有我的娘家姓(我在创建帐户和分发我的应用程序之间结婚,并且不得不与苹果做更名的事情)。这可能是他们的错误。当我在开发者网站上查看证书时,它的名称是正确的,但是当我下载它时,名称是不正确的。
But...wait... If it were the certificates fault, wouldn't it also not work for my other test app's development profile?
但是...等等...如果是证书错误,它是否也不适用于我的其他测试应用程序的开发配置文件?
采纳答案by Jenny
It did turn out that it was the fault of my last name changing between generating the development certificate and generating the distribution certificate. The certificate itself was valid, and had two months until it expired, but apparently having the wrong name messed stuff up.
事实证明,这是我在生成开发证书和生成分发证书之间更改姓氏的错误。证书本身是有效的,并且还有两个月的时间到期,但显然名称错误使事情变得一团糟。
I deleted the certificate locally. I revoked it on the developer site. That fixed things. (I HAD made an entirely new certificate and attached it to the broken app, but until I revoked the old one it didn't work).
我在本地删除了证书。我在开发者网站上撤销了它。那固定的东西。(我制作了一个全新的证书并将其附加到损坏的应用程序上,但直到我撤销旧证书它才起作用)。
I have NO idea why a certificate problem only effected the app created with my old last name and not the new test app.
我不知道为什么证书问题只影响使用我的旧姓氏创建的应用程序而不是新的测试应用程序。
回答by mjk
Assuming that your certificates are all valid and properly installed and that your devices are all properly registered, the most likely cause is a mismatch between the App ID in the provisioning profile and the Bundle Identifier in the application. Go to your provisioning profile and see what App Id it is associated with. The Bundle Identifier in the application Target in Xcode must match this App Id. If the App Id contains a wild card (for example com.mydomain.* then the Bundle Identifier must be com.mydomain.anything. If the App Id does not contain a wild card then the Bundle Identifier must match exactly.
假设您的证书都有效且正确安装,并且您的设备都已正确注册,最可能的原因是配置文件中的 App ID 与应用程序中的捆绑标识符不匹配。转到您的配置文件并查看它关联的 App Id。Xcode 中应用程序 Target 中的 Bundle Identifier 必须与此 App Id 匹配。如果 App Id 包含通配符(例如com.mydomain.* 则 Bundle Identifier 必须是com.mydomain.anything。如果 App Id 不包含通配符,则 Bundle Identifier 必须完全匹配。
If the App Id and Bundle Identifier don't match then you will need to either change the Bundle Identifier or create a new Provisioning Profile using an App Id that matches the Bundle Identifier in your project.
如果 App Id 和 Bundle Identifier 不匹配,则您需要更改 Bundle Identifier 或使用与项目中的 Bundle Identifier 匹配的 App Id 创建新的 Provisioning Profile。