Skip to content

Commit

Permalink
fix(ios-template): added workaround for Cocoapods bug in XC15 (#6847)
Browse files Browse the repository at this point in the history
  • Loading branch information
markemer authored and jcesarmobile committed Sep 20, 2023
1 parent b5b0398 commit 99ca3f2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ios-template/App/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'

# workaround for Xcode 15 and Cocoapods 1.21.1
# Should not be needed after Cocoapods 1.13.0
def fixToolChainDirectory(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end

platform :ios, '13.0'
use_frameworks!

Expand All @@ -20,4 +33,5 @@ end

post_install do |installer|
assertDeploymentTarget(installer)
fixToolChainDirectory(installer)
end

0 comments on commit 99ca3f2

Please sign in to comment.