Introduction to the

Recently, when doing an automated iOS packaging background, shell is needed to call XcodeBuild to export ipA package. Codesign wants to Access key “Access” in your keychain is always displayed when packaging. You can’t use shell to close this box. If you don’t click always allow, you can’t type ipA

The solution

security set-key-partition-list -S apple-tool:,apple: -s -k keychainPass keychainName
Copy the code

Security set-key-partition-list Parameter description

Run the security set-key-partition-list command to view related parameters

security set-key-partition-list Usage: set-key-partition-list [options...]  [keychain] -a Match "application label" string -c Match "creator" (four-character code) -d Match keys that can decrypt -D Match "description" string -e Match keys that can encrypt -j Match "comment" string -l Match "label" string -r Match keys that can derive -s Match keys that can sign -t Type of key to find: one of "symmetric", "public", or "private" -u Match keys that can unwrap -v Match keys that can verify -w Match keys that can wrap -S Comma-separated list of allowed partition IDs -k password for keychain (required) If no keychains are specified to search, the default search list is used. Set the partition list of a key.Copy the code

About Apple-tool :, Apple: What is it, where does it come from

When I frantically searched the Internet for these two keywords and didn’t have a good answer, I found a vague answer in StackOverflow aboutapple-tool:Without any documentation, I just know that it works, so I leave a hole herelinkIf you are interested, go in and have a look