avioli / uni_links

Flutter plugin for accepting incoming links.
BSD 2-Clause "Simplified" License
563 stars 303 forks source link

unilinks://url is working, but https://url is not working #30

Closed kmvignesh closed 4 years ago

kmvignesh commented 5 years ago

Describe the bug When I tried to use "https" for deep link working on android and iOS not working. Then I tried "unilinks" its working both. But sharing unilinks via sms not clickable. So I want to use "https" for deep linking

To Reproduce I tried the scheme as "https" like below, its working on ANDROID and not working iOS. For iOS I already added "https://skillsdoctor.net/apple-app-site-association". still "https" not working. IOS :

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>skillsdoctor.net</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>https</string>
            </array>
        </dict>
    </array>

ANDROID

            <!-- Deep Links -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:scheme="https"
                    android:host="skillsdoctor.net" />
            </intent-filter>

            <!-- App Links -->
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:scheme="https"
                    android:host="skillsdoctor.net" />
            </intent-filter>

Expected behavior Either https/unilinks deep link should work on both platform.

avioli commented 5 years ago

As far as I can see your https://skillsdoctor.net/apple-app-site-association isn't correctly formatted. You are missing an appID key. See Apple's guide about Universal lilnks: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html

If you can - ensure it is requested by the OS upon app install (or app's first launch). Best suggestion - look at your server's access logs.

Good luck

antheus-s commented 4 years ago

For iOS, you cannot use https as scheme for deep links. You must implement the universal links implementation for the https scheme to work. To get it to work, you have to configure the associated domains and not the CFBundleURLTypes. Be aware though that there are currently issues with iOS 13.x.x due to the new format that apple uses.

kmvignesh commented 4 years ago

Let me try what @AntheusS said.

savasadar commented 3 years ago

@kmvignesh How did you solve this problem? I am facing now same issue.