I am trying to use Firebase App Check but unfortunately I am running into some issues.
The specific error is this:
10.22.1 - [FirebaseFirestore][I-FST000001] AppCheck failed: 'The operation couldn’t be completed. Failed to create a block of data that demonstrates the legitimacy of the app instance (
Код: Выделить всё
generateAssertion:clientDataHash:completionHandler:I've followed Google's guide to set up App Check and I'm pretty sure it was working initially but however, recently I am getting this issue.
I currently set up App Check in my delegate file.
Код: Выделить всё
AppCheckManager.shared.setProviderFactory()
Код: Выделить всё
public func createProvider(with app: FirebaseApp) -> AppCheckProvider? {
return AppAttestProvider(app: app)
}
public func generateTokenAppCheck() -> Future {
Future { promise in
AppCheck.appCheck().token(forcingRefresh: false) { token, error in
if let error {
promise(.failure(.error(error.localizedDescription)))
return
}
guard let tokenref = token else { return }
promise(.success(tokenref.token))
}
}
}
Источник: https://stackoverflow.com/questions/781 ... -and-xcode
Мобильная версия