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)
}
}
}
})