iOS 应用测试:未找到代码签名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11971875/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 19:44:26  来源:igfitidea点击:

iOS App testing: No Code signature found

iostestingipod

提问by Chandu

I do not have iPhone developer account. I want to test my app on my iPod Touch.

我没有 iPhone 开发者帐户。我想在我的 iPod Touch 上测试我的应用程序。

iPod iOS version : 5.1 (9B176 build) Xcode Development SDK : 5.1 Simulators : iPhone 5.1 Retina/normal iPad 5.1 Retina/Normal

iPod iOS 版本:5.1(9B176 版本)Xcode 开发 SDK:5.1 模拟器:iPhone 5.1 Retina/普通 iPad 5.1 Retina/普通

To bypass code signing etc, I changed changed the project settings like below.

为了绕过代码签名等,我更改了如下项目设置。

Code signing identity   Don't code sign
  Debug                 Don't code sign
    Any iOS SDK         Don't code sign
Release                 Don't code sign
  Any iOS SDK           Don't code sign

I connected my iPod-Touch to my MacBook Pro, selected iPod as my target (instead simulator), built the project and ran it. Then I am getting the error "No Code Signature found."

我将 iPod-Touch 连接到我的 MacBook Pro,选择 iPod 作为我的目标(而不是模拟器),构建项目并运行它。然后我收到错误“找不到代码签名”。

Any help?

有什么帮助吗?

Note: I did not create any app certificate etc. (I don't have app dev account)

注意:我没有创建任何应用程序证书等(我没有应用程序开发帐户)

回答by Adam

You can also get this error if a build gets interrupted partway through. It corrupts Xcode's internal data (why are they saving corruptible data? I have no idea).

如果构建在中途中断,您也可能收到此错误。它破坏了 Xcode 的内部数据(他们为什么要保存可破坏的数据?我不知道)。

Shut down xcode, and restart, do a fresh build ... and it will usually go away.

关闭 xcode,然后重新启动,重新构建……它通常会消失。

回答by knagode

Fully Clean Your Project

彻底清理你的项目

It helps if you fullyclean up build folder. The usual Project> Cleanmenu item is not thorough. Use the hidden alternative.

如果您完全清理构建文件夹,它会有所帮助。通常的Project>Clean菜单项并不彻底。使用隐藏的替代方案。

Hold down Optionkey (?) while choosing Product> Clean Build Folder…

Option选择Product> 时按住键 (?)Clean Build Folder…

The Option key transforms that menu item from "Clean" to "Clean Build Folder" and changes its behavior as discussed in this other question, XCode 4 “Clean” vs. “Clean Build Folder”.

Option 键将该菜单项从 "Clean" 转换为 "Clean Build Folder" 并更改其行为,如另一个问题XCode 4 “Clean” vs. “Clean Build Folder” 中所述

回答by erkanyildiz

You have to code sign if you want to run your app on an iDevice, unless it's jailbroken.

如果您想在 iDevice 上运行您的应用程序,则必须进行代码签名,除非它已越狱。

You have to have a development licence to code sign your apps.

您必须拥有开发许可证才能对您的应用程序进行代码签名。

If you don't want to buy a developer licence and you are a student, you can apply iOS Developer University Program which allows you to test your apps on actual devices but not to submit App Store.

如果您不想购买开发者许可并且您是学生,您可以申请 iOS 开发者大学计划,该计划允许您在实际设备上测试您的应用程序,但无需提交 App Store。

https://developer.apple.com/programs/ios/university/

https://developer.apple.com/programs/ios/university/

回答by Oscar Gomez

It is fine if you don't want to code sign it in the settings, but you MUST code sign it if you want to run it in a Device. That is of course unless you jailbreak your device... which is your only choice since you mention you do not have an app dev account.

如果您不想在设置中对其进行代码签名也可以,但是如果您想在设备中运行它,则必须对其进行代码签名。当然,除非你越狱你的设备......这是你唯一的选择,因为你提到你没有应用程序开发帐户。

回答by spogebob92

I got this error in Xcode 8.2 because I didn't have enough space on my device. Thanks Xcode for the descriptive error...

我在 Xcode 8.2 中遇到此错误,因为我的设备上没有足够的空间。感谢 Xcode 的描述性错误...

回答by Zhiyuan

This error means that your code can not be signed ,so the project can't run in your device .I found this problem because I changed "other C flags" in Build Settings.Remove the item you added ,it runs!

此错误意味着您的代码无法签名,因此该项目无法在您的设备中运行。我发现此问题是因为我在构建设置中更改了“其他 C 标志”。删除您添加的项目,它运行了!

回答by zippo

I got this problem when a prov-file was deleted. I generate a provisioning file ,and it's fixed.

当 prov 文件被删除时,我遇到了这个问题。我生成了一个配置文件,它是固定的。

回答by Naloiko Eugene

I was playing with the following file - with the CODE_SIGNING_REQUIRED property. By default it is YES. I've changed it to NO - to try to generate an unsigned .ipa.

我正在使用以下文件 - 带有 CODE_SIGNING_REQUIRED 属性。默认情况下是 YES。我已将其更改为 NO - 尝试生成未签名的 .ipa。

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk The SDKSettings file

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk SDKSettings 文件

The settings were set to "Don't code sign". After that I needed to run the app on the device, but got this "No Code Signature found" error. After I've set all the teams, profiles, code signing identities correctly - the issue still appeared. Set back the CODE_SIGNING_REQUIRED to YES.

设置被设置为“不要编码签名”。之后,我需要在设备上运行该应用程序,但出现“未找到代码签名”错误。在我正确设置了所有团队、配置文件、代码签名身份后 - 问题仍然出现。将 CODE_SIGNING_REQUIRED 设置回 YES。

But somehow nothing helped - "No Code Signature found" error stayed there - had to reinstall the Xcode.

但不知何故没有任何帮助 - “未找到代码签名”错误仍然存​​在 - 不得不重新安装 Xcode。

回答by takatan

Cleaning caches and Xcode DerivedData folder helped me to solve this issue. After cleaning product and product build folder exit Xcode and remove everything in

清理缓存和 Xcode DerivedData 文件夹帮助我解决了这个问题。清理产品和产品构建文件夹后退出 Xcode 并删除所有内容

~/Library/Developer/Xcode/DerivedData

Then remove all files and folders related to Xcode in

然后删除所有与Xcode相关的文件和文件夹

~/Library/Caches

回答by Hoven

I Used this:

我用过这个:

Right click on XCode.app file in your Application folder and Go to the path :

右键单击应用程序文件夹中的 XCode.app 文件并转到路径:

Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk

Open file SDKSettings.plistand check value for CODE_SIGNING_REQUIRED. If it is set 'NO' then set it 'YES'.

打开文件SDKSettings.plist并检查CODE_SIGNING_REQUIRED. 如果设置了“NO”,然后设置“YES”。

Now relaunch the XCode. If it does not work again, then clear XCode DerivedData folder.

现在重新启动 XCode。如果它再次不起作用,则清除 XCode DerivedData 文件夹。

see : this

见:这个