Reputation: 13
I am trying to start my MAUI IOS App using URI, but when I clicked on URL that must open my app nothing happen. I set a breakpoint into OpenUrl and ContinueUserActivity to check if its called, but its never called.
I created apple-app-site-association :
{
"applinks": {
"apps": [],
"details": [
{
"appID": "H9375ODJ26.com.example.testapp",
"paths": [ "/video/*"]
}
]
}
}
the file is accessible on https://www.example.com/.well-known/apple-app-site-association and it has content-type = application/json.
I have added in my Entitlements.plist this code:
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:example.com</string>
</array>
In developer.apple.com Associated domains option for my app is turned on.
Can anyone tell me what I'm missing ? I expect when I click on the URI, a pop-up will appear asking how to open the uri - browser or my ios app.
Upvotes: 0
Views: 1035
Reputation: 1639
In Maui you can use Launcher to open other applications through URI. Apple requires that you define the schemes you want to use. Add the LSApplicationQueriesSchemes key and schemes to the Info.plist files:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>XXX</string>
</array>
Call the ILauncher.OpenAsync method and pass in a String or Uri representing the application to open:
await Launcher.Default.OpenAsync("xxx");
For more details, refer to:Launcher | Microsoft
Upvotes: 1