Overview
IQKeyboardManager includes built-in debug logging to help you understand what’s happening behind the scenes and troubleshoot issues. This guide covers enabling debug logs, common issues, and how to resolve them.Enable Debug Logging
Enable debug logging in your AppDelegate to see detailed information about keyboard events:Debug Log Output
When enabled, you’ll see detailed logs in the Xcode console:Log Structure
Logs use indentation to show nested operations:Enable Toolbar Debugging
Enable separate debugging for toolbar operations:Conditional Debugging
Enable debugging only in debug builds:Common Issues and Solutions
Keyboard Not Adjusting
IQKeyboardManager not enabled
IQKeyboardManager not enabled
View controller is disabled
View controller is disabled
Text field has enableMode = .disabled
Text field has enableMode = .disabled
enableMode property.Custom container view
Custom container view
Toolbar Not Appearing
Auto toolbar not enabled
Auto toolbar not enabled
View controller in disabled list
View controller in disabled list
Custom inputAccessoryView
Custom inputAccessoryView
inputAccessoryViewExplanation:
Custom input accessory views override the automatic toolbar.Solution:
Remove custom inputAccessoryView or integrate it with IQKeyboardToolbarManager.Tap-to-Dismiss Not Working
Feature not enabled
Feature not enabled
View controller disabled
View controller disabled
Gesture conflict
Gesture conflict
Performance Issues
Slow keyboard animation
Slow keyboard animation
Debug logging in production
Debug logging in production
Manual Management Tweaks
For cases where automatic behavior doesn’t work, you can manually control IQKeyboardManager:Temporarily Disable
Manual Position Adjustment
Custom Distance Calculation
Known Issues
For a comprehensive list of known issues and workarounds, see:Common Warnings
You may see these warnings in the console:Negative Distance Warning
keyboardDistance is >= 0
Refuses to Resign Warning
false from textFieldShouldEndEditing(_:)
Solution: Check your delegate implementation:
Debugging Checklist
When troubleshooting, go through this checklist:Enable debug logging
Check if IQKeyboardManager is enabled
Verify view controller not in disabled list
Check text field enable mode
Review console logs for errors
Test with minimal configuration
Check for gesture conflicts
Getting Help
If you’re still experiencing issues:- Check the GitHub Issues: IQKeyboardManager Issues
- Review the Wiki: IQKeyboardManager Wiki
- Create a minimal reproducible example
- Include debug logs when reporting issues
- Specify your environment:
- iOS version
- Xcode version
- IQKeyboardManager version
- Swift version
Debug Configuration Example
Here’s a complete debug configuration:Best Practices
Enable logging early in development
Enable logging early in development
Disable in production
Disable in production
#if DEBUG conditionals.Keep configuration simple
Keep configuration simple
Document custom behavior
Document custom behavior
Test thoroughly
Test thoroughly