Files
xianyan/macos/Podfile
22 7ea4a068a1 feat(macos+flutter): 新增 Impeller 渲染引擎开关与 Intel Mac 渲染兼容修复
本次提交包含以下核心变更:
1. 修复 RawKeyboard 断言错误,添加 HardwareKeyboard 事件处理器
2. 实现 Intel Mac 自动降级玻璃渲染质量,避免黑屏闪烁
3. 新增 macOS 端 Impeller 渲染引擎开关设置,支持动态切换
4. 修复 macOS 双标题栏问题,隐藏系统原生交通灯按钮
5. 更新多语言国际化支持,新增 Impeller 相关翻译
6. 优化 WebRTC 依赖下载,使用国内镜像避免超时
2026-06-25 08:44:00 +08:00

53 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.
platform :osx, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_macos_podfile_setup
target 'Runner' do
use_frameworks!
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
# WebRTC-SDK 通过国内镜像下载,避免 github.com 连接超时
pod 'WebRTC-SDK', :podspec => 'WebRTC-SDK.podspec.json'
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
# 统一设置 macOS 部署目标版本,解决 Xcode 不支持低于 12.0 的问题
# record_macos 等包需要 macOS 13.0+ API统一设为 13.0
target.build_configurations.each do |config|
if config.build_settings['MACOSX_DEPLOYMENT_TARGET'].to_f < 13.0
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end