-
Notifications
You must be signed in to change notification settings - Fork 64
/
README.md
131 lines (96 loc) · 3.7 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# tencent_kit
[![Pub Package](https://img.shields.io/pub/v/tencent_kit.svg)](https://pub.dev/packages/tencent_kit)
[![License](https://img.shields.io/github/license/RxReader/tencent_kit)](https://github.com/RxReader/tencent_kit/blob/master/LICENSE)
Flutter 版腾讯(QQ)SDK
## 相关工具
* [Flutter版微信SDK](https://github.com/RxReader/wechat_kit)
* [Flutter版腾讯(QQ)SDK](https://github.com/RxReader/tencent_kit)
* [Flutter版新浪微博SDK](https://github.com/RxReader/weibo_kit)
* [Flutter版支付宝SDK](https://github.com/RxReader/alipay_kit)
* [Flutter版深度链接](https://github.com/RxReader/link_kit)
* [Flutter版walle渠道打包工具](https://github.com/RxReader/walle_kit)
## Dart/Flutter Pub 私服
* [simple_pub_server](https://github.com/RxReader/simple_pub_server)
## 相关文档
* [腾讯开放平台](https://open.tencent.com/)
* [QQ互联](http://wiki.connect.qq.com/)
* [QQ 创建、填写及校验UniversalLinks](https://wiki.connect.qq.com/%E5%A1%AB%E5%86%99%E5%8F%8A%E6%A0%A1%E9%AA%8Cuniversallinks)
* [Apple Universal Links](https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html)
## 开始使用
### Android
```
# 不需要做任何额外接入工作
# 配置已集成到脚本里
# 混淆已打入 Library,随 Library 引用,自动添加到 apk 打包混淆
```
### iOS
> 暂不支持 SceneDelegate,详见文档 [iOS_SDK环境搭建](https://wiki.connect.qq.com/ios_sdk%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba)
```
# 不需要做任何额外接入工作
# 配置已集成到脚本里
```
* Universal Links
apple-app-site-association - 通过 https://${your applinks domain}/.well-known/apple-app-site-association 链接可访问
示例:
https://${your applinks domain}/universal_link/${example_app}/qq_conn/${appId}
```json
{
"applinks": {
"apps": [],
"details": [
{
"appID": "${your team id}.${your app bundle id}",
"paths": [
"/universal_link/${example_app}/qq_conn/${your tencent app id}/*"
]
}
]
}
}
```
> ⚠️ 很多 SDK 都会用到 universal_link,可为不同 SDK 分配不同的 path 以作区分
### Flutter
|分享类型|说说(图/文/视频)|文本|图片|音乐|视频|网页|
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|QQ|不支持|不支持|支持|支持|不支持|支持|
|QZone|支持|不支持|不支持|不支持|不支持|支持|
* 注意
⚠️⚠️⚠️ registerApp 前必须先调用 setIsPermissionGranted [issues/60](https://github.com/RxReader/tencent_kit/issues/60) [issues/79](https://github.com/RxReader/tencent_kit/issues/79)
* 兼容
flutter 2.5 兼容问题 [issues/54](https://github.com/RxReader/tencent_kit/issues/54)
```
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# 兼容 Flutter 2.5
target.build_configurations.each do |config|
# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'i386 arm64'
end
end
end
```
* 配置
```yaml
dependencies:
tencent_kit: ^${latestTag}
# tencent_kit:
# git:
# url: https://github.com/RxReader/tencent_kit.git
tencent_kit:
app_id: ${your tencent app id}
universal_link: https://${your applinks domain}/universal_link/${example_app}/qq_conn/${your tencent app id}/ # 可选项目
```
* 安装(仅iOS)
```shell
# step.1 安装必要依赖
sudo gem install plist
# step.2 切换工作目录,插件里为 example/ios/,普通项目为 ios/
cd example/ios/
# step.3 执行脚本
pod install
```
## 示例
[示例](./example/lib/main.dart)
## Star History
![stars](https://starchart.cc/rxreader/tencent_kit.svg)