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

update iOS setup

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