IOS Swift - Can't retrive person note from addressbook

↘锁芯ラ 提交于 2019-12-22 17:45:37

问题


Any one have any suggestions why i can get firstName, lastname and birthday, However i can't retrieved the notes filed from iphone address book ?

Preprations

  • Address book access is granted
  • Person added in address book with all fields including note

Current Results

nil for note only, all other fields retrieved correctly

Sample code used

var firstName: String = ABRecordCopyValue(person, kABPersonFirstNameProperty).takeRetainedValue() as NSString
var lastName: String = ABRecordCopyValue(person, kABPersonLastNameProperty).takeRetainedValue() as NSString
let birthday = ABRecordCopyValue(person, kABPersonBirthdayProperty)?.takeRetainedValue() as NSDate?
let notes    = ABRecordCopyValue(person, kABPersonNoteProperty)?.takeRetainedValue() as NSString?

来源:https://stackoverflow.com/questions/28040624/ios-swift-cant-retrive-person-note-from-addressbook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!