提交 dd167c00 authored 作者: JarvanMo's avatar JarvanMo

update iOS setup

上级 c40981c1
......@@ -29,7 +29,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
fluwx: 143bf1458e1a46493eb0bc18deb1ee90037f4c30
fluwx: f608fff0e3a8c30199b626fed590d83cdd820a52
integration_test: 13825b8a9334a850581300559b8839134b124670
OpenWeChatSDKNoPay: 59a9628a746352bb400329cb7f12e6dc7096bf6e
......
......@@ -10,6 +10,8 @@
<string>Fluwx</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleGetInfoString</key>
<string/>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
......@@ -38,10 +40,13 @@
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationCategoryType</key>
<string/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
<string>weixinURLParamsAPI</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
......
......@@ -16,9 +16,9 @@ calling_dir = File.dirname(__FILE__)
project_dir = calling_dir.slice(0..(calling_dir.index('/.symlinks')))
flutter_project_dir = calling_dir.slice(0..(calling_dir.index('/ios/.symlinks')))
cfg = YAML.load_file(File.join(flutter_project_dir, 'pubspec.yaml'))
debug_logging = '0'
debug_logging = false
if cfg['fluwx'] && cfg['fluwx']['debug_logging'] == true
debug_logging = '1'
debug_logging = true
end
if cfg['fluwx'] && cfg['fluwx']['ios'] && cfg['fluwx']['ios']['no_pay'] == true
......@@ -53,23 +53,31 @@ The capability of implementing WeChat SDKs in Flutter. With Fluwx, developers ca
s.default_subspec = fluwx_subspec
pod_target_xcconfig = {
'OTHER_LDFLAGS' => '$(inherited) -ObjC -all_load'
}
s.subspec 'pay' do |sp|
sp.dependency 'WechatOpenSDK-XCFramework','~> 2.0.2'
sp.pod_target_xcconfig = {
'OTHER_LDFLAGS' => '$(inherited) -ObjC -all_load',
"GCC_PREPROCESSOR_DEFINITIONS_Debug" => "$(inherited) WECHAT_LOGGING=#{debug_logging}"
}
if debug_logging
pod_target_xcconfig["GCC_PREPROCESSOR_DEFINITIONS"] = '$(inherited) WECHAT_LOGGING=1'
else
pod_target_xcconfig["GCC_PREPROCESSOR_DEFINITIONS"] = '$(inherited) WECHAT_LOGGING=0'
end
sp.pod_target_xcconfig = pod_target_xcconfig
end
s.subspec 'no_pay' do |sp|
sp.dependency 'OpenWeChatSDKNoPay','~> 2.0.2+1'
sp.frameworks = 'CoreGraphics', 'Security', 'WebKit'
sp.libraries = 'c++', 'z', 'sqlite3.0'
sp.pod_target_xcconfig = {
'OTHER_LDFLAGS' => '$(inherited) -ObjC -all_load',
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) NO_PAY=1',
"GCC_PREPROCESSOR_DEFINITIONS_Debug" => "$(inherited) WECHAT_LOGGING=#{debug_logging}"
}
if debug_logging
pod_target_xcconfig["GCC_PREPROCESSOR_DEFINITIONS"] = '$(inherited) NO_PAY=1 WECHAT_LOGGING=1'
else
pod_target_xcconfig["GCC_PREPROCESSOR_DEFINITIONS"] = '$(inherited) NO_PAY=1 WECHAT_LOGGING=0'
end
sp.pod_target_xcconfig = pod_target_xcconfig
end
# Flutter.framework does not contain a i386 slice.
......
......@@ -92,7 +92,7 @@ project.targets.each do |target|
queriesSchemes = []
result["LSApplicationQueriesSchemes"] = queriesSchemes
end
wechatQueriesSchemes = ["weixin", "weixinULAPI"]
wechatQueriesSchemes = ["weixin", "weixinULAPI", "weixinURLParamsAPI"]
if wechatQueriesSchemes.any? { |queriesScheme| !(queriesSchemes.include? queriesScheme) }
wechatQueriesSchemes.each do |queriesScheme|
if !(queriesSchemes.include? queriesScheme)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论