Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
样式调整
  • Loading branch information
coderomw committed Mar 5, 2020
1 parent 58aa2f4 commit 1d09f2e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 项目添加universal-link跳转,升级微信SDK
苹果对还未从UIWebView更新到WKWebView的应用做出了明确规定:新应用最晚于2020年4月份,更新的应用最晚于2020年12月前,都要更新到WKWebView,未更新的应用将会被拒审。
![](https://upload-images.jianshu.io/upload_images/2360306-00c815c04dcb37dc.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200)
<img src="https://upload-images.jianshu.io/upload_images/2360306-00c815c04dcb37dc.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200" style="zoom:33%;" />
而微信从1.8.6版本开始才将UIWebView更换为WKWebView,所以最好将微信SDK升级到1.8.6以上。
![](https://upload-images.jianshu.io/upload_images/2360306-af26e5b63183a69e.png?imageMogr2/auto-orient/strip|imageView2/2/w/658)
<img src="https://upload-images.jianshu.io/upload_images/2360306-af26e5b63183a69e.png?imageMogr2/auto-orient/strip|imageView2/2/w/658" style="zoom:33%;" />

升级微信SDK后会发现注册方法变了,新增了一个参数universalLink。
```
Expand Down Expand Up @@ -80,16 +80,16 @@ universal link是苹果在iOS9上推出的一种能通过https链接跳转APP的


2.到xcode中配置文件存放的域名,以applinks:开头,拼上域名。当手机下载完应用或者apple-app-site-association文件发生更改时,会去请求这个根目录文件,从而响应支持的跳转格式。
![](https://upload-images.jianshu.io/upload_images/2360306-b21470df3026c010.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200)
<img src="https://upload-images.jianshu.io/upload_images/2360306-b21470df3026c010.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200" style="zoom:33%;" />
LSApplicationQueriesSchemes中新增weixinULAPI
![](https://upload-images.jianshu.io/upload_images/2360306-95de9e8a313d8180.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200)
<img src="https://upload-images.jianshu.io/upload_images/2360306-95de9e8a313d8180.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200" style="zoom:33%;" />
具体细节可以参考微信SDK文档[https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html)



3.这时候跑一下应用,我们可以到Safari测试一下,以微信为例,输入链接[https://help.wechat.com/app/](),下拉页面,会看到在“微信”中打开(系统iOS9.0以上,微信版本7.0.7及以上)。如果这时候出现了你的应用,说明文件配置成功了。

<img src="https://upload-images.jianshu.io/upload_images/2360306-b7fccd5cf3cac9a8.jpeg?imageMogr2/auto-orient/strip|imageView2/2/w/1200" width="30%" align=center/>
<img src="https://upload-images.jianshu.io/upload_images/2360306-b7fccd5cf3cac9a8.jpeg?imageMogr2/auto-orient/strip|imageView2/2/w/1200" width="30%"/>



Expand Down Expand Up @@ -125,7 +125,7 @@ LSApplicationQueriesSchemes中新增weixinULAPI

5.通过universal link从微信跳转回应用时,不再走通过scheme跳转的openUrl:方法了,要实现continueUserActivity方法,判断一下类型。这里的url格式是你在微信后台填写的universal link拼上你的AppID。我这里因为分享和支付用的两个AppID,所以分开处理了一下,交给两个不同的单例,各自实现onResp:的回调。

![](https://upload-images.jianshu.io/upload_images/2360306-4e15b4b4e8f10090.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200)
<img src="https://upload-images.jianshu.io/upload_images/2360306-4e15b4b4e8f10090.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200" style="zoom:33%;" />

以上。

Expand Down

0 comments on commit 1d09f2e

Please sign in to comment.