A comprehensive collection of Cursor rules specifically designed for Swift and iOS development. These rules enhance your development experience by providing intelligent assistance for common iOS development tasks, testing, security, and best practices.
Install the rules using the provided installation script:
curl -o- https://raw.githubusercontent.com/brunogama/ios-cursor-rules/main/install.sh | bash
Or download and run manually:
git clone https://github.com/brunogama/ios-cursor-rules.git
cd ios-cursor-rules
./install.sh
Enforces Swift coding standards and best practices:
- Naming conventions (Swift API Design Guidelines)
- Memory management patterns
- Error handling best practices
- Swift idioms and patterns
- Protocol-oriented programming
- Value vs Reference types usage
iOS-specific development patterns and architectural guidance:
- UIKit vs SwiftUI decision making
- App lifecycle management
- Device capabilities handling
- Accessibility implementation
- iOS data management strategies
- Memory warnings and state preservation
- Background task handling
Domain-Driven Design principles adapted for Swift:
- Strategic and tactical patterns for Swift
- Entity and value object implementation
- Aggregate design in Swift
- Repository pattern implementation
- Domain events in Swift applications
Clean Architecture implementation in Swift:
- Layer separation (Domain, Application, Interface, Infrastructure)
- Dependency rule enforcement
- Use case implementation
- Interface adapters in Swift
- Dependency injection techniques
Guidelines for creating effective Swift tests:
- XCTest framework usage
- UI Testing best practices
- Performance testing
- Network request mocking
- Asynchronous code testing
- Test data management
- Code coverage requirements
Project-specific testing standards:
- Test coverage requirements
- Test naming conventions
- Test organization guidelines
- Mock object creation patterns
- CI/CD test integration
Code quality improvement through constraints:
- Single level of indentation
- No else keyword usage
- Encapsulated collections
- Small entities
- First-class collections
- Implementation specific to Swift patterns
Comprehensive guide for iOS app deployment:
- App Store submission checklist
- TestFlight distribution
- Code signing management
- Fastlane integration
- CI/CD pipeline setup
- Version and build number management
Handles iOS app release process:
- Version bumping
- Changelog management
- Documentation updates
- Git branching and tagging
- Release notes generation
Standardized commit message formatting:
- Conventional commits structure
- Semantic versioning integration
- Issue/ticket referencing
- Co-author attribution
- Changelog integration
Post-development cleanup and validation:
- Dead code elimination
- Documentation completeness
- Resource optimization
- Memory leak checking
- Unused import removal
Code refactoring guidance:
- Code smell detection
- Refactoring techniques for Swift
- Performance optimization patterns
- Legacy code modernization
- Swift idiom implementation
Error recovery procedures:
- Common Swift error patterns
- Debugging strategies
- Crash report analysis
- Memory issue resolution
- Network problem debugging
Pre-development research and planning:
- Architecture planning
- Component design
- API documentation
- Resource estimation
- Technical spike planning
Feature and solution proposal structure:
- Requirements analysis
- Technical approach
- Implementation strategy
- Risk assessment
- Timeline estimation
AI prompt generation for iOS development:
- Feature implementation prompts
- Bug fix descriptions
- Test case generation
- Documentation requests
- Code review guidelines
Custom command system for iOS projects:
- Build commands
- Test automation
- Deployment scripts
- Code generation
- Resource management
Project knowledge base management:
- Swift best practices
- iOS patterns
- Common solutions
- Learning resources
- Team guidelines
Requirements and specification handling:
- Feature specifications
- API documentation
- UI/UX requirements
- Performance criteria
- Security requirements
Project visualization tools:
- Architecture diagrams
- Workflow charts
- UI flow diagrams
- Data model visualization
- Dependency graphs
File and directory organization:
- Swift file organization
- Resource management
- Project structure
- Module organization
- Asset management
Project initialization and setup:
- Environment configuration
- Dependency setup
- Initial checks
- Project validation
- Setup verification
New developer onboarding:
- Project setup guide
- Development workflow
- Tool configuration
- Access management
- Environment setup
We welcome contributions! Please see our Contributing Guidelines for details on how to submit pull requests, report issues, and contribute to the project.
This project is licensed under the MIT License - see the LICENSE file for details.
- The Swift and iOS development community
- Contributors to the Cursor project
- Apple's Swift and iOS documentation
For support, please:
- Check the documentation
- Search existing issues
- Create a new issue if needed
Made with โค๏ธ for Swift and iOS developers