From 9c2b1e616810274c0a9ad70de5cf13ac1bf28f04 Mon Sep 17 00:00:00 2001 From: renna <576157508@qq.com> Date: Thu, 15 May 2025 09:37:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9iOS=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=89=BE=E5=88=B0UnityLibrary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Podfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index 932c1da..5aa926c 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -32,8 +32,8 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) - # Unity集成 - 添加UnityLibrary作为子项目 - pod 'UnityLibrary', :path => 'UnityLibrary' + # 修改UnityLibrary的引用方式 + pod 'UnityLibrary', :path => File.join(File.dirname(File.realpath(__FILE__)), 'UnityLibrary') end post_install do |installer| @@ -50,7 +50,9 @@ post_install do |installer| # 为UnityFramework添加特殊设置 if target.name == 'UnityLibrary' config.build_settings['UNITY_RUNTIME_VERSION'] = '2021.3.33f1c1' - config.build_settings['UNITY_IOS_EXPORT_PATH'] = '${SRCROOT}/UnityLibrary' + config.build_settings['UNITY_IOS_EXPORT_PATH'] = '${PODS_ROOT}/UnityLibrary' + # 添加模块映射设置 + config.build_settings['DEFINES_MODULE'] = 'YES' end end end