   ]
 
 
-  @objc func userCanAccessContacts(callback: (NSObject) -> ()) -> Void {
-    let authorizationStatus = CNContactStore.authorizationStatusForEntityType(CNEntityType.Contacts)
+  @objc func userCanAccessContacts(_ callback: (NSObject) -> ()) -> Void {
+    let authorizationStatus = CNContactStore.authorizationStatus(for: CNEntityType.contacts)
 
     switch authorizationStatus{
-      case .NotDetermined, .Restricted, .Denied:
+      case .notDetermined, .restricted, .denied:
         callback([false])
 
-      case .Authorized:
+      case .authorized:
         callback([true])
     }
   }
 
-  @objc func requestAccessToContacts(callback: (NSObject) -> ()) -> Void {
+  @objc func requestAccessToContacts(_ callback: @escaping (NSObject) -> ()) -> Void {
     userCanAccessContacts() { (userCanAccessContacts) in
 
-      if (userCanAccessContacts == [true]) {
+      if (userCanAccessContacts as! Array<Bool> == [true]) {
         callback([true])
 
         return
       }
 
-      CNContactStore().requestAccessForEntityType(CNEntityType.Contacts) { (userCanAccessContacts, error) in
+      CNContactStore().requestAccess(for: CNEntityType.contacts) { (userCanAccessContacts, error) in
 
         if (userCanAccessContacts) {
           callback([true])

    
    do {
      
      saveRequest.updateContact(mutableContact)
      
      try contactStore.executeSaveRequest(saveRequest)
      
      callback( [NSNull(), true] )
      

  /////////////
  // PRIVATE //
    
  func getCNContact( _ identifier: String, keysToFetch: [CNKeyDescriptor] ) -> CNContact? {
    let contactStore = CNContactStore()
    do {
      
      let cNContact = try contactStore.unifiedContact( withIdentifier: identifier, keysToFetch: keysToFetch )
      return cNContact
      
    }
