Firebase电话号码validation错误

我正在使用Firebase电话号码登录validation所有的东西都很完美

1)供应配置文件

2)证书

3)签名方法启用

4)项目设置为.12文件

5)一切都应该完美

问题当我使用此代码使用thins方法发送OTP的手机号码时

NSString *phoneNumber = @"+919428936703"; [[FIRPhoneAuthProvider provider] verifyPhoneNumber:phoneNumber completion:^(NSString * verificationID, NSError * error) { NSLog(@"VARIFICATION CODE %@", verificationID); NSLog(@"Error %@", error); if (!error){ }else{ } }]; 

也获得通话方法

 - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { // Pass device token to auth. [[FIRAuth auth] setAPNSToken:deviceToken type:FIRAuthAPNSTokenTypeSandbox]; } - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { NSLog(@"DATA OF AUTH %@", [FIRAuth auth]); if ([[FIRAuth auth] canHandleNotification:notification]) { NSLog(@"Handle by Firebase "); completionHandler(UIBackgroundFetchResultNoData); return; }else{ NSLog(@"NOT HANDLE BY FIREBASE %@", notification); } } 

但在此错误日志崩溃后

 -[__NSCFString setFir_authPhoneNumber:]: unrecognized selector sent to instance 0x166388b0 

看起来您没有将您的应用程序与-ObjC链接器标志链接,这是Integrate without CocoaPods的说明的一部分。

setFir_authPhoneNumber:作为类别实现,因此必须使用-ObjC链接器标志,否则库中编译的.o将不会链接到您的应用程序二进制文件中。