Mac OSX asking for keychain access when building MonoDevelop iOS App

て烟熏妆下的殇ゞ 提交于 2019-12-01 23:57:03

问题


When building projects in MonoDevelop on the Mac, I get the message "MAC OS X wants to make changes.Type an administrator's name and password to allow this. MAC OSX wants to use system keychain."

I found the post Mac OS X wants to use system keychain when compiling the project but this doesn't quite answer my problem. The profiles I installed were done via XCode and are my current/valid profiles on the Provisioning Profile so I assume these are Ok - XCode reports they're valid.

I've moved my dev environment from a Macbook (where compiling apps worked fine, without this error) to another Mac and this has started appearing. If I enter my username/password it compiles and works.

Any ideas why this is happening?

(One thing which I wonder may be causing a problem... when I ORIGINALLY setup the dev env on my Macbook, I exported/backed up my certificate as Jonny WIlson.p12. On my new Mac however, I couldn't import this. I tried re-exporting it and importing it again, this too failed. Is this INITIAL certificate (used to generate your development/distribution certificated in the Provisioning Profile) a vital part of getting this working? I'm asking this because I read in a forum once you have your Apple certs, this key is no longer needed? Is this correct?)


回答1:


In my case I went to Keychain Access, selected "system" in "Keychains" (top left). Then for each item: right click, "Get Info", "Access Control" and added Xcode in "Always allow acces by these applications:" list.

(I'm not using MonoDevelop, but guess the problem reason is similar)




回答2:


Hat tip: https://forums.developer.apple.com/thread/25092

Since El Capitan, you can no longer click on "Allow" or "Always allow" programmatically.

This includes from Screen Sharing!

Supposedly you can just plug in a mouse to your headless Mac and click "Always Allow". This didn't work by me until I closed all active Screen Sharing sessions.

Then I plugged in a monitor, mouse & keyboard, clicked "Alway Allow" and life is good; until i have to deal with a new certificate.




回答3:


Fix for El Capitan:

  1. export certificate to .p12
  2. open terminal
  3. run: security import <pathToP12> -k <keychain_name>.keychain -t priv -f pkcs12 -A

You will be asked to enter keychain password and that's all.



来源:https://stackoverflow.com/questions/13341024/mac-osx-asking-for-keychain-access-when-building-monodevelop-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!