Xcode 15 and Firebase - workaround in case of building error

this morning when i started my macbook it was doing an update of Xcode, from version 14 to 15 and my apps that use firebase (for the push notifications) stopped working.

There is something wrong with the current version of Cocoapods and they will fix in the next release, for now this is the workaround:

in your ios/App/Podfile modify as follows:

  # This is workaroud for CocoaPods blocker
  # @see https://github.com/CocoaPods/CocoaPods/pull/12009
  # This has to be removed after CocoaPods release fix
  installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        if config.base_configuration_reference
          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 }
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'

the error log says:

Error 'DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

1 Like

Thanks to you, I solved a difficult problem easily.
I wish you happiness.

1 Like

i’m glad it helped you!

have a nice day

CocoaPods 1.13.0 was released last Friday, so shouldn’t be needed anymore if you update.
Also Capacitor 5.4.1 was released last week with a similar fix.

I can confirm it works without workaround with the latest updates, thanks