From ce3988436c38d17eef0da720db5f8baeb395d36b Mon Sep 17 00:00:00 2001 From: sylar Date: Fri, 13 Dec 2024 20:13:02 +0800 Subject: [PATCH] feat: test with 'use_frameworks! :linkage => :static' and force agora sdk compile to dynamic framework --- example/ios/Podfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/example/ios/Podfile b/example/ios/Podfile index 070fb68e2..9e751bf2f 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -28,7 +28,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup target 'Runner' do - use_frameworks! + use_frameworks! :linkage => :static use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) @@ -40,6 +40,19 @@ target 'Runner' do end end +dynamic_frameworks = ['agora_rtc_engine', 'iris_method_channel'] +pre_install do |installer| + Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} + installer.pod_targets.each do |target| + if dynamic_frameworks.include? target.name + puts "install dynamic framework : #{target.name}" + def target.build_type + Pod::BuildType.dynamic_framework + end + end + end +end + post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target)