问题
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