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);
        }
示例#3
0
 public void SetRequestTimeout()
 {
     try
     {
         Gigya.SetRequestTimeout(100);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#4
0
 public void SetNetworkActivityIndicatorEnabled()
 {
     try
     {
         Gigya.SetNetworkActivityIndicatorEnabled(true);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#5
0
 public void SetUseHTTPS()
 {
     try
     {
         Gigya.SetUseHTTPS(false);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#6
0
 public void HandleDidBecomeActive()
 {
     try
     {
         Gigya.HandleDidBecomeActive();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#7
0
 public void RequestNewFacebookReadPermissions()
 {
     try
     {
         Gigya.RequestNewFacebookReadPermissions("permissions", PermissionRequestResultHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#8
0
 public void RemoveConnectionToProviderWithHandler()
 {
     try
     {
         Gigya.RemoveConnectionToProvider("facebook", UserInfoHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#9
0
 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();
 }
示例#10
0
 public void ShowLoginProvidersDialogOverWithProviders()
 {
     try
     {
         Gigya.ShowLoginProvidersDialogOver(UnitTestAppDelegate.NavigationController, new [] { new NSString("facebook") }, new NSDictionary(), UserInfoHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#11
0
 public void InitWithApiKeyWithDomain()
 {
     try
     {
         Gigya.InitWithAPIKey("3_Sh5iokMA9q0k5i8s5P4K3O8eYAax9Q0QPLPsXO0MRa4YXiETXRTTypmr8iYAlfRz", UIApplication.SharedApplication, new NSDictionary(), "apiDomain");
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#12
0
 public void ShowLoginProvidersDialogOver()
 {
     try
     {
         Gigya.ShowLoginDialogOver(UnitTestAppDelegate.NavigationController, "facebook");
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#13
0
 public void AccountsDelegate()
 {
     try
     {
         var accountDelegate = Gigya.AccountsDelegate();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#14
0
 public void SocializeDelegate()
 {
     try
     {
         var socializeDelegate = Gigya.SocializeDelegate();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#15
0
 public void ShowAddConnectionProvidersPopoverFrom()
 {
     try
     {
         Gigya.ShowAddConnectionProvidersPopoverFrom(UnitTestAppDelegate.NavigationController.View);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#16
0
 public void Logout()
 {
     try
     {
         Gigya.Logout();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#17
0
 public void ShowAddConnectionProvidersPopoverFromWithProviders()
 {
     try
     {
         Gigya.ShowAddConnectionProvidersPopoverFrom(UnitTestAppDelegate.NavigationController.View, new NSObject[] { }, new NSDictionary(), UserInfoHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#18
0
 public void LogoutWithCompletionHandler()
 {
     try
     {
         Gigya.LogoutWithCompletionHandler(ResponseHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#19
0
 public void ShowPluginDialogOverWithDelegate()
 {
     try
     {
         Gigya.ShowPluginDialogOver(UnitTestAppDelegate.NavigationController, "plugin", new NSDictionary(), PluginCompletionHandler, new GSPluginViewDelegate());
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#20
0
 public void AddConnectionToProvider()
 {
     try
     {
         Gigya.AddConnectionToProvider("facebook");
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#21
0
 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();
 }
示例#22
0
 public void AddConnectionToProviderWithParameters()
 {
     try
     {
         Gigya.AddConnectionToProvider("facebook", new NSDictionary(), UserInfoHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#23
0
 public void UseHTTPS()
 {
     try
     {
         var s = Gigya.UseHTTPS();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#24
0
 public void ShowAddConnectionDialogOverWithParameters()
 {
     try
     {
         Gigya.ShowAddConnectionDialogOver(UnitTestAppDelegate.NavigationController, "facebook", new NSDictionary(), UserInfoHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#25
0
 public void NetworkActivityIndicatorEnabled()
 {
     try
     {
         var n = Gigya.NetworkActivityIndicatorEnabled();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#26
0
 public void AddConnectionToProviderWithVC()
 {
     try
     {
         Gigya.AddConnectionToProvider("facebook", new NSDictionary(), UnitTestAppDelegate.NavigationController, UserInfoHandler);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#27
0
 public void RequestTimeout()
 {
     try
     {
         var r = Gigya.RequestTimeout();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#28
0
 public void ShowAddConnectionProvidersDialogOver()
 {
     try
     {
         Gigya.ShowAddConnectionProvidersDialogOver(UnitTestAppDelegate.NavigationController);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#29
0
 public void SetSessionDelegate()
 {
     try
     {
         Gigya.SetSessionDelegate(Gigya.SessionDelegate());
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
示例#30
0
 public void UserInfoDidChange()
 {
     try
     {
         Gigya.SocializeDelegate().UserInfoDidChange(null);
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }