我正在制作一个使用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。
答案 0 :(得分:0)
我发现了问题。由于某种原因,这是因为我在我的项目中同时包含了firestore和firebase_auth,所以对于我来说,发生这种情况是因为对于android系统,我使用的是两个插件的一个版本,但是在处理iOS时,我需要使用这些插件的不同版本。