jeudi 23 octobre 2014

App crashes when trying to print contacts using Address Book API


Vote count:

0




I have the following code to print the contacts:



let people = ABAddressBookCopyArrayOfAllPeople(addressBook).takeRetainedValue() as NSArray as [ABRecord]
for person in people {
println(ABRecordCopyCompositeName(person).takeRetainedValue())
}


The program always crashes after iterating the people array. The array has 6 elements of type AnyObject. Can this be a cast problem ?


The error I get is: Thread_1 EXC_BREAKPOINT (code = EXC_i386_BPT, subcode=0x0)



asked 7 mins ago

vBx

2,335






App crashes when trying to print contacts using Address Book API

Aucun commentaire:

Enregistrer un commentaire