flutter_unity_pod/UnityFramework.podspec
zj 72661fc8b6 还是改为只支持真机调试;
1.支持模拟器合并后framework到700+M,太大 下载不方便。
2.改为弱引用,模拟器也能跑,但是调试游戏 就需要真机。
2025-11-20 14:53:36 +08:00

51 lines
1.6 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Pod::Spec.new do |s|
s.name = 'UnityFramework'
s.version = '1.0.3'
s.summary = 'Unity iOS Framework for Flutter integration'
s.description = 'Unity iOS framework packaged as CocoaPod for Flutter projects.'
s.homepage = 'https://gitea.sdws.shop/xim/flutter_unity_pod'
s.license = { :type => 'MIT' }
s.author = { 'xim' => 'dev@local' }
# Git 仓库
s.source = { :git => 'https://gitea.sdws.shop/xim/flutter_unity_pod.git', :tag => s.version.to_s }
# iOS 13 起
s.platform = :ios, '13.0'
# UnityFramework.framework注意路径包含 UnityLibrary
s.vendored_frameworks = 'UnityLibrary/UnityFramework.xcframework'
# 保留所有符号
s.preserve_paths = [
'UnityLibrary/UnityFramework.xcframework'
]
# 链接依赖
s.frameworks = [
'ARKit', 'AVFoundation', 'AudioToolbox', 'CoreGraphics',
'CoreMedia', 'CoreMotion', 'CoreVideo', 'GameController',
'Metal', 'OpenGLES', 'QuartzCore', 'UIKit', 'WebKit',
'Security', 'MobileCoreServices'
]
s.libraries = 'z', 'c++'
# 允许非模块化头
s.pod_target_xcconfig = {
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
'ENABLE_BITCODE' => 'NO'
}
# 配置弱链接让UnityFramework变成可选的
# 这样在不支持的架构如模拟器App也能正常启动
# 只在实际调用Unity功能时才检查framework是否可用
s.user_target_xcconfig = {
'OTHER_LDFLAGS' => '$(inherited) -weak_framework UnityFramework'
}
# 仅支持真机:
# - 真机arm64
# - 模拟器:不支持(弱链接,运行时检查)
end