合并 iOS-NoPay

This commit is contained in:
v7lin
2022-04-20 15:16:13 +08:00
parent 6b9aa842ca
commit e562aa297e
7 changed files with 44 additions and 16 deletions

View File

@ -1,3 +1,7 @@
## 3.2.0
* pay no_pay
## 3.1.0
* Android SDK

View File

@ -94,12 +94,12 @@ dependencies:
wechat_kit: ^${latestTag}
```
使 iOS
使 iOS
```
dependencies:
# ^
wechat_kit: ${latestTag}-iOS-NoPay
# https://github.com/RxReader/wechat_kit/blob/master/example/ios/Podfile
# no_pay
$WechatKitSubspec = 'pay'
```
* snapshot

View File

@ -1,5 +1,5 @@
group 'io.github.v7lin.wechat_kit'
version '3.1.0'
version '3.2.0'
buildscript {
repositories {

View File

@ -27,6 +27,9 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup
# no_pay
$WechatKitSubspec = 'pay'
target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

View File

@ -2,9 +2,16 @@
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint wechat_kit.podspec' to validate before publishing.
#
if defined?($WechatKitSubspec)
wechat_kit_subspec = $WechatKitSubspec
else
wechat_kit_subspec = 'no_pay'
end
Pod::Spec.new do |s|
s.name = 'wechat_kit'
s.version = '3.1.0'
s.version = '3.2.0'
s.summary = 'WeChat SDKs as Flutter plugin.'
s.description = <<-DESC
A powerful Flutter plugin allowing developers to auth/share/pay with natvie Android & iOS WeChat SDKs.
@ -19,18 +26,29 @@ A powerful Flutter plugin allowing developers to auth/share/pay with natvie Andr
s.platform = :ios, '8.0'
s.static_framework = true
s.subspec 'vendor' do |sp|
# sp.source_files = 'Libraries/OpenSDK1.9.2/*.h' # For regular pay
# sp.public_header_files = 'Libraries/OpenSDK1.9.2/*.h' # For regular pay
# sp.vendored_libraries = 'Libraries/OpenSDK1.9.2/*.a' # For regular pay
sp.source_files = 'Libraries/OpenSDK1.9.2_NoPay/*.h' # For NoPay
sp.public_header_files = 'Libraries/OpenSDK1.9.2_NoPay/*.h' # For NoPay
sp.vendored_libraries = 'Libraries/OpenSDK1.9.2_NoPay/*.a' # For NoPay
# s.default_subspecs = :none
s.default_subspec = wechat_kit_subspec
s.subspec 'pay' do |sp|
sp.source_files = 'Libraries/OpenSDK1.9.2/*.h'
sp.public_header_files = 'Libraries/OpenSDK1.9.2/*.h'
sp.vendored_libraries = 'Libraries/OpenSDK1.9.2/*.a'
sp.frameworks = 'CoreGraphics', 'Security', 'WebKit'
sp.libraries = 'c++', 'z', 'sqlite3.0'
sp.pod_target_xcconfig = {
'OTHER_LDFLAGS' => '$(inherited) -ObjC -all_load',
'GCC_PREPROCESSOR_DEFINITIONS' => 'NO_PAY=1' # For NoPay
}
end
s.subspec 'no_pay' do |sp|
sp.source_files = 'Libraries/OpenSDK1.9.2_NoPay/*.h'
sp.public_header_files = 'Libraries/OpenSDK1.9.2_NoPay/*.h'
sp.vendored_libraries = 'Libraries/OpenSDK1.9.2_NoPay/*.a'
sp.frameworks = 'CoreGraphics', 'Security', 'WebKit'
sp.libraries = 'c++', 'z', 'sqlite3.0'
sp.pod_target_xcconfig = {
'OTHER_LDFLAGS' => '$(inherited) -ObjC -all_load',
'GCC_PREPROCESSOR_DEFINITIONS' => 'NO_PAY=1'
}
end

View File

@ -636,8 +636,11 @@ class Wechat {
);
}
/// 支付 - x.y.z-iOS-NoPay 版本下 iOS 调用会直接抛出异常 No implementation [MissingPluginException]
/// 支付 - 不含「iOS 支付」调用会直接抛出异常 No implementation [MissingPluginException]
/// 参数说明https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_12&index=2
///
/// # 默认 no_pay参考 https://github.com/RxReader/wechat_kit/blob/master/example/ios/Podfile
/// $WechatKitSubspec = 'pay'
Future<void> pay({
required String appId,
required String partnerId,

View File

@ -1,6 +1,6 @@
name: wechat_kit
description: A powerful Flutter plugin allowing developers to auth/share/pay with natvie Android & iOS Wechat SDKs.
version: 3.1.0
version: 3.2.0
# author: v7lin <v7lin@qq.com>
homepage: https://github.com/rxreader/wechat_kit