提交 db0a764b authored 作者: JarvanMo's avatar JarvanMo

update readme

上级 145ac85f
...@@ -62,13 +62,21 @@ for more details. ...@@ -62,13 +62,21 @@ for more details.
> For iOS, some configurations, such as url_scheme,universal_link, LSApplicationQueriesSchemes, can be configured by `fluwx`, > For iOS, some configurations, such as url_scheme,universal_link, LSApplicationQueriesSchemes, can be configured by `fluwx`,
> what you need to do is to fill configurations in `pubspec.yaml` > what you need to do is to fill configurations in `pubspec.yaml`
- app_id. Optional but recommend. It'll be used to generate scheme on iOS and register WxApi on Android side if app is cold boot. - app_id. Recommend. It'll be used to generate scheme on iOS。This is not used to init WeChat SDK so you still need to call `fluwx.registerApi` manually.
- debug_logging. Optional. Enable logs by setting it `true`. - debug_logging. Optional. Enable logs by setting it `true`.
- flutter_activity. Optional. This is usually used by cold boot from WeChat on Android. `Fluwx` will try to launch launcher activity if not set. - flutter_activity. Optional. This is usually used by cold boot from WeChat on Android. `Fluwx` will try to launch launcher activity if not set.
- universal_link. Required for iOS. It'll be used to generate universal link on your projects. - universal_link. Required for iOS. It'll be used to generate universal link on your projects.
> If you are failing `cannot load such file -- plist` on iOS, please run `sudo gem install plist` first. * For iOS
If you are failing `cannot load such file -- plist` on iOS, please do the following steps:
```shell
# step.1 install missing dependencies
sudo gem install plist
# step.2 enter iOS folder(example/ios/,ios/)
cd example/ios/
# step.3 execute
pod install
```
## Register WxAPI ## Register WxAPI
Register your app via `fluwx` if necessary. Register your app via `fluwx` if necessary.
...@@ -83,6 +91,8 @@ how to create universalLink. You can also learn how to add URL schema, how to ad ...@@ -83,6 +91,8 @@ how to create universalLink. You can also learn how to add URL schema, how to ad
For Android, you shall know to how generate signature for your app in [this page](https://developers.weixin.qq.com/doc/oplatform/Downloads/Android_Resource.html). For Android, you shall know to how generate signature for your app in [this page](https://developers.weixin.qq.com/doc/oplatform/Downloads/Android_Resource.html).
And you have to understand the difference between debug signature and release signature. Once the signature is incorrect, then you'll get `errCode = -1`. And you have to understand the difference between debug signature and release signature. Once the signature is incorrect, then you'll get `errCode = -1`.
It' better to register your API as early as possible.
## Capability Document ## Capability Document
- [Basic knowledge](./doc/BASIC_KNOWLEDGE.md) - [Basic knowledge](./doc/BASIC_KNOWLEDGE.md)
...@@ -105,10 +115,15 @@ Buy the writer a cup of coffee。 ...@@ -105,10 +115,15 @@ Buy the writer a cup of coffee。
## Subscribe Us On WeChat ## Subscribe Us On WeChat
![subscribe](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/wx_subscription.png) ![subscribe](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/wx_subscription.png)
## Start history
![stars](https://starchart.cc/OpenFlutter/fluwx.svg)
## LICENSE ## LICENSE
Copyright 2018 OpenFlutter Project Copyright 2023 OpenFlutter Project
Licensed to the Apache Software Foundation (ASF) under one or more contributor Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for license agreements. See the NOTICE file distributed with this work for
......
...@@ -62,13 +62,21 @@ dependencies: ...@@ -62,13 +62,21 @@ dependencies:
> V4开始,iOS中的url_scheme,universal_link, LSApplicationQueriesSchemes可以不必开发者手动配动。只需在`pubspec.yaml` > V4开始,iOS中的url_scheme,universal_link, LSApplicationQueriesSchemes可以不必开发者手动配动。只需在`pubspec.yaml`
> 中填写即可。 > 中填写即可。
- app_id. 可选但推荐填写. 它将用于生成iOS的url_scheme以及在Android端冷启动时,重新初始化WxApi - app_id. 推荐. 它将用于生成iOS的url_scheme。这并不会替你初始化微信SDK,所以你还是自己调用`fluwx.registerApi`
- debug_logging. 可选. 把它设置成`true`可以开启日志。 - debug_logging. 可选. 把它设置成`true`可以开启日志。
- flutter_activity. 可选. 这个通常是用于Android的冷启动。如果不设置任何值,`Fluwx`将尝试启动launcher activity. - flutter_activity. 可选. 这个通常是用于Android的冷启动。如果不设置任何值,`Fluwx`将尝试启动launcher activity.
- universal_link. iOS 必填. 它将用自动配置universal_link。 - universal_link. iOS 必填. 它将用自动配置universal_link。
> 如果你在iOS端遇到了`cannot load such file -- plist`问题, 请先运行`sudo gem install plist`。 * For iOS
如果你在iOS上遇到了 `cannot load such file -- plist`, 请按照以下步骤进行操作:
```shell
# step.1 安装必要依赖
sudo gem install plist
# step.2 进行iOS文件夹(example/ios/,ios/)
cd example/ios/
# step.3 执行脚本
pod install
```
## 注册 WxAPI ## 注册 WxAPI
...@@ -85,6 +93,8 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive ...@@ -85,6 +93,8 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive
对于Android, 可以查看[本文](https://developers.weixin.qq.com/doc/oplatform/Downloads/Android_Resource.html)以便了解怎么获取app签名. 对于Android, 可以查看[本文](https://developers.weixin.qq.com/doc/oplatform/Downloads/Android_Resource.html)以便了解怎么获取app签名.
然后你需要知道release和debug时,app签名有什么区别。如果签名不对,你会得一个错误 `errCode = -1`. 然后你需要知道release和debug时,app签名有什么区别。如果签名不对,你会得一个错误 `errCode = -1`.
建议越早注册越好。
## 能力文档 ## 能力文档
- [基础知识](./doc/BASIC_KNOWLEDGE_CN.md) - [基础知识](./doc/BASIC_KNOWLEDGE_CN.md)
...@@ -106,6 +116,10 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive ...@@ -106,6 +116,10 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive
## 关注公众号 ## 关注公众号
![subscribe](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/wx_subscription.png) ![subscribe](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/wx_subscription.png)
## 关注趋势
![stars](https://starchart.cc/OpenFlutter/fluwx.svg)
## LICENSE ## LICENSE
Copyright 2018 OpenFlutter Project Copyright 2018 OpenFlutter Project
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论