ios-cursor-rules
ios-cursor-rules copied to clipboard
ios cursor rules

Cursor Swift Rules
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.
๐ Quick Start
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
๐ฑ iOS Development Rules
with-swift.mdc
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
with-ios.mdc
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
with-ddd-swift.mdc
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-swift.mdc
Clean Architecture implementation in Swift:
- Layer separation (Domain, Application, Interface, Infrastructure)
- Dependency rule enforcement
- Use case implementation
- Interface adapters in Swift
- Dependency injection techniques
๐งช Testing and QA Rules
create-tests-swift.mdc
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
swift-testing-policy.mdc
Project-specific testing standards:
- Test coverage requirements
- Test naming conventions
- Test organization guidelines
- Mock object creation patterns
- CI/CD test integration
object-calisthenics-swift.mdc
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
๐ฆ Release and Deployment Rules
create-ios-release.mdc
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
create-release.mdc
Handles iOS app release process:
- Version bumping
- Changelog management
- Documentation updates
- Git branching and tagging
- Release notes generation
create-commit-message.mdc
Standardized commit message formatting:
- Conventional commits structure
- Semantic versioning integration
- Issue/ticket referencing
- Co-author attribution
- Changelog integration
๐ง Development Workflow Rules
finalize.mdc
Post-development cleanup and validation:
- Dead code elimination
- Documentation completeness
- Resource optimization
- Memory leak checking
- Unused import removal
main-refactoring-rules.mdc
Code refactoring guidance:
- Code smell detection
- Refactoring techniques for Swift
- Performance optimization patterns
- Legacy code modernization
- Swift idiom implementation
recover.mdc
Error recovery procedures:
- Common Swift error patterns
- Debugging strategies
- Crash report analysis
- Memory issue resolution
- Network problem debugging
๐ Planning and Documentation Rules
prepare.mdc
Pre-development research and planning:
- Architecture planning
- Component design
- API documentation
- Resource estimation
- Technical spike planning
propose.mdc
Feature and solution proposal structure:
- Requirements analysis
- Technical approach
- Implementation strategy
- Risk assessment
- Timeline estimation
create-prompt.mdc
AI prompt generation for iOS development:
- Feature implementation prompts
- Bug fix descriptions
- Test case generation
- Documentation requests
- Code review guidelines
๐ Project Management Rules
command-rules.mdc
Custom command system for iOS projects:
- Build commands
- Test automation
- Deployment scripts
- Code generation
- Resource management
knowledge-management-rule.mdc
Project knowledge base management:
- Swift best practices
- iOS patterns
- Common solutions
- Learning resources
- Team guidelines
specification-management-rule.mdc
Requirements and specification handling:
- Feature specifications
- API documentation
- UI/UX requirements
- Performance criteria
- Security requirements
visualization-rule.mdc
Project visualization tools:
- Architecture diagrams
- Workflow charts
- UI flow diagrams
- Data model visualization
- Dependency graphs
๐ Project Organization Rules
location-rule.mdc
File and directory organization:
- Swift file organization
- Resource management
- Project structure
- Module organization
- Asset management
on-load-rule.mdc
Project initialization and setup:
- Environment configuration
- Dependency setup
- Initial checks
- Project validation
- Setup verification
project-onboarding-rule.mdc
New developer onboarding:
- Project setup guide
- Development workflow
- Tool configuration
- Access management
- Environment setup
๐ค Contributing
We welcome contributions! Please see our Contributing Guidelines for details on how to submit pull requests, report issues, and contribute to the project.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- The Swift and iOS development community
- Contributors to the Cursor project
- Apple's Swift and iOS documentation
๐ฎ Support
For support, please:
- Check the documentation
- Search existing issues
- Create a new issue if needed
Made with โค๏ธ for Swift and iOS developers