Automated deployment: Sat Aug 1 10:47:29 UTC 2020 5c08435f9c
This commit is contained in:
11
apple-app-site-association
Normal file
11
apple-app-site-association
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"applinks": {
|
||||
"apps": [],
|
||||
"details": [
|
||||
{
|
||||
"appID": "Team ID.com.uiwjs.XXX",
|
||||
"paths": ["/react-native-wechat/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
2679
assets/css/main.css
Normal file
2679
assets/css/main.css
Normal file
File diff suppressed because it is too large
Load Diff
BIN
assets/images/icons.png
Normal file
BIN
assets/images/icons.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
BIN
assets/images/icons@2x.png
Normal file
BIN
assets/images/icons@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
assets/images/widgets.png
Normal file
BIN
assets/images/widgets.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 480 B |
BIN
assets/images/widgets@2x.png
Normal file
BIN
assets/images/widgets@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 855 B |
1
assets/js/main.js
Normal file
1
assets/js/main.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/search.json
Normal file
1
assets/js/search.json
Normal file
@@ -0,0 +1 @@
|
||||
{"kinds":{"64":"Function"},"rows":[{"id":0,"kind":64,"name":"registerApp","url":"globals.html#registerapp","classes":"tsd-kind-function"}],"index":{"version":"2.3.8","fields":["name","parent"],"fieldVectors":[["name/0",[0,2.877]],["parent/0",[]]],"invertedIndex":[["registerapp",{"_index":0,"name":{"0":{}},"parent":{}}]],"pipeline":[]}}
|
149
globals.html
Normal file
149
globals.html
Normal file
@@ -0,0 +1,149 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>React Native Wechat</title>
|
||||
<meta name="description" content="Documentation for React Native Wechat">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="index.html" class="title">React Native Wechat</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="globals.html">Globals</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>React Native Wechat</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Functions</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-function"><a href="globals.html#registerapp" class="tsd-kind-icon">register<wbr>App</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Functions</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function">
|
||||
<a name="registerapp" class="tsd-anchor"></a>
|
||||
<h3>register<wbr>App</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function">
|
||||
<li class="tsd-signature tsd-kind-icon">register<wbr>App<span class="tsd-signature-symbol">(</span>appid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, universalLink<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in <a href="https://github.com/uiwjs/react-native-wechat/blob/5c08435/index.d.ts#L7">index.d.ts:7</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>向微信注册应用</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>appid: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>通过微信开放平台,<a href="https://open.weixin.qq.com/">获取appid</a></p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>universalLink: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Universal Link(通用链接)是苹果在 iOS9 推出的,一种能够方便的通过传统 HTTPS 链接来启动 APP 的功能,可以使用相同的网址打开网址和 APP。</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals current ">
|
||||
<a href="globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#registerapp" class="tsd-kind-icon">register<wbr>App</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
165
index.html
Normal file
165
index.html
Normal file
@@ -0,0 +1,165 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>React Native Wechat</title>
|
||||
<meta name="description" content="Documentation for React Native Wechat">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="index.html" class="title">React Native Wechat</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="globals.html">Globals</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>React Native Wechat</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<div class="tsd-panel tsd-typography">
|
||||
<a href="#uiwreact-native-wechat" id="uiwreact-native-wechat" style="color: inherit; text-decoration: none;">
|
||||
<h2>@uiw/react-native-wechat</h2>
|
||||
</a>
|
||||
<p>React Native 包使用微信分享、登录、收藏、支付等功能。</p>
|
||||
<a href="#注意事项" id="注意事项" style="color: inherit; text-decoration: none;">
|
||||
<h2>注意事项</h2>
|
||||
</a>
|
||||
<details>
|
||||
<summary>iOS: 微信授权登录 Universal Link(通用链接)</summary>
|
||||
<blockquote>
|
||||
<p>Universal Link(通用链接)是苹果在 iOS9 推出的,一种能够方便的通过传统 HTTPS 链接来启动 APP 的功能,可以使用相同的网址打开网址和 APP。<br>看起来就是一条普通的 https 链接,当然是我们在该链接域名根目录配置过的一个链接,也可以在该链接中放置对应的H5页面。当用户的点击该链接,只要手机中安装了支持该链接的 APP 就会直接进入到 APP 中。如果没有安装APP则会跳转到 Safari 浏览器中,展示 H5 页面。对用户来说则是一个无缝跳转的过程。 </p>
|
||||
</blockquote>
|
||||
<p>创建一个名为 <code>apple-app-site-association</code> 的文件,如下:</p>
|
||||
<pre><code class="language-json">{
|
||||
<span class="hljs-attr">"applinks"</span>: {
|
||||
<span class="hljs-attr">"apps"</span>: [],
|
||||
<span class="hljs-attr">"details"</span>: [
|
||||
{
|
||||
<span class="hljs-attr">"appID"</span>: <span class="hljs-string">"Team ID.com.uiwjs.XXX"</span>,
|
||||
<span class="hljs-attr">"paths"</span>: [<span class="hljs-string">"/uiwjs/*"</span>]
|
||||
},
|
||||
{
|
||||
<span class="hljs-attr">"appID"</span>: <span class="hljs-string">"Team ID.com.uiwjs.XXX"</span>,
|
||||
<span class="hljs-attr">"paths"</span>: [<span class="hljs-string">"/uiwjstest/*"</span>]
|
||||
}
|
||||
]
|
||||
}
|
||||
}</code></pre>
|
||||
<p>上传该文件到你的域名所对应的<code>根目录</code>或<code>xxx目录</code>下,<code>apple-app-site-association</code> 文件不需要扩展名。</p>
|
||||
<p><strong>注意:</strong> 苹果提供了一个<a href="https://search.developer.apple.com/appsearch-validation-tool/">网页来验证</a>我们编写的这个 <a href="https://search.developer.apple.com/appsearch-validation-tool/">apple-app-site-association</a> 是否合法有效。</p>
|
||||
<pre><code>根目录
|
||||
https:<span class="hljs-regexp">//ui</span>wjs.github.io/apple-app-site-association
|
||||
|
||||
xxx目录
|
||||
https:<span class="hljs-regexp">//ui</span>wjs.github.io<span class="hljs-regexp">/react-native-wechat/</span>apple-app-site-association</code></pre></details>
|
||||
<a href="#安装依赖" id="安装依赖" style="color: inherit; text-decoration: none;">
|
||||
<h2>安装依赖</h2>
|
||||
</a>
|
||||
<pre><code class="language-bash">yarn add @uiw/react-native-alipay
|
||||
<span class="hljs-comment"># react-native version >= 0.60+</span>
|
||||
$ <span class="hljs-built_in">cd</span> ios && pod install</code></pre>
|
||||
<a href="#使用" id="使用" style="color: inherit; text-decoration: none;">
|
||||
<h2>使用</h2>
|
||||
</a>
|
||||
<pre><code class="language-js"><span class="hljs-keyword">import</span> Wechat <span class="hljs-keyword">from</span> <span class="hljs-string">'@uiw/react-native-wechat'</span>;
|
||||
</code></pre>
|
||||
<a href="#开发" id="开发" style="color: inherit; text-decoration: none;">
|
||||
<h2>开发</h2>
|
||||
</a>
|
||||
<pre><code class="language-bash"><span class="hljs-built_in">cd</span> example <span class="hljs-comment"># 进入实例 example 工程,根目录不需要安装,会引发错误</span>
|
||||
yarn install <span class="hljs-comment"># 安装依赖</span>
|
||||
|
||||
<span class="hljs-built_in">cd</span> ios <span class="hljs-comment"># 进入 example/ios 目录安装依赖</span>
|
||||
pod instll <span class="hljs-comment"># 安装依赖</span></code></pre>
|
||||
<a href="#其它" id="其它" style="color: inherit; text-decoration: none;">
|
||||
<h2>其它</h2>
|
||||
</a>
|
||||
<p>当前工程基于 <a href="https://github.com/brodybits/create-react-native-module">@brodybits/create-react-native-module</a> 初始化。</p>
|
||||
<pre><code class="language-bash">npx create-react-native-module --package-identifier com.uiwjs.react.wechat --object-class-name RNWechat --generate-example Wechat --example-react-native-version 0.63.2 --module-name @uiw/react-native-wechat --github-account uiwjs --author-name <span class="hljs-string">"Kenny Wong"</span> --author-email <span class="hljs-string">"wowohoo@qq.com"</span></code></pre>
|
||||
<a href="#相关连接" id="相关连接" style="color: inherit; text-decoration: none;">
|
||||
<h2>相关连接</h2>
|
||||
</a>
|
||||
<ul>
|
||||
<li><a href="https://developers.weixin.qq.com/doc/oplatform/Downloads/iOS_Resource.html">微信(SDK):iOS SDK v1.8.7.1</a></li>
|
||||
<li><a href="https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html">微信(SDK):iOS 接入指南</a></li>
|
||||
<li><a href="https://github.com/uiwjs/react-native-alipay">@uiw/react-native-alipay</a> 支付宝支付。</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#registerapp" class="tsd-kind-icon">register<wbr>App</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user