【发布时间】:2020-04-14 23:46:41
【问题描述】:
我正在制作一个使用 firestore 和 firebase_auth 的应用,并且在使用 android 时效果很好,但是当我在 ios 上构建它时,它会导致一系列问题:
error: incompatible block pointer types sending 'void (^)(FIRUser *__strong, NSError *__strong)' to
parameter of type 'FIRAuthDataResultCallback _Nullable' (aka 'void (^)(FIRAuthDataResult * _Nullable __strong, NSError * _Nullable __strong)')
completion:^(FIRUser *user, NSError *error) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: passing argument to parameter 'completion' here
completion:(nullable FIRAuthDataResultCallback)completion;
error: incompatible block pointer types sending 'void (^)(FIRUser *__strong, NSError *__strong)' to
parameter of type 'FIRAuthDataResultCallback _Nullable' (aka 'void (^)(FIRAuthDataResult * _Nullable __strong, NSError * _Nullable __strong)')
completion:^(FIRUser *user, NSError *error) {
note: passing argument to parameter 'completion' here
completion:(nullable FIRAuthDataResultCallback)completion;
error: incompatible block pointer types sending 'void (^)(FIRUser *__strong, NSError *__strong)' to
parameter of type 'FIRAuthDataResultCallback _Nullable' (aka 'void (^)(FIRAuthDataResult * _Nullable __strong, NSError * _Nullable __strong)')
completion:^(FIRUser *user, NSError *error) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: passing argument to parameter 'completion' here
completion:(nullable FIRAuthDataResultCallback)completion;
warning: 'fetchProvidersForEmail:completion:' is deprecated: Please use
fetchSignInMethodsForEmail:completion: for Objective-C or fetchSignInMethods(forEmail:completion:) for Swift instead. [-Wdeprecated-declarations]
fetchProvidersForEmail:email
note: 'fetchProvidersForEmail:completion:' has been explicitly marked deprecated here
DEPRECATED_MSG_ATTRIBUTE("Please use fetchSignInMethodsForEmail:completion: for Objective-C or "
error: incompatible block pointer types sending 'void (^)(NSError * _Nullable __strong)' to parameter of
type 'FIRAuthDataResultCallback _Nullable' (aka 'void (^)(FIRAuthDataResult * _Nullable __strong, NSError * _Nullable __strong)')
completion:^(NSError *_Nullable error) {
note: passing argument to parameter 'completion' here
completion:(nullable FIRAuthDataResultCallback)completion;
error: incompatible block pointer types sending 'void (^)(NSError * _Nullable __strong)' to parameter of
type 'FIRAuthDataResultCallback _Nullable' (aka 'void (^)(FIRAuthDataResult * _Nullable __strong, NSError * _Nullable __strong)')
completion:^(NSError *_Nullable error) {
如果需要此信息,我正在使用 firebase_auth 0.6.6。
【问题讨论】:
-
应用程序将无法构建,这些错误出现在命令行中。但是,该应用可以在 Android 上正常运行
标签: ios firebase flutter dart firebase-authentication