flutter_unity_pod/UnityFramework.podspec
2025-11-25 10:15:55 +08:00

50 lines
1.8 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.5'
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仅真机
# 不使用vendored_frameworks手动配置framework路径以支持条件编译
s.preserve_paths = 'UnityLibrary/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'
}
# 弱链接配置只在真机上链接UnityFramework模拟器完全不链接
s.user_target_xcconfig = {
# 仅在真机上添加framework搜索路径
'FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]' => '$(inherited) ${PODS_ROOT}/UnityFramework/UnityLibrary',
'FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]' => '$(inherited)',
# 仅在真机上弱链接UnityFramework
'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -weak_framework UnityFramework',
'OTHER_LDFLAGS[sdk=iphonesimulator*]' => '$(inherited)'
}
# 仅支持真机:
# - 真机arm64
# - 模拟器:不支持(弱链接,运行时检查)
end