async partial void LoginPressed(UIButton sender) { var providers = new[] { "microsoft", "facebook", "twitter", "googleplus", "linkedin", "vkontakte", "yahoo" }; try { var user = await Gigya.ShowLoginProvidersDialogAsync(this, providers, null); var tabBarController = (UITabBarController)Storyboard.InstantiateViewController("TabBarViewController"); var accountViewController = (GDAccountViewController)tabBarController.ViewControllers[2]; accountViewController.User = user; await PresentViewControllerAsync(tabBarController, true); } catch (NSErrorException ex) { // If the login was canceled by the user - do nothing. Otherwise, display an error. if (ex.Error.Code != (int)GSErrorCode.CanceledByUser) { Console.WriteLine("Error: {0}", ex.Error.UserInfo); var alert = new UIAlertView("Error", "An error has occured. Please try again later.", null, "OK"); alert.Show(); } } catch (Exception ex) { Console.WriteLine("Error: {0}", ex.Message); } }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // This method initializes the SDK and should always appear in FinishedLaunching Gigya.Init("3_maetISj1vIK2f6uWrM1gHaYHOxT-kKw-Y0g6D531hKF_8t74nBgbAHsJI4YUairG", application, launchOptions); // This demo project is preconfigured for Facebook, Google+ and Twitter native login. // To disable Facebook native login - remove the FacebookAppID and FacebookDisplayName parameters from the app's .plist file. // To disable Google+ native login - remove the GooglePlusClientID parameter from the app's .plist file. // To disable Twitter native login - add a BOOL parameter named DisableTwitterNativeLogin to the app's .plist file, and set it to YES. return(true); }
public void SetRequestTimeout() { try { Gigya.SetRequestTimeout(100); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void SetNetworkActivityIndicatorEnabled() { try { Gigya.SetNetworkActivityIndicatorEnabled(true); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void SetUseHTTPS() { try { Gigya.SetUseHTTPS(false); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void HandleDidBecomeActive() { try { Gigya.HandleDidBecomeActive(); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void RequestNewFacebookReadPermissions() { try { Gigya.RequestNewFacebookReadPermissions("permissions", PermissionRequestResultHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void RemoveConnectionToProviderWithHandler() { try { Gigya.RemoveConnectionToProvider("facebook", UserInfoHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowLoginProvidersPopoverFromWithProveders() { try { Gigya.ShowLoginProvidersPopoverFrom(UnitTestAppDelegate.NavigationController.View, new [] { new NSString("facebook"), new NSString("twitter"), new NSString("googleplus") }, new NSDictionary(), UserInfoHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowLoginProvidersDialogOverWithProviders() { try { Gigya.ShowLoginProvidersDialogOver(UnitTestAppDelegate.NavigationController, new [] { new NSString("facebook") }, new NSDictionary(), UserInfoHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void InitWithApiKeyWithDomain() { try { Gigya.InitWithAPIKey("3_Sh5iokMA9q0k5i8s5P4K3O8eYAax9Q0QPLPsXO0MRa4YXiETXRTTypmr8iYAlfRz", UIApplication.SharedApplication, new NSDictionary(), "apiDomain"); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowLoginProvidersDialogOver() { try { Gigya.ShowLoginDialogOver(UnitTestAppDelegate.NavigationController, "facebook"); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void AccountsDelegate() { try { var accountDelegate = Gigya.AccountsDelegate(); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void SocializeDelegate() { try { var socializeDelegate = Gigya.SocializeDelegate(); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowAddConnectionProvidersPopoverFrom() { try { Gigya.ShowAddConnectionProvidersPopoverFrom(UnitTestAppDelegate.NavigationController.View); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void Logout() { try { Gigya.Logout(); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowAddConnectionProvidersPopoverFromWithProviders() { try { Gigya.ShowAddConnectionProvidersPopoverFrom(UnitTestAppDelegate.NavigationController.View, new NSObject[] { }, new NSDictionary(), UserInfoHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void LogoutWithCompletionHandler() { try { Gigya.LogoutWithCompletionHandler(ResponseHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowPluginDialogOverWithDelegate() { try { Gigya.ShowPluginDialogOver(UnitTestAppDelegate.NavigationController, "plugin", new NSDictionary(), PluginCompletionHandler, new GSPluginViewDelegate()); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void AddConnectionToProvider() { try { Gigya.AddConnectionToProvider("facebook"); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void HandleOpenURL() { try { Gigya.HandleOpenURL(new NSUrl("http://google.com"), UIApplication.SharedApplication, "sourceApplication", new NSObject()); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void AddConnectionToProviderWithParameters() { try { Gigya.AddConnectionToProvider("facebook", new NSDictionary(), UserInfoHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void UseHTTPS() { try { var s = Gigya.UseHTTPS(); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowAddConnectionDialogOverWithParameters() { try { Gigya.ShowAddConnectionDialogOver(UnitTestAppDelegate.NavigationController, "facebook", new NSDictionary(), UserInfoHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void NetworkActivityIndicatorEnabled() { try { var n = Gigya.NetworkActivityIndicatorEnabled(); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void AddConnectionToProviderWithVC() { try { Gigya.AddConnectionToProvider("facebook", new NSDictionary(), UnitTestAppDelegate.NavigationController, UserInfoHandler); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void RequestTimeout() { try { var r = Gigya.RequestTimeout(); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void ShowAddConnectionProvidersDialogOver() { try { Gigya.ShowAddConnectionProvidersDialogOver(UnitTestAppDelegate.NavigationController); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void SetSessionDelegate() { try { Gigya.SetSessionDelegate(Gigya.SessionDelegate()); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }
public void UserInfoDidChange() { try { Gigya.SocializeDelegate().UserInfoDidChange(null); } catch (Exception e) { Assert.Fail(e.Message); } Assert.Pass(); }