After the announcement that it stops, it closes in January of next year. I have decided to use Firebase. The good news is that my App is still in development and hadn't made much progress, however one of the parts that had already been tested was authentication. I used PFLogInViewController at the time to make my life easier but now with firebase I'm trying to use FirebaseLoginViewController which works in a very similar way, both classes (FirebaseLoginViewController and PFLogInViewController ) inherit from UIViewController and at least in parse it was very easy to customize. In firebase there is not much documentation about it and I am giving up.
This is what I have at the moment.
import UIKit
class AccesoPrincipal : FirebaseLoginViewController{
override func viewDidLoad() {
super.viewDidLoad()
let firebaseRef = Firebase(url: "https://superaapp.firebaseio.com/")
self.loginViewController = FirebaseLoginViewController(ref: firebaseRef)
self.loginViewController.enableProvider(FAuthProvider.Facebook)
//self.loginViewController.enableProvider(FAuthProvider.Google)
//self.loginViewController.enableProvider(FAuthProvider.Twitter)
self.loginViewController.enableProvider(FAuthProvider.Password)
// Scenario 1: Set up captive portal login flow
self.loginViewController.didDismissWithBlock { (user: FAuthData, error: NSError) -> Void in
if (user) {
// Handle user case
} else if (error) {
// Handle error case
} else {
// Handle cancel case
}
}
// Scenario 1: Application launches login flow, handles dismissal and routing in `didDismissWithBlock:`
override func viewDidAppear(animated: Bool) {
if (!self.loginViewController.currentUser()) {
self.presentViewController(self.loginViewcontroller, animated: true, completion: nil)
}
}
override func logout() {
if (self.loginViewController.currentUser()) {
self.loginViewController.logout()
}
}
}
The above code snippet was taken from the FirebaseUi-IOS documentation itself [ https://github.com/firebase/FirebaseUI-iOS] and I've been running into errors.
My pod install file
platform :ios, '9.2'
pod 'Firebase'
pod 'FirebaseUI', '~> 0.3'
my header.h file, where I don't know if I'm correctly calling FirebaseLoginViewController
#ifndef Header_h
#define Header_h
#endif /* Header_h */
#import <FirebaseLoginViewController.h>
#import <Firebase/Firebase.h>
The problem that I see a priori is the following:
This should be:
Since, as you have put it,
:
the guy must go after them.