Swift: Accessing OS X address book: "ABPerson is not convertible to ABPerson"

422 Views Asked by At

I am accessing the OS X address book like so:

if let book = ABAddressBook.sharedAddressBook() { 
    let people = book.people() as [ABPerson]
    for person in people {
        // Now I want to get the person's image to some variable
        ABPersonCopyImageData(person) // compile error
    }
}

Xcode says 'ABPerson' is not convertible to 'ABPerson'.

What's wrong with that?

Thanks in advance, Kim

0

There are 0 best solutions below