Skip to content

build_warnings

Extract and list all compiler warnings from the most recent Xcode build log. This tool parses the build output in derived data to surface warnings about deprecated APIs, type conversions, unused variables, and other issues the Swift or Clang compiler flags during compilation. Addressing these warnings improves code quality and prepares your project for future SDK changes.

ParameterTypeRequiredDefaultDescription
projectPathstringNoCurrent directoryAbsolute path to the .xcworkspace or .xcodeproj file
derivedDataPathstringNoXcode defaultAbsolute path to the derived data directory containing build logs

Check warnings for a project using default derived data

Section titled “Check warnings for a project using default derived data”

“Show me all build warnings for FitnessTracker”

{
"projectPath": "/Users/dev/Projects/FitnessTracker/FitnessTracker.xcodeproj"
}

“List build warnings using my custom derived data path”

{
"projectPath": "/Users/dev/Projects/FitnessTracker/FitnessTracker.xcodeproj",
"derivedDataPath": "/tmp/FitnessTracker-DerivedData"
}

“What warnings does my workspace build produce?”

{
"projectPath": "/Users/dev/Projects/FitnessTracker/FitnessTracker.xcworkspace"
}

“Show me the build warnings for the project in the current directory”

{}
Build Warnings for FitnessTracker:
/Users/dev/Projects/FitnessTracker/FitnessTracker/Services/HealthKitManager.swift:45:9:
warning: 'authorizationStatus(for:)' was deprecated in iOS 18.0: Use
statusForAuthorizationType(_:) instead
/Users/dev/Projects/FitnessTracker/FitnessTracker/ViewModels/WorkoutViewModel.swift:23:13:
warning: Variable 'tempResult' was written to, but never read
/Users/dev/Projects/FitnessTracker/FitnessTracker/Views/ActivityChartView.swift:67:28:
warning: Conversion from 'Int' to 'Double' may lose precision
/Users/dev/Projects/FitnessTracker/FitnessTracker/Models/LegacyDataStore.swift:12:1:
warning: 'NSKeyedUnarchiver.unarchiveObject(withFile:)' was deprecated in
iOS 12.0: Use +unarchivedObjectOfClass:fromData:error: instead
/Users/dev/Projects/FitnessTracker/FitnessTracker/Networking/APIEndpoints.swift:34:9:
warning: Result of call to 'append(_:)' is unused
Summary: 5 warnings across 5 files

When no warnings are found:

Build Warnings for FitnessTracker:
No warnings found in the most recent build. Clean build!
  • swiftlint_run — Check for style violations that the compiler does not catch
  • swiftlint_fix — Auto-fix code style issues alongside compiler warning resolution
  • xcode_build — Build the project first to generate the build log that this tool reads
  • swift_format_run — Check formatting after resolving compiler warnings