このAPISecKeychainFindGenericPassword()を使用して空港ネットワークのパスワードを取得しようとしています。しかし、私は常にitemnotfoundエラーを受け取ります。APIでアカウント名とサービス名を何に渡すかわかりません。私がしていることを示すためにコードスニペットを追加しました。どんな助けでもいただければ幸いです。ありがとう
OSStatus status1 ;
SecKeychainRef kychain = nil;
SecKeychainCopyDefault(&kychain);
status1 = SecKeychainFindGenericPassword (
kychain, // default keychain
15, // length of service name
"AirPort Network", // service name
38, // length of account name
"com.apple.network.wlan.ssid.xxxxxxxx", // account name
passwordLength, // length of password
&passwordData, // pointer to password data
itemRef // the item reference
);
return (status1);
私はosx10.8を使用しています