[ios] ContactsUI에서 연락처의 삭제 가능 여부를 확인하는 방법은 무엇인가요?
import Contacts

func isContactDeletable(contactIdentifier: String) -> Bool {
    let store = CNContactStore()
    do {
        if let contact = try store.unifiedContact(withIdentifier: contactIdentifier, keysToFetch: [CNContactIdentifierKey as CNKeyDescriptor]) {
            return contact.isDeletable
        }
    } catch {
        print("Error: \(error.localizedDescription)")
    }
    return false
}

위의 예제 코드는 CNContactStore를 사용하여 연락처를 확인하고 삭제 가능한지 여부를 반환합니다. 반환된 값을 사용하여 연락처 삭제 버튼을 표시하거나 숨길 수 있습니다.

더 많은 정보를 원하시면 아래의 링크를 참고하시기 바랍니다: CNContact 클래스 문서 (Apple 개발자 사이트)