Closed craigdfoster closed 10 months ago
Add this to your podfile, I saw this on a different post
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
# to resolve `Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead`
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
end
end
Legend!
Thanks Hunter.
We are just repackaging things here for the most part, I do not believe this is anything we can actually fix in this repository? Going to close as I do not think it is actionable - that workaround is fantastic though, always amazed at what you can fix on-the-go with a Podfile hack...
I have a previously stable build of a flutter macos app no longer compiling after what appears to have been an automatic Xcode update to version 15. (Grrr!)
The build output has four problems:
error: DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead (in target 'Firebase' from project 'Pods')
warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 14.0.99. (in target 'PromisesObjC' from project 'Pods') ...then a repeat of this warning for targets 'nanopb' and 'GoogleUtilities'
It's impossible to change DT_TOOLCHAIN_DIR because it only occurs in generated xcconfig files in the Pods directory. Even if I do change it flutter run will overwrite
I was working on Firestore 10.12.0. I've tried upgrading to 10.15.0. Same issue.
There's also a flood of other warnings that look like below - but I'm not certain they're related to Firestore as the above must be.
2023-09-20 16:36:57.744 xcodebuild[46339:4502861] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22267/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103 Details: createItemModels creation requirements should not create capability item model for a capability item model that already exists. Function: createItemModels(for:itemModelSource:) Thread: <_NSMainThread: 0x14d60bda0>{number = 1, name = main} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.