xcode 部署到真实设备时出现的问题:用于签署可执行文件的身份不再有效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2161877/
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
Problem when deploy to real device: The identity used to sign the executable is no longer valid
提问by hungbm06
How to solve this problem, please help:
如何解决这个问题,请帮助:
More detail, please view this image: detail image
更多细节请查看此图:细节图
回答by Massimo Cafaro
It appears that your certificate has expired, assuming your clock is correctly set on your machine. Open the keychain access application and view the details of the certificate you generated on the developer portal. If the certificate is expired, then you need to create a new one from the portal, download and install it on your machine. Then, you will need to modify in your project settings the identity signing the code to reflect your new certificate.
假设您的机器上的时钟设置正确,您的证书似乎已过期。打开钥匙串访问应用程序并查看您在开发人员门户上生成的证书的详细信息。如果证书已过期,则您需要从门户创建一个新证书,将其下载并安装到您的机器上。然后,您需要在项目设置中修改签名代码的身份以反映您的新证书。
回答by Enrico Susatyo
I tried a few things, including restarting (both the iPhone, and Xcode), but here's a few things that you can do if you're having this problem:
我尝试了一些方法,包括重新启动(iPhone 和 Xcode),但如果遇到此问题,您可以执行以下操作:
- Go to Keychain Access, find your developer profile, delete them and re download it from Developer Member Centre.
- In Xcode, go to Preferences -> Accounts and remove your Apple ID, and add it back.
- In my case, doing the above will trigger Xcode to create me a new certificate. I just did that and it worked.
- 转到 Keychain Access,找到您的开发者资料,将其删除并从 Developer Member Centre 重新下载。
- 在 Xcode 中,转到 Preferences -> Accounts 并删除您的 Apple ID,然后将其添加回来。
- 就我而言,执行上述操作将触发 Xcode 为我创建一个新证书。我就是这样做的,它奏效了。