0
기존 연락처의 값을 복사하여 새 연락처를 추가하려고합니다.contactViewController didComplete 연락처가 없습니다.
if let mutableContact = self.editingCard?.contact.mutableCopy() as? CNMutableContact {
let editCardViewController = CNContactViewController(for: mutableContact)
editCardViewController.contactStore = CNContactStore()
editCardViewController.title = "Edit Card"
editCardViewController.delegate = self
self.present(UINavigationController(rootViewController: editCardViewController), animated: true, completion: nil)
}
표시된 연락처보기 컨트롤러는 문제가 없습니다. 연락처에서 미리 채워진 세부 정보를 표시합니다. 그러나 완료를 클릭하면 nil 연락처 참조에서 콜백이 호출됩니다. 즉
func contactViewController(_ viewController: CNContactViewController, didCompleteWith contact: CNContact?) {
print("Completed adding card \(contact)")
}
실마리 나는 무엇을 잘못하고 있습니까?