Thus far, my experience trying to make Xamarin.Forms work on iOS has been a complete failure, and I am getting very close to giving up on this.
For the past week, I have tried, to no avail, to get push notifications working with both Azure and Firebase, and neither works no matter what I do.
So today, I was hoping to make some progress in at least getting the app to run on iOS, even if notifications can't work.
Alas, here I am, stuck again.
This time, it's on a really simple shell navigation.
The app flow is really basic, the shell is configured to display a "loading" view as the initial page. This page does a quick check to see if the user has already opened the app before, and if so, directs navigation to one page, and if not, to another.
The route in question is a global route registered as follows:
public partial class AppShell : Shell { public AppShell() { InitializeComponent(); Routing.RegisterRoute("login", typeof(Login)); Routing.RegisterRoute("register", typeof(Register)); Routing.RegisterRoute("botflow", typeof(BotFlow)); Routing.RegisterRoute("document", typeof(Document)); } }
Specifically, the route being navigated to is the "register"
route.
The code to perform the navigation is as follows:
public async Task ShellNavigateAsync(string route) { await Task.Run(() => { Application.Current.Dispatcher.BeginInvokeOnMainThread(async () => { await Shell.Current.GoToAsync(route); }); }); }
The call to await Shell.Current.GotToAsync(route)
just hangs forever, and the navigation never takes place.
Hoping someone here can tell me the secret ingredients to make this work.
This code resides in the shared library, btw, and it is working flawlessly on Android. The same can't be said for iOS, sadly.