mirror of
https://github.com/stablyai/orca.git
synced 2026-11-14 18:07:45 +00:00
Carries over #33221 and #33210. Replaces our #34484 Duo support with the community design, on top of main's rebuilt terminal key bar (#36166). Fixes #33200 Co-authored-by: Takeshi Matsumoto <zytakeshi520@gmail.com> Co-authored-by: Lars Keggenhoff <lars@kghf.io>
34 lines
1.4 KiB
JavaScript
34 lines
1.4 KiB
JavaScript
const { withPodfile } = require('expo/config-plugins')
|
||
|
||
// Why: Xcode 27 rejects deployment targets below iOS 15.0, and some pods (and their
|
||
// resource-bundle targets) still declare 9.0–13.4, which fails the build. The iOS 27 SDK
|
||
// is what lets the app resize on iPhone Duo, so raise those targets to the app's own.
|
||
const DEPLOYMENT_TARGET_FLOOR = '15.1'
|
||
const MARKER = '# orca: pod deployment target floor'
|
||
const POST_INSTALL = 'post_install do |installer|'
|
||
|
||
const FLOOR_SNIPPET = `
|
||
${MARKER}
|
||
installer.pods_project.targets.each do |target|
|
||
target.build_configurations.each do |build_config|
|
||
target_version = build_config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
|
||
if target_version && Gem::Version.new(target_version) < Gem::Version.new('${DEPLOYMENT_TARGET_FLOOR}')
|
||
build_config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${DEPLOYMENT_TARGET_FLOOR}'
|
||
end
|
||
end
|
||
end`
|
||
|
||
module.exports = function withIosPodDeploymentTargetFloor(config) {
|
||
return withPodfile(config, (cfg) => {
|
||
const podfile = cfg.modResults.contents
|
||
if (podfile.includes(MARKER)) {
|
||
return cfg
|
||
}
|
||
if (!podfile.includes(POST_INSTALL)) {
|
||
throw new Error('ios-pod-deployment-target-floor: Podfile has no post_install hook')
|
||
}
|
||
cfg.modResults.contents = podfile.replace(POST_INSTALL, `${POST_INSTALL}${FLOOR_SNIPPET}`)
|
||
return cfg
|
||
})
|
||
}
|