Leandro Lima
Leandro Lima

Reputation: 1170

App links for iOS using xamarin.forms

Using Xamarin.forms and getting AndroidAppLinks on NuGetPackages I'm able to associate links to my app and makes it open the page I want. I'm trying to do the same with iOS. About this, I have two questions:

  1. Do this kind of thing exists?
  2. How do I make it?

I have already override the method protected override void OnAppLinkRequestReceived(Uri uri) on App.xaml.cs, I have also registered the the entry with Application.Current.AppLinks.RegisterLink(entry) and I have tryied to change Info.plist adding this entry:

<key>CFBundleURLTypes</key>
  <array>
    <dict>
      <key>CFBundleURLName</key>
      <string>http://relacionamento.com.br/senha</string>
      <key>CFBundleURLTypes</key>
      <string>Viewer</string>
      <key>CFBundleURLSchemes</key>
      <array>
        <string>example</string>
      </array>
    </dict>
  </array>

I have tryied to use Rivets but I got this for Android:

Severity Code Description Project File Line Suppression State Error Could not install package 'Microsoft.Bcl.Build 1.0.14'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0

And this for iOS:

Severity Code Description Project File Line Suppression State Error Could not install package 'Microsoft.Bcl.Build 1.0.14'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Trying to install in the forms, I got:

Severity Code Description Project File Line Suppression State Error Could not install package 'Rivets 1.0.5'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0

Do I must to use Rivets? What more do I need to use those links?

Best Regards

Upvotes: 0

Views: 1921

Answers (1)

Alex Bauer
Alex Bauer

Reputation: 13613

The iOS equivalent of Android App Links is called Universal Links, and was introduced with iOS 9. To my knowledge there is no Nuget package for enabling Universal Links on Xamarin, but there is a pretty detailed walkthrough for setting everything up available here.

The Rivets package is for Facebook App Links — a completely different standard that just happens to have an identical name.

An alternative for handling all of these things at once is the Branch.io (full disclosure: I'm on the Branch team) deep linking platform. This is available as a Nuget package and you can find full documentation here.

Upvotes: 1

Related Questions