flutter_unity_pod/UnityLibrary/UnityFramework.podspec
zj f52c50dd8e feat: add UnityFramework pod library
- Add UnityFramework.framework with iOS 13.0+ support
- Configure podspec with proper dependencies and xcconfig
- Add EXCLUDED_ARCHS for simulator compatibility
- Include all Unity data and resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 09:50:53 +08:00

56 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.0'
s.summary = 'Local Unity iOS Framework'
s.description = 'Local development pod for Unity iOS export.'
s.homepage = 'http://localhost'
s.license = { :type => 'MIT' }
s.author = { 'dev' => 'dev@local' }
# Unity iOS 工程路径
s.source = { :path => '.' }
# iOS 13 起
s.platform = :ios, '13.0'
# UnityFramework.framework
s.vendored_frameworks = 'UnityFramework.framework'
# 注意Data 在 framework 内部,会自动包含
# 如需额外资源可在此添加
# 保留所有符号
s.preserve_paths = [
'UnityFramework.framework'
]
# 链接依赖
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',
# 模拟器排除 arm64当 framework 不包含模拟器架构时)
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
}
s.user_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
}
# 如需同时支持真机和模拟器,请:
# 1. 从 Unity 导出模拟器版本的 framework
# 2. 使用 lipo 合并:
# lipo -create Device/UnityFramework Simulator/UnityFramework -output UnityFramework
# 3. 然后移除上面的 EXCLUDED_ARCHS 配置
end