Thank you for your interest in contributing to ScreenCapture! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
Before creating a bug report, please check existing issues to avoid duplicates.
When reporting bugs, include:
- macOS version
- ScreenCapture version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Console logs if available
Feature requests are welcome! Please:
- Check existing issues/discussions first
- Describe the use case clearly
- Explain why existing features don't solve it
- Fork the repository
- Clone your fork locally
- Create a branch for your changes:
git checkout -b feature/your-feature-name
- Make your changes following our code style
- Test your changes thoroughly
- Commit with clear messages:
git commit -m "feat: Add new annotation tool" - Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request against
main
- macOS 13.0+
- Xcode 15.0+
- Swift 6.2+
# Clone your fork
git clone https://github.com/YOUR_USERNAME/ScreenCapture.git
cd ScreenCapture
# Open in Xcode
open ScreenCapture.xcodeproj
# Build and run
# Press Cmd+R in XcodeOn first run, grant Screen Recording permission:
- System Settings → Privacy & Security → Screen Recording
- Enable ScreenCapture
- Restart the app
- Use Swift 6.2 features appropriately
- Enable strict concurrency checking
- Mark UI code with
@MainActor - Use
actorfor thread-safe singletons - Prefer
structoverclassfor value types - Use
final classwhen inheritance isn't needed
- Types:
PascalCase - Functions/properties:
camelCase - File names match type names
- Document public APIs with DocC-style comments
- Include parameter descriptions
- Document thrown errors
/// Captures the entire display.
///
/// - Parameter display: The display to capture
/// - Returns: Screenshot with captured image
/// - Throws: `ScreenCaptureError.permissionDenied` if access denied
func captureFullScreen(display: DisplayInfo) async throws -> ScreenshotUse conventional commits:
| Prefix | Description |
|---|---|
feat: |
New feature |
fix: |
Bug fix |
docs: |
Documentation |
refactor: |
Code restructuring |
test: |
Test changes |
chore: |
Build/config changes |
Examples:
feat: Add highlight annotation tool
fix: Correct selection overlay on Retina displays
docs: Update API reference for CaptureManager
refactor: Extract common drawing logic
Before submitting a PR, verify:
- Full screen capture works
- Selection capture works
- All annotation tools function
- Undo/redo works correctly
- Save to disk succeeds
- Copy to clipboard works
- Settings persist correctly
- Multi-monitor support works
- No memory leaks (check Instruments)
xcodebuild test \
-project ScreenCapture.xcodeproj \
-scheme ScreenCapture \
-destination 'platform=macOS'ScreenCapture/
├── App/ # Entry point, AppDelegate
├── Features/ # Feature modules
│ ├── Capture/ # Screenshot capture
│ ├── Preview/ # Preview window
│ ├── Annotations/ # Drawing tools
│ ├── MenuBar/ # Status bar
│ └── Settings/ # Preferences
├── Services/ # Business logic
├── Models/ # Data types
├── Extensions/ # Swift extensions
└── Errors/ # Error types
- Create tool in
Features/Annotations/ - Conform to
AnnotationToolprotocol - Add case to
Annotationenum - Add to
AnnotationToolType - Update
PreviewViewModel - Add keyboard shortcut
- Add toolbar button
- Add case to
ExportFormat - Implement encoding in
ImageExporter - Update settings UI
See Developer Guide for detailed instructions.
- PRs require at least one approval
- All CI checks must pass
- Code must follow style guidelines
- Changes must be tested
- Documentation must be updated
- Open a Discussion for questions
- Check existing Issues
- Read the Documentation
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing!