アドレス帳全体の誕生日エントリの総数を数えようとしています。
問題線
/* This line crashes only when using kABPersonBirthdayProperty */
ABMultiValueRef lBirthdays = ABRecordCopyValue(lRef, kABPersonBirthdayProperty);
/* Note that when this line is changed to another `ABPropertyID`, it works fine.
Only seems to crash on NSCFDates.
*/
アドレス帳全体ですべての連絡先を反復処理するコードがさらにありますが、この質問には関係ありません。
int totalBirthdayEntries = 0;
CFIndex lContactBirthdayCount = ABMultiValueGetCount( lBirthdays );
for (int births = 0; births < lContactBirthdayCount; births++)
{
totalBirthdayEntries++;
}
NSLog(@"Total Birthdays in Address Book: %i",totalBirthdayEntries);