简体   繁体   中英

Does "App Picker" exist on iOS when using deep/universal linking?

I need to solve a following problem on iOS platform, based on android functionality.

So whats the story? Soon we will have custom URL scheme, standardised on a national level that multiple independent companies will need to support/handle.

But there is a problem if the user has more than one installed application that handles that kind of scheme.

On android in that case, OS platform itself presents to user an "app picker" dialog, so that customer can choose with what application he wishes to open that URL/scheme. Unfortunately on iOS there is no such functionality, first installed application that is registered for that custom scheme is always the one that handles it.

So my question is: Am I missing something? Is it possible that iOS is missing that kind of basic functionality?

As far as I known, URL/scheme should be setted specially in iOS , you can not open other application by the Picker the same with Android.

However , you can have a try with customing a popup view contained other App Icon image . Then when you click one image , will invoke the Open Url method to the special App .I think this should be a workaround in iOS.

Such as bellow code by using DisplayActionSheet to open other App :

private async void Button_Clicked(object sender, EventArgs e)
{
    var action = await DisplayActionSheet("ActionSheet: Open which App?", "Cancel", null, "Twitter", "Facebook");
    Debug.WriteLine("Action: " + action);
    switch (action)
    {
        case "Twitter":
            await Launcher.OpenAsync(new Uri("twitter://user?user_id=userid"));
            break;
        case "Facebook":
            await Launcher.OpenAsync(new Uri("fb://page/page_id"));
            break;
        default:
            Console.WriteLine("Default case");
            break;
    }
}

The effect :

在此处输入图片说明

Note :You also can custom pop-up View with Image and Label ,code just be a sample guide .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM