Skip to content

Commit

Permalink
Read deployment target from xcconfig in Podfile
Browse files Browse the repository at this point in the history
This way, we have one less place to change when bumping the iOS version.
  • Loading branch information
mokagio committed Jun 5, 2023
1 parent 01df04e commit 3447696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
ZIPFoundation: ae5b4b813d216d3bf0a148773267fff14bd51d37

PODFILE CHECKSUM: 8f3801df87501615cc7418c5a128cd9136848813
PODFILE CHECKSUM: 426583a8ff5caa0841987b35183c76d4759de053

COCOAPODS: 1.11.3

0 comments on commit 3447696

Please sign in to comment.