escaping and non-escaping closure error in contact request

I get the error "Escaping closure captures non-escaping parameter 'completionHandler'" for the following code. I tried to add @escaping, but I honestly don't really get where and how. Did anybody had a similar problem and could help. Thank You!


                if access {

                    completionHandler(access)

                }

                else {

                    if authorizationStatus == CNAuthorizationStatus.denied {

                        DispatchQueue.main.async {

                            let message = "\(accessError!.localizedDescription)\n\n\(NSLocalizedString("Bitte ändere dies in den Gerät Einstellungen.", comment: ""))"

                            self.showMessage(message: message, controll: controll)

                        }

                    }

                }

            })

`self.contactStore.requestAccess(for: CNEntityType.contacts, completionHandler: { (access, accessError) -> Void in if access {    completionHandler(access) } else { if authorizationStatus == CNAuthorizationStatus.denied { DispatchQueue.main.async { let message = "(accessError!.localizedDescription)\n\n(NSLocalizedString("Bitte ändere dies in den Gerät Einstellungen.", comment: ""))" self.showMessage(message: message, controll: controll) } } } })

Please show more code so that we can understand the context. Where do you get the error ?

escaping and non-escaping closure error in contact request
 
 
Q