名簿アプリで、連絡先のメールIDを取得すると、次のようになります。
ABMultiValueRef 0x2994e0 with 1 value(s)
0: null (0x3f5655e0) - xyz@gmail.com (0x2994b0)
文字列値を取得する方法、つまりのみ
xyz@gmail.com
上記の結果から?
ありがとう
名簿アプリで、連絡先のメールIDを取得すると、次のようになります。
ABMultiValueRef 0x2994e0 with 1 value(s)
0: null (0x3f5655e0) - xyz@gmail.com (0x2994b0)
文字列値を取得する方法、つまりのみ
xyz@gmail.com
上記の結果から?
ありがとう
// This is what you have currently (i.e. the multivalues)
ABMultiValueRef emailValues = ABRecordCopyValue(person, kABPersonEmailProperty);
// This is how you extract the first item from the multivalues:
CFStringRef cfEmailAddress = ABMultiValueCopyValueAtIndex(emailValues, 0);
// This is how you convert it to an NSString.
NSString *emailAddress = CFBridgingRelease(cfEmailAddress);