iOS Universal Links and GET parameters

前端 未结 3 1704
耶瑟儿~
耶瑟儿~ 2021-01-04 05:14

we\'re trying to implement app indexing on iOS using the Apple Universal Links (I\'m looking at https://developer.apple.com/library/ios/documentation/General/Conceptual/AppS

3条回答
  •  囚心锁ツ
    2021-01-04 05:38

    In iOS 13, it's now possible to specify query and fragment values when defining universal link URLs. Sadly this isn't well documented by Apple, but it was mentioned in WWDC 2019: https://developer.apple.com/videos/play/wwdc2019/717/.

    For your original example where you'd just like to match https://www.mywebsite.com?parameter=something, your apple-app-site-association file should look like:

    {
      "applinks": {
        "apps": [],
        "details": [
          {
            "appID": "MYID",
            "components": [
              {
                "/" : "",
                "?": { "parameter": "something" }
              }
            ]
          }
        ]
      }
    }
    

    Note that you'll still need to specify a paths array if you want to continue supporting universal links in iOS 12, and iOS 13 devices will ignore the paths array if you specify a components array.

提交回复
热议问题