BonMot is a production-ready iOS custom keyboard that uses AI to generate contextual responses based on screenshot context. Capture a screenshot, type an instruction, and let Claude AI generate the perfect response - all without leaving your current app.
- Full QWERTY Keyboard: Complete keyboard with letters, numbers, symbols, and all standard keys
- Screenshot Capture: One-tap screenshot capture via Shortcuts integration
- AI-Powered Responses: Uses Claude API to generate contextual responses based on screenshot OCR
- Seamless Workflow: Tap π· β Type instruction β Tap β¨ β Done
- Privacy-First: All data stays on device except API calls to Claude
- Auto-Cleanup: Screenshots automatically deleted after 24 hours
- Native iOS Design: Matches system keyboard appearance and behavior
- iOS 17.0 or later
- Xcode 15.0 or later
- Claude API key from console.anthropic.com
- iPhone (iPad support included but optimized for iPhone)
BonMot/
βββ App/ # Main container app
β βββ BonMotApp.swift # App entry point
β βββ Views/ # SwiftUI views
β β βββ OnboardingView.swift # First-time setup flow
β β βββ SettingsView.swift # API key and preferences
β β βββ SetupGuideView.swift # Step-by-step instructions
β β βββ TestAreaView.swift # Keyboard testing area
β βββ Services/ # Core services
β β βββ PhotoService.swift # Photo library management
β β βββ OCRService.swift # Vision framework OCR
β β βββ ClaudeAPIService.swift # Claude API integration
β β βββ SharedDataService.swift # App Group data
β βββ Utilities/
β β βββ KeychainManager.swift # Secure API key storage
β βββ Intents/ # App Intents for shortcuts
β β βββ TakeScreenshotIntent.swift
β β βββ AppShortcuts.swift
β βββ Info.plist
β βββ BonMot.entitlements
β
βββ KeyboardExtension/ # Custom keyboard
β βββ KeyboardViewController.swift # UIKit controller
β βββ KeyboardView.swift # SwiftUI keyboard view
β βββ KeyboardViewModel.swift # Business logic
β βββ Keys/
β β βββ StandardKeyboard.swift # QWERTY layout
β β βββ ScreenshotButton.swift # π· button
β β βββ AIButton.swift # β¨ button
β βββ Info.plist
β βββ KeyboardExtension.entitlements
β
βββ Shared/ # Shared code
β βββ SharedConstants.swift # App Group IDs, API config
β βββ SharedModels.swift # Data models
β
βββ README.md
- Open
BonMot.xcodeprojin Xcode - Select your development team in both targets:
- BonMot (main app)
- BonMotKeyboard (keyboard extension)
- Update bundle identifiers if needed (must match your team)
IMPORTANT: App Groups allow the keyboard extension and main app to share data.
- In Xcode, select the BonMot target
- Go to Signing & Capabilities tab
- Click + Capability β Add App Groups
- Enable the group:
group.com.bonmot.shared - Repeat for BonMotKeyboard target
- In both targets, add Keychain Sharing capability
- Add keychain group:
com.bonmot.shared
- Connect your iPhone
- Select BonMot scheme
- Build and run (βR)
- The app will launch on your device
- Launch BonMot app
- Grant Photo Library Access when prompted
- Enter your Claude API Key from console.anthropic.com
- The app will validate your key
- Open iOS Settings
- Go to General β Keyboard β Keyboards
- Tap Add New Keyboard
- Select BonMot
- Tap BonMot again in the keyboard list
- Enable Allow Full Access (required for network and photo access)
IMPORTANT: iOS keyboards cannot directly take screenshots. We use Shortcuts to work around this.
- Open Shortcuts app
- Tap + to create new shortcut
- Add these actions in order:
- Take Screenshot
- Save to Photo Album β Select "BonMot" album
- Wait β Set to 0.5 seconds
- Return to previous app (under Scripting β Apps)
- Name it "BonMot Screenshot"
- Tap Done
This allows capturing screenshots by tapping the back of your phone.
- Go to Settings β Accessibility β Touch β Back Tap
- Choose Double Tap or Triple Tap
- Scroll to Shortcuts section
- Select "BonMot Screenshot"
Now you can double/triple tap the back of your phone to capture screenshots!
- Open any app with text input (Messages, Notes, etc.)
- Tap in a text field
- Long-press the π (globe) button to switch to BonMot keyboard
- Try typing some text
- Tap the π· button (or use Back Tap) to capture a screenshot
- You should see a brief checkmark confirmation
- Open any app with text input (Messages, Mail, Notes, etc.)
- Switch to BonMot keyboard (long-press π globe button)
- Capture screenshot by tapping the π· button (or Back Tap)
- You'll see a β checkmark briefly
- Type your instruction in the text field
- Example: "reply politely saying no"
- Example: "summarize this in 2 sentences"
- Example: "write a professional response"
- Tap the β¨ AI button
- Loading indicator appears
- AI reads screenshot text via OCR
- Generates response based on context + your instruction
- Response replaces your instruction in the text field
- Review and send the generated text
Declining an invitation:
- Screenshot the message
- Type: "decline politely, say I'm busy"
- Tap β¨
Replying to email:
- Screenshot the email
- Type: "write professional thanks, confirm meeting"
- Tap β¨
Summarizing content:
- Screenshot an article
- Type: "summarize in 3 bullet points"
- Tap β¨
Crafting responses:
- Screenshot a conversation
- Type: "friendly response agreeing to lunch"
- Tap β¨
[Q][W][E][R][T][Y][U][I][O][P]
[A][S][D][F][G][H][J][K][L]
[β§][Z][X][C][V][B][N][M][β«]
[123][π·][ space ][β¨][β]
- β§ Shift: Tap for single capital, double-tap for caps lock
- 123: Switch to numbers and symbols
- π· Screenshot: Captures screen and saves to BonMot album
- β¨ AI: Generates AI response from screenshot + instruction
- β« Delete: Delete character
- β Return: New line / Submit
- π Globe (long-press): Switch keyboards
Access settings in the BonMot app:
- Update or remove Claude API key
- Keys are stored securely in Keychain
- Auto-delete after 24 hours: Automatically clean up old screenshots (default: ON)
- Manual cleanup: Delete all screenshots immediately
- View screenshot count
- Quick link to iOS keyboard settings
- Access setup guide
Problem: BonMot doesn't appear in keyboard list
Solutions:
- Make sure you added it in Settings β Keyboards
- Try restarting your device
- Check that the app is installed properly
- Remove and re-add the keyboard
Problem: Tapping β¨ shows error or nothing happens
Solutions:
- Verify Full Access is enabled (Settings β Keyboards β BonMot)
- Check API key is set in BonMot app Settings
- Ensure you have internet connection
- Verify API key is valid at console.anthropic.com
- Check that you captured a screenshot first (tap π·)
Problem: "No screenshot found" error when tapping β¨
Solutions:
- Tap the π· button first to capture a screenshot
- Or use Back Tap if configured
- Verify the BonMot photo album exists in Photos app
- Check photo permissions are granted
- Make sure the Shortcut is set up correctly
Problem: Tapping π· doesn't capture screenshot
Solutions:
- Verify you created the "BonMot Screenshot" shortcut
- Check the shortcut has these actions:
- Take Screenshot
- Save to Photo Album β "BonMot"
- Wait 0.5 seconds
- Return to previous app
- Test the shortcut manually in Shortcuts app
- Grant photo permissions to Shortcuts app if prompted
- For Back Tap: verify it's configured in Accessibility settings
Solutions:
- Force quit and relaunch the app
- Restart your device
- Reinstall the app
- Check for iOS updates
- Clear all screenshots in Settings
Problem: AI generates responses that don't match screenshot content
Solutions:
- Ensure screenshot is clear and text is readable
- Try with higher contrast screenshots
- Check that screenshot was saved to BonMot album
- Text in images works best with horizontal, clear text
Problem: "Network error" when using AI
Solutions:
- Check internet connection (WiFi or cellular)
- Verify Full Access is enabled (required for network)
- Try again after a moment
- Check Claude API status at status.anthropic.com
- API Key: Stored securely in iOS Keychain with App Group sharing
- Screenshots: Saved locally in "BonMot" photo album, auto-deleted after 24 hours
- Network: Only API calls to Claude (requires Full Access)
- Data: Screenshot text is sent to Claude API for generation, not stored
- No tracking: No analytics or tracking of any kind
Apple requires "Allow Full Access" for keyboards to:
- Make network requests (Claude API calls)
- Access shared containers (photo album)
- Open URLs (trigger screenshot shortcuts)
Without Full Access, the AI features will not work.
iOS does not allow keyboard extensions to directly capture screenshots. Our workarounds:
- URL Scheme + Shortcut: Keyboard triggers a Shortcut that captures the screenshot
- Back Tap: Alternative method using Accessibility feature
Both methods briefly leave the current app but return immediately.
- Update Bundle Identifiers: Change from
com.bonmot.*to your own - Add App Icons: Create icons in Assets.xcassets
- Main app: 1024x1024 App Store icon
- All required sizes for iOS
- Privacy Policy: Create and host a privacy policy
- Update URLs in SettingsView.swift
- Test Thoroughly: Test on multiple iOS versions and devices
- Screenshots: Prepare App Store screenshots showing:
- Keyboard in action
- AI generation
- Setup process
Include this in your App Review notes:
BonMot is an AI-powered custom keyboard. To test:
1. Open the app and enter test API key: [provide a test key]
2. Grant photo permissions
3. Enable keyboard: Settings β Keyboards β Add BonMot β Allow Full Access
4. Create screenshot shortcut (instructions in Setup Guide tab)
5. Open Messages app, switch to BonMot keyboard
6. Tap π· to capture screen, type "test instruction", tap β¨
Full Access is required for:
- Claude API network calls
- Photo album access for screenshots
- Triggering shortcuts via URL scheme
Screenshots are stored locally in "BonMot" album and auto-deleted after 24 hours.
Add privacy descriptions for:
- NSPhotoLibraryUsageDescription: "BonMot needs access to read screenshots from the BonMot album to provide context for AI-generated responses."
- NSPhotoLibraryAddUsageDescription: "BonMot needs access to save screenshots to the BonMot album for use with the keyboard."
- Targets: 2 targets (main app + keyboard extension)
- Deployment: iOS 17.0+
- Language: Swift 5.0
- UI Framework: SwiftUI with UIKit integration for keyboard
- No External Dependencies: Uses only system frameworks
- SwiftUI: All UI views
- UIKit: Keyboard extension integration (
UIInputViewController) - Vision Framework: OCR text recognition
- Photos Framework: Photo library access
- App Intents: Shortcuts integration
- URLSession: Claude API networking
- Keychain Services: Secure storage
Test on real device (keyboard extensions don't work in Simulator):
- Install app on device
- Enable keyboard in Settings
- Test in multiple apps (Messages, Notes, Mail)
- Test screenshot capture
- Test AI generation with various instructions
- Test error handling (no API key, no screenshot, network errors)
- Keyboard extensions cannot directly capture screenshots (OS limitation)
- Requires Full Access for network and shared data (OS requirement)
- OCR accuracy depends on screenshot text clarity
- Claude API rate limits apply
- No offline mode (requires internet for AI)
BonMot uses the Claude API (claude-sonnet-4-20250514 model):
- Input: ~500-2000 tokens (OCR text + instruction)
- Output: ~100-500 tokens (generated response)
- Cost: ~$0.003-0.015 per request (varies by length)
Monitor your usage at console.anthropic.com.
For issues, questions, or feature requests:
- GitHub Issues: [Your GitHub repo]
- Email: [Your support email]
[Your chosen license - MIT, Apache, etc.]
Built with:
- Claude API by Anthropic
- SwiftUI by Apple
- Vision Framework by Apple
Version: 1.0.0 Minimum iOS: 17.0 Last Updated: 2025