ユーザーのアドレス帳にアクセス中に問題が発生しました。私のコードは
ABMultiValueRef email = ABRecordCopyValue(aSource, kABPersonEmailProperty);
NSString* email_lbl;
for(CFIndex i = 0; i < ABMultiValueGetCount(email); i++) {
email_lbl = (NSString*)ABMultiValueCopyLabelAtIndex(email, i);
if([email_lbl isEqualToString:(NSString *)kABHomeLabel])
{
home_email = [(NSString*)ABMultiValueCopyValueAtIndex(email, i)retain];
}
if([email_lbl isEqualToString:(NSString *)kABWorkLabel])
{
work_email = [(NSString*)ABMultiValueCopyValueAtIndex(email, i)retain];
}
if([email_lbl isEqualToString:(NSString *)kABOtherLabel])
{
basic_email = [(NSString*)ABMultiValueCopyValueAtIndex(email, i)retain];
}
}
home_email、work_email、basic_email をログに記録すると、Exc_bad_access 信号が受信されます。