“Safari cannot open the page because the address is invalid” appearing when accessing Branch link with app uninstalled

前端 未结 3 908
一向
一向 2020-12-15 05:56

I\'m integrating an app with Branch.io and encountered an issue in Safari (I\'ve tested this on iOS 11, but the issue might be appearing on other versions as well).

相关标签:
3条回答
  • 2020-12-15 06:37

    I too was having this problem but I found that following the instructions in the Test section of the Branch Test App I was able to open the app without the Safari warning.

    https://github.com/BranchMetrics/ios-branch-deep-linking/tree/master/Branch-TestBed-Swift#test

    1. If the app was installed on the test device already:
        * Delete the app from the device
        * Clear Safari web content, history and cookies (Settings > Safari > Clear History and Website Data)
        * Reset the device's IDFA (Settings > Privacy > Advertising > Reset Advertising Identifier...)
    2. Create a Marketing link from the Branch dashboard
    3. Paste the link into Notes on an iPhone
    4. Tap the link - you will get redirected to the web page
    5. ...
    
    0 讨论(0)
  • 2020-12-15 06:38

    Aaron from Branch.io here

    You are probably getting this error because Branch is attempting to launch your app via URI schemes when the app is not installed. Starting from iOS 9.2, Apple no longer officially supports URI schemes for deep linking, and developers are strongly advised to implement Universal Links in order to get equivalent functionality on iOS.

    Specifically, there are significant drawbacks to custom URI schemes, most notably the inability to easily handle these two situations:

    • When the app isn’t installed.
    • When more than one app tries to claim myapp://.

    For this reason, we recommend you enable Universal links in your Branch Dashboard. All you need to do is provide your bundle ID and app prefix, and Branch will host the AASA file for you.

    0 讨论(0)
  • 2020-12-15 06:53

    Hope it helps somebody.

    1. Go to: https://dashboard.branch.io/link-settings/general

    These id's and prefixes from your apple dashboard: https://developer.apple.com/account/ios/identifier/bundle

    1. Add ASAA file to your server

    Instruction: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12-SW2

    If shortly, create file https://yourdomain.com/.well-known/apple-app-site-association (without .json).
    File content (it's mine, not sure which one object exactly needed, I added both):

    {
        "applinks": {
            "apps": [],
            "details": [
                {
                    "appID": "YOURPREFIX.com.your.id",
                    "paths": [ "*" ]
                },
                {
                    "appID": "com.your.id",
                    "paths": [ "*" ]
                }
            ]
        }
    }
    
    1. Again go to https://dashboard.branch.io/link-settings/general and change to:

    Hope it helps somebody for basic works links without error and with auto-open the app.

    0 讨论(0)
提交回复
热议问题