grow-ios-starter/objc-starter/FriendlyChatObjC/SignInViewController.m [21:44]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@import Firebase;

@interface SignInViewController ()
@property(weak, nonatomic) IBOutlet GIDSignInButton *signInButton;
@property(strong, nonatomic) FIRAuthStateDidChangeListenerHandle handle;
@end

@implementation SignInViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [GIDSignIn sharedInstance].presentingViewController = self;
    [[GIDSignIn sharedInstance] restorePreviousSignIn];
    self.handle = [[FIRAuth auth]
                   addAuthStateDidChangeListener:^(FIRAuth *_Nonnull auth, FIRUser *_Nullable user) {
                       if (user) {
                           [MeasurementHelper sendLoginEvent];
                           [self performSegueWithIdentifier:SeguesSignInToFp sender:nil];
                       }
                   }];
}
    
- (void)dealloc {
    [[FIRAuth auth] removeAuthStateDidChangeListener:_handle];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



ios/objc/FriendlyChatObjC/SignInViewController.m [21:44]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@import Firebase;

@interface SignInViewController ()
@property(weak, nonatomic) IBOutlet GIDSignInButton *signInButton;
@property(strong, nonatomic) FIRAuthStateDidChangeListenerHandle handle;
@end

@implementation SignInViewController

- (void)viewDidLoad {
  [super viewDidLoad];
  [GIDSignIn sharedInstance].presentingViewController = self;
  [[GIDSignIn sharedInstance] restorePreviousSignIn];
  self.handle = [[FIRAuth auth]
                 addAuthStateDidChangeListener:^(FIRAuth *_Nonnull auth, FIRUser *_Nullable user) {
                   if (user) {
                     [MeasurementHelper sendLoginEvent];
                     [self performSegueWithIdentifier:SeguesSignInToFp sender:nil];
                   }
                 }];
}

- (void)dealloc {
  [[FIRAuth auth] removeAuthStateDidChangeListener:_handle];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



