summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-10-18 01:48:34 +0300
committerGravatar Vitaly Takmazov2017-10-18 01:48:34 +0300
commit2345989ce454342d8ac45077e2cd650d18744066 (patch)
treea1c529b1dadab49c76b82da80044cc4a80d32ec0 /Juick/ViewControllers
parent07afcd6f36629f30a495f2be47262c75c006712f (diff)
device registration
Diffstat (limited to 'Juick/ViewControllers')
-rw-r--r--Juick/ViewControllers/LoginViewController.m5
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;