From 34476967fab5c7fadecd1bde6f441950226c3024 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 2 Jun 2023 14:35:35 +1000 Subject: [PATCH] Read deployment target from `xcconfig` in `Podfile` This way, we have one less place to change when bumping the iOS version. --- Podfile | 3 ++- Podfile.lock | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Podfile b/Podfile index 07988c318684..961f40631c8c 100644 --- a/Podfile +++ b/Podfile @@ -1,6 +1,7 @@ # frozen_string_literal: true require_relative './Gutenberg/cocoapods_helpers' +require 'xcodeproj' # For security reasons, please always keep the wordpress-mobile source first and the CDN second. # For more info, see https://github.com/wordpress-mobile/cocoapods-specs#source-order-and-security-considerations @@ -13,7 +14,7 @@ raise 'Please run CocoaPods via `bundle exec`' unless %w[BUNDLE_BIN_PATH BUNDLE_ inhibit_all_warnings! use_frameworks! -app_ios_deployment_target = Gem::Version.new('13.0') +app_ios_deployment_target = Gem::Version.new(Xcodeproj::Config.new(File.new('./config/Common.xcconfig')).to_hash['IPHONEOS_DEPLOYMENT_TARGET']) platform :ios, app_ios_deployment_target.version workspace 'WordPress.xcworkspace' diff --git a/Podfile.lock b/Podfile.lock index 10d06663e679..d49a3e89323a 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -900,6 +900,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba ZIPFoundation: ae5b4b813d216d3bf0a148773267fff14bd51d37 -PODFILE CHECKSUM: 8f3801df87501615cc7418c5a128cd9136848813 +PODFILE CHECKSUM: 426583a8ff5caa0841987b35183c76d4759de053 COCOAPODS: 1.11.3