提交 65747661 编写于 作者: DCloud_iOS_WZT's avatar DCloud_iOS_WZT

支付模块 新增自动写入配置脚本

上级 5bae29e1
#!/bin/bash
add_large_files_to_lfs() {
local directory="$1"
for file in "$directory"/*; do
if [ -f "$file" ]; then
file_size=$(stat -f %z "$file")
if [ "$file_size" -gt $((5 * 1024 * 1024)) ]; then
git lfs track "$file"
fi
elif [ -d "$file" ]; then
add_large_files_to_lfs "$file" # 递归调用,继续查找子目录
fi
done
}
directory_path="UniMPSDK"
# 添加大文件到 Git LFS
add_large_files_to_lfs "$directory_path"
...@@ -65,6 +65,36 @@ target 'HelloUniMPDemo' do ...@@ -65,6 +65,36 @@ target 'HelloUniMPDemo' do
# pod 'FBSDKLoginKit','16.2.1' ##使用Oauth-Facebook 时需添加该库 # pod 'FBSDKLoginKit','16.2.1' ##使用Oauth-Facebook 时需添加该库
# pod 'Stripe','23.18.2' ##使用Payment-Stripe 时需添加该库 # pod 'Stripe','23.18.2' ##使用Payment-Stripe 时需添加该库
# pod 'PayPalCheckout','1.2.0' ##使用Payment-Paypal 时需添加该库 # pod 'PayPalCheckout','1.2.0' ##使用Payment-Paypal 时需添加该库
# 如果添加了支付模块 请添加如下脚本
# post_install do |installer|
# project_root = installer.sandbox.root
# featurePlist_PATH = File.join(project_root, 'unimp/UniMPSDK/Core/Resources/PandoraApi.bundle/feature.plist')
# spec_names = {
# 'unimp/Payment-IAP' => 'Add :Payment:extend:appleiap string PGPlatbyIAP',
# 'unimp/Payment-AliPay' => 'Add :Payment:extend:alix string PGAlixPay',
# 'unimp/Payment-Wechat' => 'Add :Payment:extend:weixin string PGWXPay',
# 'unimp/Payment-Stripe' => 'Add :Payment:extend:stripe string PGStripePay',
# 'unimp/Payment-Paypal' => 'Add :Payment:extend:paypal string PGPaypalPay'
# }
# has_specs = Hash.new(false)
# installer.pod_targets.each do |target|
# if target.name == 'unimp'
# target.specs.each do |spec|
# has_specs[spec.name] = true if spec_names.key?(spec.name)
# end
# end
# end
# has_specs.each do |spec_name, has|
# if has == true
# str = spec_names[spec_name]
# system("/usr/libexec/PlistBuddy -c '#{str}' #{featurePlist_PATH}")
# end
# end
# end
end end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册