The error message is very clear. You can not say takeUnretainedValue ABRecord?.
Here's the announcement:
ABRecordWithAddressBook(_ addressBook: ABAddressBook) -> ABRecord?
So this thing gives an optional. You have to deploy it. This might work:
if let record = attendee.ABRecordWithAddressBook(addressBookController.adbk) {
let unmanagedValue = ABRecordCopyValue(record.takeUnretainedValue(), kABPersonEmailProperty)
}
But then I expect that you will have a new problem; Now you have a real ABRecord, completely with memory management. Therefore, you should also cut off takeUnretainedValue(), leaving this:
if let record = attendee.ABRecordWithAddressBook(addressBookController.adbk) {
let unmanagedValue = ABRecordCopyValue(record, kABPersonEmailProperty)
}