ios iOS应用测试。应用安装失败。未找到代码签名

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

iOS app testing. App installation failed. No code signature found

iosiphoneswiftxcodedebugging

提问by Robert Khayreev

I've tried to install my app on several iOS devices. But this thing didn't let me to.

我尝试在多个 iOS 设备上安装我的应用程序。但这件事并没有让我去。

enter image description here

在此处输入图片说明

I want to know, what the problem is and how should I solve it.

我想知道,问题是什么,我应该如何解决。

回答by derevo

I'm my case problem was on unsigned frameworks: build phases > copy files > code sign on copy (set checkboxes)

我的案例问题出在未签名的框架上:构建阶段 > 复制文件 > 复制代码签名(设置复选框)

In case Xcode Version 11.2.1 (11B500)

如果 Xcode 版本 11.2.1 (11B500)

go to build phase

进入构建阶段

Expand Embedded frameworks

展开嵌入式框架

Code Sign on Copy (set checkboxes)

复制代码签名(设置复选框)

enter image description here

在此处输入图片说明

回答by ucotta

I had this problem, this is what I did to resolve it:

我遇到了这个问题,这是我为解决它所做的:

  • Run "clean" in Xcode
  • Close Xcode
  • Remove all data in ~/Library/Developer/Xcode/DerivedData
  • Remove all xuserdata folders in your project (check in your xcodeproj and project.xcworkspace directories)
  • 在 Xcode 中运行“clean”
  • 关闭 Xcode
  • 删除 ~/Library/Developer/Xcode/DerivedData 中的所有数据
  • 删除项目中的所有 xuserdata 文件夹(检查您的 xcodeproj 和 project.xcworkspace 目录)

Only if you have Cocoapodsin your project:

仅当您的项目中有 Cocoapods时:

  • Run pod deintegrate.
  • Remove your .xcworkspace if it was created by cocoapods.
  • Run pod install or update
  • 运行 pod deintegrate。
  • 如果 .xcworkspace 是由 cocoapods 创建的,请删除它。
  • 运行 pod install 或 update

Now you can open your fresh Xcode.

现在您可以打开新的 Xcode。

Hope this help you.

希望这对你有帮助。

In my case the problem was created by adding a new cocoa touch framework.

在我的情况下,问题是通过添加一个新的可可触摸框架造成的。

回答by rockdaswift

If "code sign on copy" fails, then check if you are modifying the frameworks in a run script after the "Embed Frameworks" phase.

如果“代码签名复制”失败,请检查您是否在“嵌入框架”阶段之后修改运行脚本中的框架。

If you are, then move the Run script to a position before the "Embed Frameworks" phase.

如果是,则将运行脚本移动到“嵌入框架”阶段之前的位置。

回答by Alok

In my case, I have created an unsigned IPA fileand for this i had made some changes in SDKSetting.plist file (changed CODE_SIGNING_REQUIRED = NO) and it should be always YES if you are running application on the device.

就我而言,我创建了一个未签名的 IPA 文件,为此我对 SDKSetting.plist 文件进行了一些更改(更改了 CODE_SIGNING_REQUIRED = NO),如果您在设备上运行应用程序,它应该始终为 YES。

To resolve this follow the below steps: Steps to create unsigned IPA(Tested on Xcode 9.4.1)

要解决此问题,请执行以下步骤: 创建未签名 IPA 的步骤(在 Xcode 9.4.1 上测试)

Step 1:Open finder > Go to Folder..as below screen

第 1 步:打开 finder > Go to Folder..如下图所示

enter image description here

在此处输入图片说明

and then copy and past the below line:

然后复制并通过以下行:

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

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

Open iPhoneOS.sdk as showing in below image: enter image description here

打开 iPhoneOS.sdk,如下图所示: 在此处输入图片说明

Step 2:Copy the SDKSettings plist in another folder because you can't make changes here:

第 2 步:将 SDKSettings plist 复制到另一个文件夹中,因为您无法在此处进行更改:

Step 3:Make the change in duplicate

第 3 步:进行重复更改

set CODE_SIGNING_REQUIRED to YESenter image description here

CODE_SIGNING_REQUIRED设置为 YES在此处输入图片说明

Step 4:Now replace duplicate Plist with the original one (Both names must be the same). This will also ask admin permission to change.

第 4 步:现在用原来的 Plist 替换重复的 Plist(两个名称必须相同)。这也将要求管理员权限进行更改。

********************************OR**************************************

********************************或者***************** ************************

If you will update your Xcode then the problem will also disappear because updated xcode will come with default SDKSetting.plist

如果您将更新 Xcode,那么问题也会消失,因为更新后的 xcode 将附带默认 SDKSetting.plist

回答by Avaan

I also faced same issue. I tried all above solution none work from me.

我也面临同样的问题。我尝试了上述所有解决方案,但对我没有任何作用。

Below stuff worked for me,

下面的东西对我有用,

  1. Select Build settings
  2. Locate "Code Signing identity"
  3. select "IOS Developer" or any other correct option for all.
  1. 选择构建设置
  2. 找到“代码签名身份”
  3. 为所有人选择“IOS Developer”或任何其他正确的选项。

Then build and run.

然后构建并运行。

回答by Alix

Folks, My problem's Root cause was modifications that were done by iOSOpenDev installer. I did restore the original plist file that was backed up by the installer. that solved my problem you need to look into the SDK directory to see if something funky has happened. at least one more option to try.

伙计们,我的问题的根本原因是由 iOSOpenDev 安装程序完成的修改。我确实恢复了安装程序备份的原始 plist 文件。这解决了我的问题,您需要查看 SDK 目录以查看是否发生了一些奇怪的事情。至少还有一种选择可以尝试。

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS<SDK version>.sdk/

example:

例子:

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

by default code signing must be turned on, if that is turned off then something funky happened. (for ref See Alok's answer below)
If nothing works. My recommendation would be to delete and reinstall Xcode as this error would not arise in the normal scenarios. So resetting Xcode can greatly reduce troubleshooting time.

默认情况下,代码签名必须打开,如果关闭,则发生了一些奇怪的事情。(对于参考,请参阅下面的 Alok 的回答)
如果没有任何效果。我的建议是删除并重新安装 Xcode,因为在正常情况下不会出现此错误。因此重置 Xcode 可以大大减少故障排除时间。

回答by M Murteza

I have some issues during App upload to the Appstore then i Add Some Code in Build Phase -> Run Script

我在将应用程序上传到 Appstore 期间遇到了一些问题,然后我在构建阶段添加了一些代码 -> 运行脚本

done I clean Build folder and remove t above code from Run Script And Build again and run on my Iphone it work fine

完成我清理 Build 文件夹并从 Run Script And Build 中删除上面的代码并在我的 Iphone 上运行它工作正常

You can remove the code of run script or check the check box of ."Run script only when installing " then also it will work

您可以删除运行脚本的代码或选中“仅在安装时运行脚本”的复选框,然后它也可以工作

回答by Theo

Enabling "Automatically manage signing" solved the issue for me. (In the target settings, "General" tab, section "Signing")

启用“自动管理签名”为我解决了这个问题。(在目标设置,“常规”选项卡,“签名”部分)

回答by manncito

Tried everything here and nothing worked except restarting my device.

在这里尝试了一切,除了重新启动我的设备外,没有任何效果。

回答by Alexander B

1) Try to clean project 2) Try to relaunch XCode 3) Reset your mac

1) 尝试清理项目 2) 尝试重新启动 XCode 3) 重置您的 mac