Xcode 9.3警告不显示求助:已开启所有警告设置仍无提示
Hey there, let's work through this frustrating issue where your Xcode warnings have vanished entirely—even though errors still show up. I've dealt with similar Xcode quirks before, so here are targeted steps to try:
1. Clear Derived Data and Xcode Caches
Corrupted cached data is one of the most common culprits for weird Xcode behavior:
- Delete Derived Data: Go to
Xcode > Window > Projects, select your project, and click Delete Derived Data. You can also manually delete the entire Derived Data folder at~/Library/Developer/Xcode/DerivedData(Xcode will rebuild it automatically). - Clear Xcode's global cache: Open Terminal and run this command to wipe Xcode's system caches:
rm -rf ~/Library/Caches/com.apple.dt.Xcode
Restart Xcode after doing this.
2. Double-Check Issue Navigator Filters
Even if you've checked Show all issues, it's easy to accidentally toggle a hidden filter:
- Open the Issue Navigator (the exclamation mark icon in the left sidebar).
- At the top of the navigator, make sure:
- The dropdown menu is set to All (not just a specific target/scheme).
- The Errors Only toggle is not selected (it looks like a small error icon—click it to disable if it's active).
3. Verify Global Warning Configuration
Since this affects all projects, it might be a global Xcode setting overriding your project-level config:
- Create a brand new empty project, enable all warnings in its build settings (
Build Settings > Warning Level > All), and add a simple warning-triggering line of code (like an unused variable). If warnings still don't show here, it's definitely a global issue. - Check if the global
WARNING_CFLAGShas a-wflag (which disables all warnings). You can inspect this by opening the build settings of a project, switching to All and Levels view, and looking at the "Warning Flags" row—if the "User Defined" or "Xcode Default" level has-w, remove it.
4. Reset System UI Components (High Sierra-Specific)
High Sierra's UI cache can sometimes interfere with Xcode's display:
- Open Terminal and run these commands to restart Finder and Dock:
killall Finder killall Dock
Then quit and reopen Xcode.
5. Reinstall Xcode 9.3
If resetting preferences and clearing caches didn't work, your Xcode installation might be corrupted:
- Download a fresh copy of Xcode 9.3 (either from the App Store or Apple's Developer website).
- Run the installer over your existing Xcode installation—you don't need to uninstall first, and this will replace any damaged files without losing your settings.
6. Check System File Permissions
High Sierra's security settings can sometimes block Xcode from accessing necessary files:
- Go to
System Preferences > Security & Privacy > Privacy > Files and Folders. - Make sure Xcode is checked under the list of apps allowed to access your files and folders.
Hope one of these steps brings back those 950 warnings (and helps you clean them up eventually!). Let me know if you hit any snags along the way.
内容的提问来源于stack exchange,提问作者Roland Schützenhofer

