Guest User

Untitled

a guest
Feb 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. - (void)coolMethod:(CDVInvokedUrlCommand*) mycommand
  2. {
  3. _callbackId=mycommand.callbackId; //here im saving plugin id
  4. NSDictionary* myarg = [mycommand.arguments objectAtIndex:0];
  5.  
  6. LiveViewController *viewController = [[LiveViewController alloc]initWithNibName:@"LiveViewController" bundle:nil];
  7.  
  8. viewController.openTokApi_Key = [[myarg safeObjectForKey:@"apiKey"] stringValue];
  9.  
  10. viewController.openTokSessionID = [myarg safeObjectForKey:@"liveSessionId"];
  11.  
  12. viewController.openTokToken = [myarg safeObjectForKey:@"tokenId"];
  13.  
  14. viewController.hybridParams = myarg;
  15.  
  16. [self.viewController presentViewController:viewController animated:YES completion:nil];
  17. }
  18.  
  19. -(void)result:(NSString *)success
  20. {
  21.  
  22. CDVPluginResult* pluginResult=[CDVPluginResult
  23. resultWithStatus:CDVCommandStatus_OK messageAsString:@"ok"];
  24.  
  25. [self.commandDelegate sendPluginResult:pluginResult callbackId:_callbackId];
  26.  
  27. }
Add Comment
Please, Sign In to add comment