Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode won't let to build for Device after denying Codesign to access Keychain

I'm new to iOS development and today I tried to check my app on my iPhone and tried to build it for the device. So when I clicked on build, it asked to type my password to let codesign to access keychain. But after few attempts, I accidentally clicked on deny button. Then after again I tried to build my app for the device and now it says,

Swift sodlib tool error, task failed with exit 1 signal 0 

And when I check that error it says,

unknown error -1=ffffffffffffffff error: Task failed with exit 1 signal 0 { /usr/bin/codesign '--force' '--sign' 'A6646CD79C82476C1C35598A10134D3171EE09CD' '--verbose' '/Users/samitha/Library/Developer/Xcode/DerivedData/TestFoodTracker-gdcqosdrvtooqocosgttmwyzvgtg/Build/Products/Debug-iphoneos/TestFoodTracker.app/Frameworks/libswiftContacts.dylib' 

What I Did

I tried to let codesign to access "keychain Access" and checked every key under login, but in Access Control section of each key, "Allow all applications to access this item" have been selected.

I couldn't find any more ways to correct that mistake and let my app to be built for my device. Please if there anyone know how to correct this, just help me. Thanks.

like image 763
Samitha Nanayakkara Avatar asked Dec 12 '17 10:12

Samitha Nanayakkara


People also ask

How do I always allow Keychain Access on my Mac?

You can set a length of time that Keychain Access waits before automatically requiring you to enter your password again. In the Keychain Access app on your Mac, click “login” in the Keychains list. Choose Edit > Change Settings for Keychain “login”. Select the “Lock after” tickbox, then enter a number of minutes.

How do I know what my login keychain password is?

If you don't remember your original password, you'll need to delete the keychain. Deleting a keychain also deletes all the password data saved in that keychain.

What is Safari wants to use the login keychain?

By default Keychain is set to sync it's password with your user account's password, allowing it to unlock when you login to your account, which in turn provides applications & processes access to it's contents.


1 Answers

I found a solution for that. If that error occurs, only you have to do is just lock the keychain (click on lock in the left upper most corner). Then build again. It will ask to unlock again like first time and Let you to choose always allow or allow or deny in Codesign keychain access. Just type account (Mac User account) password and click on always allow. Then project will build successfully.

like image 142
Samitha Nanayakkara Avatar answered Nov 05 '22 17:11

Samitha Nanayakkara