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

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

Related

Xcode 10 Signing Error: Frameworks/libswiftsimd.dylib: code object is not signed at all

I've recently upgraded to Xcode 10.2.1 - clients have updated their devices to iOS 12.2 which caused features of mobile app to stop working (camera / qr scanner). So rebuilt my app in new Xcode (it's an ionic app). I can build and run in the simulator via Xcode but can't archive for distribution. Looks like a code signing error which I can't get around.
Have already tried re-assigning profiles, cleaning build, deleting derived data.
Log output
probing signature of /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/usr/bin/codesign -r- --display /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib: code object is not signed at all
Codesigning /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/usr/bin/codesign --force --sign E53B3573B6BABE35C4A71D789E5E5058D1895105 --verbose /Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib
/Users/sam/Library/Developer/Xcode/DerivedData/Bootcamp_Admin-ajntpyeonsdorvblemqwhyetkmpr/Build/Intermediates.noindex/ArchiveIntermediates/Bootcamp Admin/InstallationBuildProductsLocation/Applications/Bootcamp Admin.app/Frameworks/libswiftsimd.dylib: errSecInternalComponent
error: Failed with exit code 1
In Xcode Menu - File -> Project Settings
Change Build System - to Legacy Build System and try
Let me know if it works

Task failed with exit 1 signal 0 {

i have updated my mac OS with High sierra and updated my xcode from 9.2 beta to 9.3 now i'm trying to run my project in xcode but i'm getting this error,
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign' 'D07F0514ABB5168A2686CB2404531DC9F81CBB26' '--verbose' '/Users/hamza/Library/Developer/Xcode/DerivedData/ARPortalDemo-ablkjxbynnihakhdfdihocryaejd/Build/Products/Debug-iphoneos/ARPortalDemo.app/Frameworks/libswiftARKit.dylib'
}
I have searched about the solution many of them are saying to delete the derived data.I have done that but it isn't going. How can i resolve this? Why this error comes?

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

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