I've run into a strange scenario with macOS 10.12 keychain authentication and NetFSMountURLSync.
Typically the below code only prompts for a keychain password the first time, then when run a second time it correctly uses the keychain to authenticate without displaying the login prompt. In the macOS 10.12 environment it will always display the authentication dailog despite using the kNAUIOptionKey option.
...
CFDictionarySetValue(mountOpts, kNAUIOptionKey, kNAUIOptionNoUI); // not working, authentication dialog keeps showing
NetFSMountURLSync(share2, NULL, NULL, NULL, NULL, mountOpts, &mountpoints);
Documentation states:
// * The following dictionary keys for open_options are supported:
// * kNAUIOptionKey = UIOption Suppress authentication dialog UI.
Is this possbily a bug, or is there another workaround someone can suggest?
Thanks!