Adding Associated Domains Entitlement For a Flutter App

3,432

Solution 1

Open the Runner.entitlements file from this path :

ios/Runner/Runner.entitlements

And add the applink you want

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <!-- ... other keys -->
  <key>com.apple.developer.associated-domains</key>
  <array>
    <string>applinks:[YOUR_HOST]</string>
  </array>
  <!-- ... other keys -->
</dict>
</plist>

For more information, read Apple's guide for Universal Links.

Solution 2

Log in to Apple Developer Account. Check your bundle Id. Edit your App ID. Add Associated Domain Entitlement from there. Update Provisioning profile and Use it in your Flutter project.

Share:
3,432
shaharsol
Author by

shaharsol

Updated on December 15, 2022

Comments

  • shaharsol
    shaharsol over 1 year

    I need to add Associated Domains Entitlement to my Flutter app, so I can implement App Links. I use the uni_links plugin which works well for Android. I've added a ios/Runner/Runner.entitlements file as described, but it doesn't work. Apple official docs imply that I need to add something to the app via xcode. Problem is, I don't use xcode, rather Android Studio. I believe I need to manually add an entry to info.plist or project.pbxproj which is what I believe xcode does, however I am not sure what.

  • Jitendra
    Jitendra over 4 years
    It means you need to select your app Id and Edit Capabilities from there.
  • shaharsol
    shaharsol over 4 years
    did that and it doesn't work (on simulator). my question was if i need to do something additional in xcode
  • Sumeet.Jain
    Sumeet.Jain over 4 years
    In Xcode, go to Capabilites, in that section there is an option to add Associated Domains. First switch it on and then add the link as applinks. Applinks and webcredentials are different: applinks is for universal links webcredentials is for web credential sharing . is this answer your question @shaharsol
  • Martin Westin
    Martin Westin over 2 years
    I believe this stuff doesn't work in the Simulator at all and needs testing on a real device. Also, since it hasn't been mentioned explicitly, you also need to create matching settings on your web domain for Apple to scrape.
  • Sumeet.Jain
    Sumeet.Jain over 2 years
    @MartinWestin yes ita it doesnt work in simulator plus it is a pre-requisite to have aasa file uploaded on the web domain for Universal link or app links to work.