From b6403872805f5a36c270a4b45fac78548dfded93 Mon Sep 17 00:00:00 2001 From: jaywcjlove Date: Wed, 5 Aug 2020 08:06:26 +0000 Subject: [PATCH] Automated deployment: Wed Aug 5 08:06:26 UTC 2020 f003212c3ce2c716de92cef9c0f4f3787fb64014 --- apple-app-site-association | 2 +- globals.html | 10 +++++----- index.html | 23 ++++++++++++----------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/apple-app-site-association b/apple-app-site-association index 373fef5..98ed715 100644 --- a/apple-app-site-association +++ b/apple-app-site-association @@ -3,7 +3,7 @@ "apps": [], "details": [ { - "appID": "Team ID.com.uiwjs.XXX", + "appID": "968DSZ49MT.com.uiwjs.react.example.wechat", "paths": ["/react-native-wechat/*"] } ] diff --git a/globals.html b/globals.html index c6cabd4..067802d 100644 --- a/globals.html +++ b/globals.html @@ -90,7 +90,7 @@
  • @@ -112,7 +112,7 @@
  • @@ -135,7 +135,7 @@
  • @@ -158,7 +158,7 @@
  • @@ -180,7 +180,7 @@
  • diff --git a/index.html b/index.html index 9703741..2d53ead 100644 --- a/index.html +++ b/index.html @@ -79,31 +79,32 @@
    iOS: 微信授权登录 Universal Link(通用链接)
    -

    Universal Link(通用链接)是苹果在 iOS9 推出的,一种能够方便的通过传统 HTTPS 链接来启动 APP 的功能,可以使用相同的网址打开网址和 APP。
    看起来就是一条普通的 https 链接,当然是我们在该链接域名根目录配置过的一个链接,也可以在该链接中放置对应的H5页面。当用户的点击该链接,只要手机中安装了支持该链接的 APP 就会直接进入到 APP 中。如果没有安装APP则会跳转到 Safari 浏览器中,展示 H5 页面。对用户来说则是一个无缝跳转的过程。

    +

    Universal Link(通用链接)是苹果在 iOS9 推出的,一种能够方便的通过传统 HTTPS 链接来启动 APP 的功能,可以使用相同的网址打开网址和 APP。
    看起来就是一条普通的 https 链接,当然是我们在该链接域名根目录配置过的一个链接,也可以在该链接中放置对应的H5页面。当用户的点击该链接,只要手机中安装了支持该链接的 APP 就会直接进入到 APP 中。如果没有安装APP则会跳转到 Safari 浏览器中,展示 H5 页面。对用户来说则是一个无缝跳转的过程。

    创建一个名为 apple-app-site-association 的文件,如下:

    {
       "applinks": {
    -    "apps": [],
         "details": [
           {
    -        "appID": "Team ID.com.uiwjs.XXX",
    -        "paths": ["/uiwjs/*"]
    -      },
    -      {
    -        "appID": "Team ID.com.uiwjs.XXX",
    -        "paths": ["/uiwjstest/*"]
    +        "appID": "968DSZ49MT.com.uiwjs.react.example.wechat",
    +        "paths": ["/react-native-wechat/*"]
           }
         ]
       }
     }
    -

    上传该文件到你的域名所对应的根目录xxx目录下,apple-app-site-association 文件不需要扩展名。

    +

    说明: 字段 appID 中的 968DSZ49MT 表示苹果账号的团队 IDcom.uiwjs.react.example.wechat 表示项目的 BundleID

    +
    <Application Identifier Prefix>.<Bundle Identifier>

    上传该文件到你的域名所对应的根目录xxx目录下,apple-app-site-association 文件不需要扩展名。

    注意: 苹果提供了一个网页来验证我们编写的这个 apple-app-site-association 是否合法有效。

    -
    根目录
    +							
    https://<fully qualified domain>/.well-known/apple-app-site-association
    +根目录
     https://uiwjs.github.io/apple-app-site-association
     
     xxx目录
    -https://uiwjs.github.io/react-native-wechat/apple-app-site-association
    +https://uiwjs.github.io/react-native-wechat/apple-app-site-association

    打开 Associated Domains 开关,将 Universal Links 域名加到配置上,如果 URL 地址是 https://uiwjs.github.io/apple-app-site-association,那么, + Associated Domains 中填写 applinks: uiwjs.github.io

    + +

    登录苹果开发者后台,在设置证书的页面找到 Identifiers 里,在对应的 BundleId 下勾选 Associated Domains

    +
    iOS: -canOpenURL: failed for URL: "weixin://".