dotnet / dotnet/maui

AppLinks in iOS return "No IAppIndexingProvider"

Open
#12,295 6 comments 3 reactions 0 assignees View on GitHub
area-essentials platform/ios s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 10h
Merged PRs (30d)
297

Description

### Description

In Xamarin Forms, Using the AppLinks nuget package was straightforward in iOS and required no initialization.

In .NET MAUI, on iOS, AppLinks is built in, but throws an initialization error. It isn't clear from the documentation how to resolve this. This is the case whether an Entitlements.plist declaration is given or not.

### Steps to Reproduce

1. create file new .net maui project
2. Add code to create applinks
3. Witness exception on invocation

```
var url = $"https://en.wikipedia.org/wiki/Steve_Jobs";

var entry = new AppLinkEntry
{
Title = "Steve Jobs",
Description = "President",
AppLinkUri = new Uri(url, UriKind.RelativeOrAbsolute),
IsLinkActive = true,
Thumbnail = ImageSource.FromUri(new Uri("https://cdn.dribbble.com/users/160522/screenshots/1179084/stevejobs-01.jpg", UriKind.RelativeOrAbsolute))
};

entry.KeyValues.Add("contentType", "Employee");
entry.KeyValues.Add("appName", "MauiBug_AppLinks");
try
{
Application.Current.AppLinks.RegisterLink(entry);
}
catch (ArgumentException ex)
{
//TODO: resolve "No IAppIndexingProvider was provided" exception
DisplayAlert("Error", ex.Message, "Cancel");
}
```

### Link to public reproduction project repository

https://github.com/edgiardina/MauiBug_AppLinks_NoIAppIndexing

### Version with bug

7.0 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

iOS

### Affected platform versions

iOS 16.1 (but appears to affect all iOS versions)

### Did you find any workaround?

_No response_

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.