Command /usr/bin/codesign failed with exit code 1 Xcode CocoaPods - ios

I've been trying to debug this error for hours, it says Command /usr/bin/codesign failed with exit code 1
Seems to involve the code signing, and I've refreshed provisioning profiles, removed Derived Data, cleaned the project, and tried everything else on SO but nothing works. Any help would be greatly appreciated. Here's the screenshot:

// Check those link i am sure you got your solution
Command /usr/bin/codesign failed with exit code 1
/usr/bin/codesign failed with exit code 1
command/usr/bin/codesign failed with exit code 1- code sign error

Related

Can't build project - libswiftAVFoundation.dylib: errSecInternalComponent error: Task failed with exit 1 signal 0

Suddenly I can't build project.
I got this error upon building :
Products/Debug-iphoneos/MyApp.app/Frameworks/libswiftAVFoundation.dylib
/usr/bin/codesign '--force' '--sign'
'E5DD0B9344567811AABBF46F5AA802C26FAD6696' '--verbose'
'/Users/vlad/Library/Developer/Xcode/DerivedData/MyApp-aohzmfeceiyidabrejtgjtlfukvs/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/libswiftAVFoundation.dylib'
/Users/vlad/Library/Developer/Xcode/DerivedData/MyApp-aohzmfeceiyidabrejtgjtlfukvs/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/libswiftAVFoundation.dylib:
errSecInternalComponent error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign'
'E5DD0B9344567811AABBF46F5AA802C26FAD6696' '--verbose'
'/Users/vlad/Library/Developer/Xcode/DerivedData/MyApp-aohzmfeceiyidabrejtgjtlfukvs/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/libswiftAVFoundation.dylib'
}
I tried to re-include Swift libraries but it didn't help.
This happened after I tried to connect to Firebase but then erased it from the pod file.
Anyone can tell me where the problem is and how to solve it?
Clean (shift + cmd + k)
Delete Derived data (click file -> workplace settings -> click the arrow under derived data and delete the entire folder)
Clean again
Rebuild

iOS archive not working

I'm requesting your help to solve an archive issue for Apple iOS.
When I'm running the app with a local certificate everything is fine, but when I switch to archive (in order to publish it) I have an error.
Error is related with Alamofire and from what I consider with codesign
> Stripped
> /Users/..myuser../Library/Developer/Xcode/DerivedData/..myappname..-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/...myprojectname.../InstallationBuildProductsLocation/Applications//....app/Frameworks/Alamofire.framework/Alamofire
> of architectures: armv7 Code Signing
> /Users/...../Library/Developer/Xcode/DerivedData/......-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/..../InstallationBuildProductsLocation/Applications//.....app/Frameworks/Alamofire.framework
> with Identity iPhone Developer: name (code) /usr/bin/codesign --force
> --sign 7FEA49779804D0F60707E9954A90FE65C --preserve-metadata=identifier,entitlements '/Users/...../Library/Developer/Xcode/DerivedData/.....-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/...../InstallationBuildProductsLocation/Applications//.....app/Frameworks/Alamofire.framework'
> /Users/...../Library/Developer/Xcode/DerivedData/....-brxmobbquzmuhnbmcgzieifhgvjk/Build/Intermediates.noindex/ArchiveIntermediates/....../InstallationBuildProductsLocation/Applications//......app/Frameworks/Alamofire.framework:
> unknown error -1=ffffffffffffffff Command /bin/sh failed with exit
> code 1
Many thanks for your help
Solved.
Somehow the keychain password "login" was my problem. Changing it solved the signed issue. It was not related with Alamofire package.

Swift stdlib tool Error -> Task failed with exit 1 signal - IOS

I am trying to launch my developed app on my iphone and I am getting a build fail with the following error. I do not know how to address the problem. Please can someone advise? I can build the app on the simulator but not on the iphone.
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign' 'CF34DF6AAC83D040CB9CA5907F171518DB7A331F' '--verbose' '/Users/johnDow/Library/Developer/Xcode/DerivedData/myApp-dfuggtbkfdkixtemtcsnzflclljy/Build/Products/Debug-iphoneos/myApp.app/Frameworks/libswiftCore.dylib'
}
Try to reset the derived Data
rm -rf /Users/johnDow/Library/Developer/Xcode/DerivedData/*
If that doesn't work I had to re install xcode AND restart computer to fix it

SecKey API returned: -25304 libswiftAVFoundation.dylib: unknown error -1=ffffffffffffffff error: Task failed with exit 1 signal 0

Since 10.12 Sierra major update, I can't compile one of my iOS projects on only on device. But very weird, it's work on simulator.
I tried to remove and resetup my dev account in Xcode, hard reboot, remove and resetup all certificates in keychain, etc.
XCode 8.0. I tried also on 8.1 beta too, same.
The error :
SecKey API returned: -25304, (null)/Users/****/Library/Developer/Xcode/DerivedData/****-epkppprfmidyatftsvnxgjqsawit/Build/Products/Debug-iphoneos/****.app/Frameworks/libswiftAVFoundation.dylib: unknown error -1=ffffffffffffffff
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign' 'C47B52FDE2CABFC81D33BED8937984AF8BC6DC33' '--verbose' '/Users/****/Library/Developer/Xcode/DerivedData/****-epkppprfmidyatftsvnxgjqsawit/Build/Products/Debug-iphoneos/***.app/Frameworks/libswiftAVFoundation.dylib'
I had the same issue,
Unlock your keychain by adding this line to your projects configuration (Build>Execute shell)
#unlock the keychain
security unlock-keychain -p "myPrettyPassword" $HOME/Library/Keychains/MyPrettyKeychain.keychain

Jenkins error: /usr/bin/codesign --force failed exit code 1

I am configuring CI for my IOS project on MAC yosemite-OS and got on problem:
error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign /Users/mitul/Desktop/jenkins_ios_profile/PCertificates.p12 --resource-rules=/var/folders/rj/cc6d38nn53v6tk8y4jn7ghkr0000gp/T/42RbMszHQX/Payload/XXX.app/ResourceRules.plist /var/folders/rj/cc6d38nn53v6tk8y4jn7ghkr0000gp/T/42RbMszHQX/Payload/XXX.app failed with error 1
even my build and archive are getting success but not able to make .ipa file
even tried all possibilities from this
/usr/bin/codesign failed with exit code 1 but no luck
Please help me what I am missing to do
My Xcode configuration is as follows:
Custom xcodebuild arguments:
CODE_SIGN_RESOURCE_RULES_PATH=/Users/mitul/Public/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ResourceRules.plist
rest are all with default setting
I unchecked the code signing checkbox in jenkins project configuration and it started building, hope it can help some else too!

Resources