一、微信代码
//1.依赖库
fluwx: ^3.9.1
//2.注册
await fluwx.registerWxApi(
appId: "微信平台app应用Id",
doOnAndroid: true,
doOnIOS: true,
universalLink: "微信平台配置universalLink链接");
//3.回调监听
fluwx.weChatResponseEventHandler.listen((res) {
if (res is fluwx.WeChatPaymentResponse) {
log("支付状态:${res.isSuccessful}=");
}
});
二、 ios 项目配置
1.配置 URL Types
2.info.plist 添加白名单,weixin、weixinULAPI
3. Associated Domains
http://developer.apple.com
1)打开Certificates, Identifiers & Profiles
2)选择左侧 Identifiers
3)点击应用,勾选 Associated Domains
4. Associated Domains
//Domains: 后台提供网址 去掉http
applinks:www.xxxx.com

1.创建空白文本,命名为apple-app-site-association(无后缀)
说明 appID: TeamId.Bundle Identifier
{"applinks":{"apps":[],"details":[{"appID":".******.***.***.***","paths":["*"]}]}}
2.后台 上传至根目录下。形成链接后,可下载即成功。