简体   繁体   English

拒绝Codesign访问Keychain后,Xcode将不允许为Device构建

[英]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. 我是iOS开发的新手,今天我尝试在iPhone上检查我的应用,并尝试为该设备构建它。 So when I clicked on build, it asked to type my password to let codesign to access keychain. 因此,当我单击build时,它要求输入密码以允许codesign访问钥匙串。 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. 我试图让codesign访问“ keychain Access”并检查了登录下的每个密钥,但是在每个密钥的“访问控制”部分中,已选择“允许所有应用程序访问此项目”。

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. 谢谢。

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. 它将像第一次一样要求再次解锁,并让您选择always allowallowdeny Codesign钥匙串访问。 Just type account (Mac User account) password and click on always allow. 只需输入帐户(Mac用户帐户)密码,然后单击始终允许。 Then project will build successfully. 然后项目将成功构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM