Skip to content

Commit e91670f

Browse files
authored
🚀 [iOS] Default to pay (#107)
1 parent e562aa2 commit e91670f

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ iOS 9系统策略更新,限制了http协议的访问,此外应用需要在
6969
```plist
7070
<key>LSApplicationQueriesSchemes</key>
7171
<array>
72-
<string>weixin</string>
73-
<string>weixinULAPI</string>
72+
<string>weixin</string>
73+
<string>weixinULAPI</string>
7474
</array>
7575
<key>NSAppTransportSecurity</key>
7676
<dict>
77-
<key>NSAllowsArbitraryLoads</key>
78-
<true/>
77+
<key>NSAllowsArbitraryLoads</key>
78+
<true/>
7979
</dict>
8080
```
8181

@@ -94,12 +94,10 @@ dependencies:
9494
wechat_kit: ^${latestTag}
9595
```
9696

97-
使用包含 iOS 支付
97+
若需要不包含支付的 iOS SDK,请修改项目下的 `ios/Podfile`
9898

99-
```
100-
# 参考 https://github.com/RxReader/wechat_kit/blob/master/example/ios/Podfile
101-
# 默认 no_pay
102-
$WechatKitSubspec = 'pay'
99+
```diff
100+
+ $WechatKitSubspec = 'no_pay'
103101
```
104102

105103
* snapshot

example/ios/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
2727

2828
flutter_ios_podfile_setup
2929

30-
# 默认 no_pay
31-
$WechatKitSubspec = 'pay'
30+
# 默认 pay
31+
# $WechatKitSubspec = 'no_pay'
3232

3333
target 'Runner' do
3434
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

ios/wechat_kit.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
if defined?($WechatKitSubspec)
77
wechat_kit_subspec = $WechatKitSubspec
88
else
9-
wechat_kit_subspec = 'no_pay'
9+
wechat_kit_subspec = 'pay'
1010
end
1111

1212
Pod::Spec.new do |s|
1313
s.name = 'wechat_kit'
1414
s.version = '3.2.0'
15-
s.summary = 'WeChat SDKs as Flutter plugin.'
15+
s.summary = 'The Flutter plugin for WeChat SDKs.'
1616
s.description = <<-DESC
17-
A powerful Flutter plugin allowing developers to auth/share/pay with natvie Android & iOS WeChat SDKs.
17+
A powerful Flutter plugin allowing developers to auth/pay/share with native Android & iOS WeChat SDKs.
1818
DESC
1919
s.homepage = 'https://github.com/RxReader/wechat_kit'
2020
s.license = { :file => '../LICENSE' }

lib/src/wechat.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,13 @@ class Wechat {
636636
);
637637
}
638638

639-
/// 支付 - 不含「iOS 支付」调用会直接抛出异常 No implementation [MissingPluginException]
639+
/// 支付
640+
///
640641
/// 参数说明:https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_12&index=2
641642
///
642-
/// # 默认 no_pay,参考 https://github.com/RxReader/wechat_kit/blob/master/example/ios/Podfile
643-
/// $WechatKitSubspec = 'pay'
643+
/// * 默认包含支付,参考 https://github.com/RxReader/wechat_kit/blob/master/example/ios/Podfile
644+
/// 修改 `$WechatKitSubspec = 'no_pay'` 可切换为不包含支付。
645+
/// * 不含「iOS 支付」调用会抛出 [MissingPluginException]
644646
Future<void> pay({
645647
required String appId,
646648
required String partnerId,

0 commit comments

Comments
 (0)