runModal(forDirectory:file:)
Displays a panel that allows a user to create a new keychain.
Declaration
func runModal(forDirectory path: String!, file name: String!) -> IntParameters
- path:
The path to the folder where the keychain is created. Specify
nilfor~/Library/Keychains. - name:
The keychain name to be automatically displayed in the Save As field of the panel.
Discussion
This method returns a result code from the runModalForDirectory:file:types: method of the NSSavePanel class: NSFileHandlingPanelOKButton if the user clicks the OK button or NSFileHandlingPanelCancelButton if the user clicks the Cancel button.
Use the keychain() method to obtain the keychain created by the user.