-1

I have a .Net MAUI app that needs to open when a user clicks on a link in an email.

The url is from a MS Teams meeting reminder, e.g.

https://teams.microsoft.com/l/meetup-join/19%3ameeting_Y2RhZWQzZmsdfdsdsjfdsSSgfdssyOTk4MTJJJJZj%40thread.v2/0?context=%7b%22Tid%22%3a%226cabcf93-bc92-4081-a34e-768ac7bfd3af%22%2c%22Oid%22%3a%224e7b428d-b940-4dab-8de1-07c8f50a2d4e%22%7d

I successfully implemented this for Android, but on an iOS simulator clicking the link opens just a regular Teams website, or (I assume) the Teams app, if it was installed on the simulator.

Here is what I have in Info.plist:

enter image description here

I expect the user to get options what to open upon clicking the link: either the Teams app, or Teams website, or our app, and execution to come to AppDelegate's OpenUrl(UIApplication app, NSUrl url, NSDictionary options).

I guess I am missing some configuration, but can't figure out what that is.

It would be good if I could implement this without creating additional websites, as some solution suggest.

David Shochet
  • 5,035
  • 11
  • 57
  • 105
  • Does this help? [App Links in Xamarin Forms](https://www.xamboy.com/2019/01/08/applinks-in-xamarin-forms/) – Liqun Shen-MSFT Mar 20 '23 at 08:08
  • @LiqunShen-MSFT It seems to me that this is for custom url rather than universal url... And not clear enough for me. – David Shochet Mar 20 '23 at 11:52
  • @LiqunShen-MSFT You see, in that manual, a custom website is created, and I need to use not my own website link, but a link to an existing MS Teams call link. – David Shochet Mar 21 '23 at 14:31
  • I find a similar issue [[Bug] Unable join ms teams meeting with link from another app in iOS.](https://learn.microsoft.com/en-us/answers/questions/930963/(bug)-unable-join-ms-teams-meeting-with-link-from). – Liqun Shen-MSFT Mar 23 '23 at 02:18
  • @LiqunShen-MSFT Not really, there the author is trying to launch the Teams app, and I need to launch my app by clicking on a Teams link. – David Shochet Mar 23 '23 at 12:54
  • Did you mean this? [Xamarin IOS custom URL Scheme not working in iOS 14](https://stackoverflow.com/questions/68827155/xamarin-ios-custom-url-scheme-not-working-in-ios-14) – Liqun Shen-MSFT Mar 24 '23 at 03:15
  • @LiqunShen-MSFT That question is talking about custom URL Scheme, but I need to open my app upon clicking on MS Teams link rather than my own. – David Shochet Mar 24 '23 at 15:24
  • Then your app and Teams app use the same url scheme? – Liqun Shen-MSFT Mar 27 '23 at 06:32
  • @LiqunShen-MSFT Yes! That is why on Android, when the link is clicked, I am asked if I want to open the Teams app or our own app. I was told that iOS does not allow this, unlike Android. But if iOS knows that it should open MS Teams upon clicking on such a link, maybe it is possible to register our app somehow with Apple to do the same? – David Shochet Mar 27 '23 at 11:35

1 Answers1

1

Actually I think we cannot do that. See Apple docs: Register your URL scheme

If multiple apps register the same scheme, the app the system targets is undefined. There’s no mechanism to change the app or to change the order apps appear in a Share sheet.

That means we cannot determine which app to open at runtime.

For more info, you could also refer to this SO issue Multiple apps with the same URL Scheme - iOS.

Hope it works for you.

Liqun Shen-MSFT
  • 3,490
  • 2
  • 3
  • 11
  • Of course, automatically iOS cannot determine what to open, but why can't it ask the user, like Android does it? Thank you for the links! – David Shochet Mar 28 '23 at 11:36