I've downloaded FriendlyPix proj on git and used pod install, but for some reason I get the error below. The error is that signInProvider and authUI method in FIRAuthUI is not found
On the left in the Pods folder, FirebaseUI is installed, and I looked online at FireAuthUI docs and those properties like signInProviders exist in the library http://cocoadocs.org/docsets/FirebaseUI/0.4.0/Classes/FIRAuthUI.html
I'm not exactly sure why I'm receiving those errors, I also have the @import FirebaseAuthUI; and didn't modify anything. FIRAuthUI is version 0.5.5, xcode version 7+, and cocoa version 1.0.0
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
//Here The error codes occur: Error: Property 'signInProviders' not found on object of type 'id'
[FIRAuthUI authUI].signInProviders = @[[[FIRGoogleAuthUI alloc initWithClientID:[FIRApp defaultApp].options.clientID]];
//Error: No known class method for selector 'authUI'
[FIRAuthUI authUI].termsOfServiceURL = [[NSURL alloc] initWithString:@"https://firebase.google.com/terms/"];
self.authStateDidChangeHandle = [[FIRAuth auth]
addAuthStateDidChangeListener:^(FIRAuth *_Nonnull auth, FIRUser *_Nullable user) {
if (user) {
[self signedIn:user];
}
}];
}
I believe as of 0.5.x the methods changed from authUI
to defaultAuthUI
and signInProviders
to providers
:
[FIRAuth defaultAuthUI].providers = @[/* add providers */];
Should work!