Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode code siging error XCTest

When I try to run my application on a simulator, everything works fine. But when I try to build it to test it on a real device, I get the following error:

CodeSign /Users/fvoordeckers/Library/Developer/Xcode/DerivedData/MyProject-##########/Build/Products/Debug-iphoneos/MyProject.xctest
cd /Users/fvoordeckers/Documents/Projecten/MyProject/iOS
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer: Frederik (########)"

/usr/bin/codesign --force --sign ##################/Users/fvoordeckers/Library/Developer/Xcode/DerivedData/MyProject-##########/Build/Products/Debug-iphoneos/MyProject.xctest

/Users/fvoordeckers/Library/Developer/Xcode/DerivedData/MyProject-##########/Build/Products/Debug-iphoneos/MyProject.xctest: bundle format unrecognized, invalid, or unsuitable

Command /usr/bin/codesign failed with exit code 1

I've changed IDs with #. I created a provisioning profile that includes the device I'm using and al the required certificates. It doesn't seem to have a problem with the app but with the xctest... I also tried adding the '--deep' flag to the signing configuration but it didn't help...

like image 392
Frederik Voordeckers Avatar asked Dec 15 '14 11:12

Frederik Voordeckers


People also ask

How do I manually manage signing in Xcode?

Open the project using Xcode. Select the root project directory, and go to the Signing and Capabilities tab. Here, you can either check Automatically manage signing or do the signing manually. If you check the Automatically manage signing checkbox, then you will just need to select the Team from the drop-down list.

What is code signing in Xcode?

Code signing your app assures users that it's from a known source and hasn't been modified since it was last signed. Before your app can integrate app services, be installed on a device, or be submitted to the App Store, it must be signed with a certificate issued by Apple.

What is code signing identity in iOS?

What is Code Signing Identity? As per Apple, it's their security mechanism, which is used for authenticating identity. It assures users that the applications are trustworthy, and they are created by an Apple authorized source, and it hasn't tampered.


1 Answers

Go to Edit Scheme in xcode -> In Build Target -> Remove MyProject.xctest completely or uncheck all the boxes of MyProject.xctest Analyze , Test etc..

Clean your project and then Run on the device.

like image 178
dasCS Avatar answered Nov 15 '22 06:11

dasCS