Forum Xamarin Xamarin.iOS

Problem with OpenUrl callon iOS

CatDelonCatDelon Member ✭✭
edited October 2019 in Xamarin.iOS

Hi all !!

Currently I am working on a Xamarin.Forms project which can be called from another app using url.
I have two pages which should be shown if user is not logged in and another (MainPage) of app should be shown when user is logged in. The same logic is working fine on UWP and Android platforms, but on IOS it keeps to naviagate to the first page although the user is logged in.

here is the code which I have

**iOS AppDelegate:
public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
LoadApplication(new App(url.ToString()));
return true;


            if (url == null || url == "")
                MainPage = new NavigationPage(new AccessDeniedPage());


  public void SetUserData(string uri)
           // some code here         
             MainPage = new NavigationPage(new MainPage());

As I said the problem is that it keeps to showing the so called AccessDeniedPage, although user is logged in successfully and url with params is passed correctly.

Have you guys faced this issue? Any help is welcome!!!!

Thanks in advance.

Best Answers


  • CatDelonCatDelon Member ✭✭

    Thank you @LandLu and @ZTn very much !!! I solved the problem via your help.

Sign In or Register to comment.