Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (void)startup:(void (^)(id))success failure:(void (^)(NSError *))failure
  2. {
  3.     [self GET:uStartup parameters:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
  4.        
  5.        
  6.         NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
  7.         NSArray *responseKeys = [responseObject allKeys];
  8.        
  9.         StartupResponseHandler* responseHandler = [[StartupResponseHandler alloc] initWithStartupResponse:responseObject];
  10.        
  11.         [responseHandler handleDeviceState];
  12.         [responseHandler handleNinjaMenuState];
  13.         [responseHandler handleAuthorizationRequests];
  14.         [responseHandler handleMaintenanceMessage];
  15.         [responseHandler handleSettings];
  16.        
  17.        
  18.         if (success) {
  19.             success(responseObject);
  20.         }
  21.        
  22.     } failure:^(NSURLSessionDataTask *task, NSError *error) {
  23.         if (failure) {
  24.             failure(error);
  25.         }
  26.     }];
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement