46 lines
1.7 KiB
Ruby
46 lines
1.7 KiB
Ruby
Pod::Spec.new do |s|
|
||
s.name = 'UnityFramework'
|
||
s.version = '1.0.8'
|
||
s.summary = 'Unity iOS Framework for Flutter integration (XCFramework with simulator support)'
|
||
s.description = 'Unity iOS framework packaged as XCFramework for Flutter projects. Includes simulator support for development.'
|
||
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.xcframework(支持真机和模拟器)
|
||
s.vendored_frameworks = 'UnityLibrary/UnityFramework.xcframework'
|
||
|
||
# 明确保留 Unity Data 目录和所有资源文件
|
||
# 这对于从 git 安装时保持框架完整性至关重要
|
||
s.preserve_paths = [
|
||
'UnityLibrary/UnityFramework.xcframework/**/*',
|
||
'UnityLibrary/UnityFramework.xcframework/ios-arm64/UnityFramework.framework/Data/**/*'
|
||
]
|
||
|
||
# 链接依赖
|
||
s.frameworks = [
|
||
'ARKit', 'AVFoundation', 'AudioToolbox', 'CoreGraphics',
|
||
'CoreMedia', 'CoreMotion', 'CoreVideo', 'GameController',
|
||
'Metal', 'OpenGLES', 'QuartzCore', 'UIKit', 'WebKit',
|
||
'Security', 'MobileCoreServices'
|
||
]
|
||
|
||
s.libraries = 'z', 'c++'
|
||
|
||
# XCFramework 会自动处理不同平台的架构和链接,无需额外配置
|
||
s.pod_target_xcconfig = {
|
||
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
|
||
'ENABLE_BITCODE' => 'NO'
|
||
}
|
||
|
||
# 支持架构说明:
|
||
# - 真机:arm64(完整 Unity 运行时)
|
||
# - 模拟器:arm64, x86_64(空壳实现,用于开发调试)
|
||
end
|