【发布时间】:2020-09-01 20:45:45
【问题描述】:
我正在使用 CNContactStore 获取一些联系人字段,例如 first name (CNContactGivenNameKey) 和 last name (CNContactFamilyNameKey) 但我不能找到 company 的密钥。
let request = CNContactFetchRequest(keysToFetch: [
CNContactGivenNameKey as NSString,
CNContactFamilyNameKey as NSString,
])
request.sortOrder = .familyName
do {
let store = CNContactStore()
try store.enumerateContacts(with: request) { contact, stop in
// ...
}
} catch {
print(error)
}
【问题讨论】:
标签: swift cncontact cncontactstore