before the last update, I was able to manage data with CloudKit on simulator, with the last updating, it's not working, also if I add a file in iCloud Drive, in simulator the folder is not updated.
in my func, I receive couldNotComplete status:
defaultContainer.requestApplicationPermission(.userDiscoverability, completionHandler: {status, error in
switch status {
case .denied:
DispatchQueue.main.async {//necessario perchè lo fa in background e potrebbe crashare senza questo
completionHandler(status)
self.showSettingsAlert()
}
case .initialState:
DispatchQueue.main.async {
completionHandler(status)
self.showSettingsAlert()
}
case .couldNotComplete:
DispatchQueue.main.async {
completionHandler(status)
self.showSettingsAlert()
}
print("@couldNotComplete requestApplicationPermission (func getUserPermission) - probabilmente non ha un account icloud")
case .granted:
completionHandler(status)
@unknown default:
print("@unknown requestApplicationPermission (func getUserPermission)")
}
})
but the problem is in the token:
Optional("Couldn\'t get an authentication token")
Do you have the same problem?