diff options
author | Vitaly Takmazov | 2017-10-18 01:48:34 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-10-18 01:48:34 +0300 |
commit | 2345989ce454342d8ac45077e2cd650d18744066 (patch) | |
tree | a1c529b1dadab49c76b82da80044cc4a80d32ec0 /Juick/ViewControllers/LoginViewController.m | |
parent | 07afcd6f36629f30a495f2be47262c75c006712f (diff) |
device registration
Diffstat (limited to 'Juick/ViewControllers/LoginViewController.m')
-rw-r--r-- | Juick/ViewControllers/LoginViewController.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Juick/ViewControllers/LoginViewController.m b/Juick/ViewControllers/LoginViewController.m index 1718366..d3d1edc 100644 --- a/Juick/ViewControllers/LoginViewController.m +++ b/Juick/ViewControllers/LoginViewController.m @@ -9,6 +9,7 @@ #import "LoginViewController.h" #import "User.h" #import "ColorScheme.h" +#import "AppDelegate.h" @implementation LoginViewController @@ -57,6 +58,10 @@ - (void) doneSignIn { [User checkIsValid:^(BOOL success) { if (success) { + [[APIClient sharedClient].manager.requestSerializer setAuthorizationHeaderFieldWithUsername:[[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.username"] password:[[PDKeychainBindings sharedKeychainBindings] stringForKey:@"com.juick.password"]]; + + AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate]; + [app registerForRemoteNotifications]; CATransition* transition = [CATransition animation]; transition.duration = 0.3; transition.type = kCATransitionFade; |