Forum Xamarin.iOS

Very slow to open url in `FinishedLaunching` method

SumitTungdenjingSumitTungdenjing USMember ✭✭
edited July 2017 in Xamarin.iOS

I try to open url after user click at background push notification. When it enters FinishedLaunching method, I check for notification data and open browser. But it taks several second to open web page. I can reproduce this issue on my new iPad Pro 10.5. The result is almost the same as iPad Air.

PS. I try replace this statement with open dialog and it opens popup almost immediately without slowdown my app.


  • AkshayTiwariAkshayTiwari USMember ✭✭
    edited October 2017

    @SumitTungdenjing: Apparently, the iOS was having a race-condition like in trying to launch an app while the app itself was not fully launched.
    Try this

             DispatchQueue.MainQueue.DispatchAsync(() =>
                                    UIApplication.SharedApplication.OpenUrl(new NSUrl(notification.Url));                            

    Hope this will work for you.

  • @AkshayTiwari
    I just try to your solution and it works great. Many thanks.

  • fadisyfadisy Member
    edited December 2018

    thank you so much it works <3<3<3

Sign In or Register to comment.