I have a User
model item, and I want to use this User
information to create a contact that can be shared through a UIActivityController
. This is currently not possible because the properties of CNContact
s are read-only:
if let name = user?.firstName {
contact.givenName = name
}
if let lastName = user?.lastName {
contact.familyName = lastName
}
if let companyRole = user?.companyRole {
contact.jobTitle = companyRole
}
if let company = user?.company {
contact.organizationName = company
}
Is it possible to create a contact? I don't see any constructs/initializers that allow me to create one.