Xcode Command CodeSign failed with non zero when deploying to device

两盒软妹~` 提交于 2020-03-28 07:00:08

问题


I received this error when trying to deploy application to device. I am using Xcode 10.1 with free developer account. In signing section I set personal team with signing certificate iPhone Developer. I can ran the app in iOS simulator but not run in real device.

Exact error message:

CodeSign /Users/***/Library/Developer/Xcode/DerivedData/****-eqztbodhqkugrwevuvkmzysmcvdj/Build/Products/Debug-iphoneos/****\ Mobile.app (in target: ******)

cd /Users/***/Projects/**********/platforms/ios

export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate



Signing Identity:     "iPhone Developer:******@*****.com (QALD7Y5PCU)"

Provisioning Profile: "iOS Team Provisioning Profile: com.***.****"

                      (7475de4a-3ae3-4798-9c9c-a8e65a1bc1b9)



/usr/bin/codesign --force --sign 55DEB33A3DF3254D66B1AC6CEACB052CABCF3644 --entitlements /Users/***/Library/Developer/Xcode/DerivedData/************-eqztbodhqkugrwevuvkmzysmcvdj/Build/Intermediates.noindex/****\ Mobile.build/Debug-iphoneos/****\ Mobile.build/****\ Mobile.app.xcent --timestamp=none /Users/****/Library/Developer/Xcode/DerivedData/**********-eqztbodhqkugrwevuvkmzysmcvdj/Build/Products/Debug-iphoneos/****\ Mobile.app



/Users/****/Library/Developer/Xcode/DerivedData/********-eqztbodhqkugrwevuvkmzysmcvdj/Build/Products/Debug-iphoneos/**** Mobile.app: errSecInternalComponent

Command CodeSign failed with a nonzero exit code


回答1:


I got same issue , my certificates was created automatically but Device Udid does not create. then check your device Udid is exist on your Apple developer Account and also check your Bundle identifier?

// hope its works for you thanks




回答2:


Your code signing for free account should look like this




回答3:


I also encountered this error, in my experience I am trying to run my app in a device which is not registered in my provisioning profile. To resolve this, you need to make sure you are not using a production provisioning profile because you can not assign a device there. Use development provisioning profile, assign the device in that provisioning profile, download the provisioning profile and double click it. Build again and it should work.




回答4:


I experienced this error today, and it resolved with steps below.

1 Deleted newly added image from Asset folder. 2 Restarted my mac computer. 3 Re-launched xCode and did a clean build.



来源:https://stackoverflow.com/questions/55335808/xcode-command-codesign-failed-with-non-zero-when-deploying-to-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!