Files
buzz/mobile/ios/Podfile
Wes 321bf3717b fix(ios): accept Xcode 27 pod targets and DeviceHub
Xcode 27 rejects deployment targets below iOS 15, and several pods and
their resource bundles still declare 9.0 to 13.0. Raise any pod target
below the app's iOS 16.0 minimum to 16.0 in post_install.

`just mobile-dev` also failed immediately because Xcode 27 replaced
Simulator.app with DeviceHub.app; accept either.

Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
2026-10-14 15:00:13 -07:00

60 lines
2.2 KiB
Ruby

ios_deployment_target = '16.0'
platform :ios, ios_deployment_target
# 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', '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 Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
minimum_ios_version = Gem::Version.new(ios_deployment_target)
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# Pods and their resource bundles can retain older podspec deployment
# targets that newer Xcode versions no longer support.
target.build_configurations.each do |config|
deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
if deployment_target.nil? || Gem::Version.new(deployment_target) < minimum_ios_version
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = ios_deployment_target
end
end
end
# Flutter creates plugin symlinks during installation, so load the upstream
# helper here rather than requiring an existing Pods install at parse time.
require File.expand_path(
'.symlinks/plugins/google_mlkit_commons/ios/scripts/apple_silicon_simulator',
__dir__,
)
mlkit_apple_silicon_simulator_patch(installer)
end