Ejemplo n.º 1
0
        //user method
        void handleChallengeforSession(NSUrlAuthenticationChallenge challenge, Action <NSUrlSessionAuthChallengeDisposition, NSUrlCredential> completionHandler)
        {
            NSError outError;

            if (AWController.ClientInstance().CanHandleProtectionSpace(challenge.ProtectionSpace, out outError))
            {
                bool success = AWController.ClientInstance().HandleChallengeForURLSessionChallenge(challenge, completionHandler);
                if (success)
                {
                    Console.WriteLine("AWXamarin Client Challenge successful using Session");
                }
            }
        }
Ejemplo n.º 2
0
        void handleChallengeForConnection(NSUrlAuthenticationChallenge challenge)
        {
            NSError outError;

            if (AWController.ClientInstance().CanHandleProtectionSpace(challenge.ProtectionSpace, out outError))
            {
                bool success = AWController.ClientInstance().HandleChallenge(challenge);
                if (success)
                {
                    Console.WriteLine("AWXamarin Client Challenge successful using connection");
                }
            }
        }
Ejemplo n.º 3
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            if (Runtime.Arch == Arch.SIMULATOR)
            {
                Debug.WriteLine("AWXamarin Running in Simulator, skipping initialization of the AirWatch SDK!");
            }
            else
            {
                Debug.WriteLine("AWXamarin Running on Device, beginning initialization of the AirWatch SDK.");

                // Configure the Controller by:
                var sdkController = AWController.ClientInstance();
                // 1) defining the callback scheme so the app can get called back,
                sdkController.CallbackScheme = "XamarinSampleApp";                 // defined in Info.plist
                // 2) set the delegate to know when the initialization has been completed.
                sdkController.Delegate = AirWatchSDKManager.sharedInstance;
            }

            return(true);
        }
Ejemplo n.º 4
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());
            if (Runtime.Arch == Arch.SIMULATOR)
            {
                Debug.WriteLine("Running in Simulator, skipping initialization of the AirWatch SDK!");
            }
            else
            {
                Debug.WriteLine("Running on Device, beginning initialization of the AirWatch SDK.");

                // Configure the Controller by:
                var sdkController = AWController.ClientInstance();
                // 1) defining the callback scheme so the app can get called back,
                sdkController.CallbackScheme = "com.deloitte.cn.ESSDev.url"; // defined in Info.plist
                // 2) set the delegate to know when the initialization has been completed.
                sdkController.Delegate = AirWatchSDKManager.Instance;
            }
            return(base.FinishedLaunching(app, options));
        }
Ejemplo n.º 5
0
 public override bool HandleOpenURL(UIApplication application, NSUrl url)
 {
     return(AWController.ClientInstance().HandleOpenURL(url, ""));
 }
Ejemplo n.º 6
0
 public override void OnActivated(UIApplication application)
 {
     AWController.ClientInstance().Start();
 }
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     clientInstance = AWController.ClientInstance();
     setUpViews();
 }
Ejemplo n.º 8
0
 public override bool HandleOpenURL(UIApplication application, NSUrl url)
 {
     Console.WriteLine(url.AbsoluteString);
     return(AWController.ClientInstance().HandleOpenURL(url, ""));
 }