Unverified 提交 7ad9e78e authored 作者: yeliulee's avatar yeliulee

Add documentation for OpenHarmony

Signed-off-by: 's avataryeliulee <yeliuleet@gmail.com>
上级 0ecc3810
# Fluwx # Fluwx
![pub package](https://img.shields.io/pub/v/fluwx.svg)
[![pub package](https://img.shields.io/pub/v/fluwx.svg)](https://pub.dartlang.org/packages/fluwx)
![Build status](https://github.com/OpenFlutter/fluwx/actions/workflows/build_test.yml/badge.svg) ![Build status](https://github.com/OpenFlutter/fluwx/actions/workflows/build_test.yml/badge.svg)
====== [![GitHub stars](https://img.shields.io/github/stars/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/network)
[![GitHub license](https://img.shields.io/github/license/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/issues)
<a target="_blank" href="https://qm.qq.com/q/TJ29rkzywM"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="OpenFlutter" title="OpenFlutter"></a>
---
![logo](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/fluwx_logo.png) ![logo](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/fluwx_logo.png)
[中文请移步此处](./README_CN.md) [中文请移步此处](./README_CN.md)
## What's Fluwx ## What's Fluwx
`Fluwx` is flutter plugin for [WeChatSDK](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html) which allows developers to call `Fluwx` is flutter plugin for [WeChatSDK](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html) which allows developers to call
[WeChatSDK](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html) native APIs. [WeChatSDK](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html) native APIs.
> Join QQ Group now: 1003811176 > Join QQ Group now: 1003811176
![QQGroup](https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/flutter.png) ![QQGroup](https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/flutter.png)
...@@ -45,13 +52,13 @@ Add the following dependencies in your `pubspec.yaml` file: ...@@ -45,13 +52,13 @@ Add the following dependencies in your `pubspec.yaml` file:
dependencies: dependencies:
fluwx: ^${latestVersion} fluwx: ^${latestVersion}
``` ```
![pub package](https://img.shields.io/pub/v/fluwx.svg) ![pub package](https://img.shields.io/pub/v/fluwx.svg)
`Fluwx` without pay: `Fluwx` without pay:
> Developers who need to exclude payment for iOS can enable `no_pay` in [pubspec.yaml](./example/pubspec.yaml#L86). > Developers who need to exclude payment for iOS can enable `no_pay` in [pubspec.yaml](./example/pubspec.yaml#L86).
> NOTE: Never forget to replace ^${latestVersion} with actual version. > NOTE: Never forget to replace ^${latestVersion} with actual version.
## Configurations ## Configurations
...@@ -68,8 +75,9 @@ for more details. ...@@ -68,8 +75,9 @@ for more details.
- universal_link. Recommend for iOS. It'll be used to generate universal link on your projects. - universal_link. Recommend for iOS. It'll be used to generate universal link on your projects.
- scene_delegate. Optional. Use `AppDelegate` or `SceneDelegate`. See [official documents](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html) for more details. - scene_delegate. Optional. Use `AppDelegate` or `SceneDelegate`. See [official documents](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html) for more details.
* For iOS - For iOS
If you are failing `cannot load such file -- plist` on iOS, please do the following steps: If you are failing `cannot load such file -- plist` on iOS, please do the following steps:
```shell ```shell
# step.1 install missing dependencies # step.1 install missing dependencies
sudo gem install plist sudo gem install plist
...@@ -78,6 +86,19 @@ cd example/ios/ ...@@ -78,6 +86,19 @@ cd example/ios/
# step.3 execute # step.3 execute
pod install pod install
``` ```
- On OpenHarmony, to check if WeChat is installed, add the following to the module.json5 in your project
```json5
{
"module": {
"querySchemes": [
"weixin"
],
}
}
```
## Register WxAPI ## Register WxAPI
Register your app via `fluwx` if necessary. Register your app via `fluwx` if necessary.
...@@ -86,6 +107,7 @@ Register your app via `fluwx` if necessary. ...@@ -86,6 +107,7 @@ Register your app via `fluwx` if necessary.
Fluwx fluwx = Fluwx(); Fluwx fluwx = Fluwx();
fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.univerallink.com/link/"); fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.univerallink.com/link/");
``` ```
The param `universalLink` only works with iOS. You can read [this document](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html) to learn The param `universalLink` only works with iOS. You can read [this document](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html) to learn
how to create universalLink. You can also learn how to add URL schema, how to add `LSApplicationQueriesSchemes` in your iOS project. This is essential. how to create universalLink. You can also learn how to add URL schema, how to add `LSApplicationQueriesSchemes` in your iOS project. This is essential.
...@@ -109,13 +131,14 @@ For more capabilities, you can read the public functions of `fluwx`. ...@@ -109,13 +131,14 @@ For more capabilities, you can read the public functions of `fluwx`.
[These questions maybe help](./doc/QA_CN.md) [These questions maybe help](./doc/QA_CN.md)
## Donate ## Donate
Buy the writer a cup of coffee。 Buy the writer a cup of coffee。
<img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/wx.jpeg" height="300"> <img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/ali.jpeg" height="300"> <img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/wx.jpeg" height="300"> <img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/ali.jpeg" height="300">
## 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)
## Star history ## Star history
...@@ -123,7 +146,6 @@ Buy the writer a cup of coffee。 ...@@ -123,7 +146,6 @@ Buy the writer a cup of coffee。
## LICENSE ## LICENSE
Copyright 2023 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
...@@ -140,8 +162,3 @@ Buy the writer a cup of coffee。 ...@@ -140,8 +162,3 @@ Buy the writer a cup of coffee。
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under License for the specific language governing permissions and limitations under
the License. the License.
# Fluwx # Fluwx
![pub package](https://img.shields.io/pub/v/fluwx.svg)
[![pub package](https://img.shields.io/pub/v/fluwx.svg)](https://pub.dartlang.org/packages/fluwx)
![Build status](https://github.com/OpenFlutter/fluwx/actions/workflows/build_test.yml/badge.svg) ![Build status](https://github.com/OpenFlutter/fluwx/actions/workflows/build_test.yml/badge.svg)
====== [![GitHub stars](https://img.shields.io/github/stars/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/network)
[![GitHub license](https://img.shields.io/github/license/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/OpenFlutter/fluwx)](https://github.com/OpenFlutter/fluwx/issues)
<a target="_blank" href="https://qm.qq.com/q/TJ29rkzywM"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="OpenFlutter" title="OpenFlutter"></a>
---
![logo](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/fluwx_logo.png) ![logo](https://gitee.com/OpenFlutter/resoures-repository/raw/master/fluwx/fluwx_logo.png)
## 什么是Fluwx ## 什么是Fluwx
`Fluwx` 是一个[微信SDK](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html)插件,它允许开发者调用
[微信原生SDK ](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html).
`Fluwx` 是一个[微信SDK](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html)插件,它允许开发者调用
[微信原生SDK](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html).
> 加入我们的QQ群: 1003811176 > 加入我们的QQ群: 1003811176
...@@ -30,11 +37,9 @@ ...@@ -30,11 +37,9 @@
> 破坏性更新 :从4.5.0起,当分享图片到微信时,如果不支持FileProvider方式分享,Fluwx不再尝试申请WRITE_EXTERNAL_STORAGE权限,这意味着你需要自己处理权限问题。 > 破坏性更新 :从4.5.0起,当分享图片到微信时,如果不支持FileProvider方式分享,Fluwx不再尝试申请WRITE_EXTERNAL_STORAGE权限,这意味着你需要自己处理权限问题。
`Fluwx` 可以做很多工作但不是所有. 在集成之前,最好读一下[官方文档](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html). `Fluwx` 可以做很多工作但不是所有. 在集成之前,最好读一下[官方文档](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Resource_Center_Homepage.html).
然后你才知道怎么生成签名,怎么使用universal link以及怎么添加URL schema等. 然后你才知道怎么生成签名,怎么使用universal link以及怎么添加URL schema等.
## 安装 ## 安装
`pubspec.yaml` 文件中添加`fluwx`依赖: `pubspec.yaml` 文件中添加`fluwx`依赖:
...@@ -45,6 +50,7 @@ ...@@ -45,6 +50,7 @@
dependencies: dependencies:
fluwx: ^${latestVersion} fluwx: ^${latestVersion}
``` ```
![pub package](https://img.shields.io/pub/v/fluwx.svg) ![pub package](https://img.shields.io/pub/v/fluwx.svg)
不带支付的`Fluwx`: 不带支付的`Fluwx`:
...@@ -67,8 +73,9 @@ dependencies: ...@@ -67,8 +73,9 @@ dependencies:
- universal_link. iOS 推荐. 它将用自动配置universal_link。 - universal_link. iOS 推荐. 它将用自动配置universal_link。
- scene_delegate. iOS 可选. 使用 `AppDelegate` 还是使用 `SceneDelegate`. 查阅[官方文档](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html)了解更多. - scene_delegate. iOS 可选. 使用 `AppDelegate` 还是使用 `SceneDelegate`. 查阅[官方文档](https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html)了解更多.
* For iOS - For iOS
如果你在iOS上遇到了 `cannot load such file -- plist`, 请按照以下步骤进行操作: 如果你在iOS上遇到了 `cannot load such file -- plist`, 请按照以下步骤进行操作:
```shell ```shell
# step.1 安装必要依赖 # step.1 安装必要依赖
sudo gem install plist sudo gem install plist
...@@ -78,6 +85,18 @@ cd example/ios/ ...@@ -78,6 +85,18 @@ cd example/ios/
pod install pod install
``` ```
- 在 OpenHarmony 上,要检查微信是否已安装,请在项目的 module.json5 中添加以下内容
```json5
{
"module": {
"querySchemes": [
"weixin"
],
}
}
```
## 注册 WxAPI ## 注册 WxAPI
通过 `fluwx` 注册WxApi. 通过 `fluwx` 注册WxApi.
...@@ -109,11 +128,13 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive ...@@ -109,11 +128,13 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive
[这些问题可能对你有帮助](./doc/QA_CN.md) [这些问题可能对你有帮助](./doc/QA_CN.md)
## 捐助 ## 捐助
开源不易,请作者喝杯咖啡。 开源不易,请作者喝杯咖啡。
<img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/wx.jpeg" height="300"> <img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/ali.jpeg" height="300"> <img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/wx.jpeg" height="300"> <img src="https://gitee.com/OpenFlutter/resoures-repository/raw/master/common/ali.jpeg" height="300">
## 关注公众号 ## 关注公众号
![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)
## 关注趋势 ## 关注趋势
...@@ -138,8 +159,3 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive ...@@ -138,8 +159,3 @@ fluwx.registerApi(appId: "wxd930ea5d5a228f5f",universalLink: "https://your.unive
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under License for the specific language governing permissions and limitations under
the License. the License.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论