Mobile Framework Cursor Rules for iOS and Android Development

Master cursor rules for React Native, Flutter, Swift, and Kotlin. Platform-specific best practices for efficient cross-platform and native mobile development.

January 15, 2024by PromptGenius Team
cursor-rulesmobilereact-nativeflutterswiftkotliniosandroidcross-platformmobile-development

📱 Mobile Framework Cursor Rules

What Are Mobile Framework Cursor Rules?

Mobile framework cursor rules provide AI with platform-specific knowledge to help you navigate, generate, and refactor code for iOS and Android development. These rules understand the unique patterns, APIs, and conventions of mobile frameworks, enabling smarter code assistance for both cross-platform and native mobile development.

📱

Platform-Aware Navigation

Navigate between iOS and Android platform-specific code with understanding of native modules and bridge implementations.

🎨

UI Component Understanding

Work with native UI components, widgets, and views using framework-specific patterns for SwiftUI, Compose, and React Native.

🔄

State Management Patterns

Navigate app state with understanding of Redux, Provider, Riverpod, Combine, and Kotlin Flow patterns.

Native API Integration

Work seamlessly with platform APIs, permissions, sensors, and device capabilities across iOS and Android.

🚀

Performance Optimization

Apply mobile-specific optimizations including memory management, battery efficiency, and rendering performance.

🧪

Testing & Debugging

Generate and navigate tests using XCTest, Espresso, Jest, and framework-specific testing tools for mobile apps.

Supported Mobile Frameworks

Common Features

Cross-Platform Navigation

  • Navigate between platform-specific code
  • Smart component/widget traversal
  • State and prop management
  • Native module integration

Code Manipulation

  • Framework-specific refactoring
  • Smart component generation
  • Native bridge handling
  • Platform-specific optimizations

Best Practices

  1. Platform-Specific Patterns

    • Use platform-aware navigation
    • Handle native integrations properly
    • Follow platform conventions
    • Implement proper error handling
  2. Performance Optimization

    • Optimize rendering performance
    • Handle memory efficiently
    • Consider battery impact
    • Implement proper caching
  3. Development Experience

    • Streamlined workflow
    • Quick platform switching
    • Enhanced productivity
    • Proper debugging support
  4. Testing Strategy

    • Unit test components
    • Integration test flows
    • Platform-specific testing
    • End-to-end validation

Benefits

  • Consistent development patterns
  • Improved code quality
  • Better performance
  • Easier maintenance
  • Enhanced team collaboration
  • Streamlined platform handling

Whether you're developing with React Native, Flutter, Swift, or Kotlin, these framework-specific guidelines will help you maintain consistent patterns and best practices across your mobile development workflow.