how to get ekevent EKparticipant email?
EKParticipant class does not have such a attribute.
Is it possible to render the native ios participants controller t
Based on Anton Plebanovich's answer I've made this Swift 5 solution for this made up problem Apple introduced:
private let emailSelector = "emailAddress"
extension EKParticipant {
var email: String? {
if responds(to: Selector(emailSelector)) {
return value(forKey: emailSelector) as? String
}
let emailComponents = description.components(separatedBy: "email = ")
if emailComponents.count > 1 {
return emailComponents[1].components(separatedBy: ";")[0]
}
if let email = (url as NSURL).resourceSpecifier, !email.hasPrefix("/") {
return email
}
return nil
}
}