Xamarin forms: AppStore app page is not opening when new version is available?

SreeeeSreeee INMember ✭✭✭✭✭

I am using Plugin.LatestVersion NuGet package for checking new version availability.

My Code:

using Plugin.LatestVersion;

var isLatest = await CrossLatestVersion.Current.IsUsingLatestVersion();

if (!isLatest)
{
    var update = await DisplayAlert("New Version", "There is a new version of this app available. Would you like to update now?", "Yes", "No");

    if (update)
    {
        await CrossLatestVersion.Current.OpenAppInStore();
    }
}

In android and IOS, displaying an alert is working fine if a new version is available. In the case of the android app, if tap yes from the alert it will load the app page in the play store app.

But for ios, the app page is not loading when tap yes option form the alert. Cannot connect to AppStore is showing on the Appstore app.

Screenshot:

enter image description here

I have also tried await CrossLatestVersion.Current.OpenAppInStore("app bundle name");, but showing the same above screen on AppStore.

Best Answers

  • ColeXColeX Xamurai
    Accepted Answer

    It's a known issue , reported here : https://github.com/edsnider/latestversionplugin/issues/6.

    Still not fixed yet.

  • SreeeeSreeee IN ✭✭✭✭✭
    Accepted Answer

    @ColeX What about using Launcher.OpenAsync for opening the app in AppStore.

    await Launcher.OpenAsync(new Uri("appstore link"));
    
  • ColeXColeX Xamurai
    Accepted Answer

    Yes, you could try

    if (update)
    {
    if(iOS){
        await Launcher.OpenAsync(new Uri("appstore link"));
    }
    else{
        await CrossLatestVersion.Current.OpenAppInStore();
    }        
    }
    

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    Accepted Answer

    It's a known issue , reported here : https://github.com/edsnider/latestversionplugin/issues/6.

    Still not fixed yet.

  • SreeeeSreeee INMember ✭✭✭✭✭
    Accepted Answer

    @ColeX What about using Launcher.OpenAsync for opening the app in AppStore.

    await Launcher.OpenAsync(new Uri("appstore link"));
    
  • ColeXColeX Member, Xamarin Team Xamurai
    Accepted Answer

    Yes, you could try

    if (update)
    {
    if(iOS){
        await Launcher.OpenAsync(new Uri("appstore link"));
    }
    else{
        await CrossLatestVersion.Current.OpenAppInStore();
    }        
    }
    
Sign In or Register to comment.