如何从生日 EKEvent 获取 CNContact
How to get the CNContact from a birthday EKEvent
从 iOS 9 开始,EKEvent 属性 birthdayPersonID 已弃用。
如何获取与生日活动关联的 CNContact?
如果您尝试使用 birthdayPersonID
,它会产生一条警告:
warning: 'birthdayPersonID' is deprecated: first deprecated in iOS 9.0 - Use birthdayContactIdentifier instead
所以,使用birthdayContactIdentifier
。
从 iOS 9 开始,EKEvent 属性 birthdayPersonID 已弃用。
如何获取与生日活动关联的 CNContact?
如果您尝试使用 birthdayPersonID
,它会产生一条警告:
warning: 'birthdayPersonID' is deprecated: first deprecated in iOS 9.0 - Use birthdayContactIdentifier instead
所以,使用birthdayContactIdentifier
。