From 10490f1bcd75193e0f01db9e110e3691ae258bd4 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 2 Oct 2024 10:24:14 +0200 Subject: [PATCH] chore(cli): Update minimum deployment target to 14.0 (#7681) --- cli/src/config.ts | 2 +- cli/src/ios/update.ts | 15 --------------- ios/scripts/pods_helpers.rb | 6 +++--- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/cli/src/config.ts b/cli/src/config.ts index ede4a3d6eb..212a032981 100644 --- a/cli/src/config.ts +++ b/cli/src/config.ts @@ -331,7 +331,7 @@ async function loadIOSConfig( return { name, - minVersion: '13.0', + minVersion: '14.0', platformDir, platformDirAbs, scheme, diff --git a/cli/src/ios/update.ts b/cli/src/ios/update.ts index 9037ea529e..7005de58ff 100644 --- a/cli/src/ios/update.ts +++ b/cli/src/ios/update.ts @@ -122,21 +122,6 @@ async function updatePodfile( /(require_relative)[\s\S]+?(@capacitor\/ios\/scripts\/pods_helpers')/, `require_relative '${relativeCapacitoriOSPath}/scripts/pods_helpers'`, ); - podfileContent = podfileContent.replace( - `def assertDeploymentTarget(installer) - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 13.0 - deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f - should_upgrade = deployment_target < 13.0 && deployment_target != 0.0 - if should_upgrade - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' - end - end - end -end`, - `require_relative '${relativeCapacitoriOSPath}/scripts/pods_helpers'`, - ); await writeFile(podfilePath, podfileContent, { encoding: 'utf-8' }); const podPath = await config.ios.podPath; diff --git a/ios/scripts/pods_helpers.rb b/ios/scripts/pods_helpers.rb index 7a9fa41f42..c99053a46d 100644 --- a/ios/scripts/pods_helpers.rb +++ b/ios/scripts/pods_helpers.rb @@ -1,11 +1,11 @@ def assertDeploymentTarget(installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 13.0 + # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 14.0 deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f - should_upgrade = deployment_target < 13.0 && deployment_target != 0.0 + should_upgrade = deployment_target < 14.0 && deployment_target != 0.0 if should_upgrade - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0' end end end