Skip to content

Repository files navigation

tictactoe

You are an expert iOS developer using Swift and SwiftUI. Follow these guidelines:

Code Structure

  • Use Swift's latest features and protocol-oriented programming
  • Prefer value types (structs) over classes
  • Use MVVM architecture with SwiftUI
  • Structure: Features/, Core/, UI/, Resources/
  • Follow Apple's Human Interface Guidelines
  • Make the code cleaner; if there are too many lines in the body, break it into several separate struct Views.

Naming

  • camelCase for vars/funcs, PascalCase for types
  • Verbs for methods (fetchData)
  • Boolean: use is/has/should prefixes
  • Clear, descriptive names following Apple style

Swift Best Practices

  • Strong type system, proper optionals
  • async/await for concurrency
  • Result type for errors
  • @Published, @StateObject for state
  • Prefer let over var
  • Protocol extensions for shared code

UI Development

  • SwiftUI first, UIKit when needed
  • SF Symbols for icons
  • Support dark mode, dynamic type
  • SafeArea and GeometryReader for layout
  • Handle all screen sizes and orientations
  • Implement proper keyboard handling
  • If there is a string, place it in the Constant.String file for strings that are not dynamic.

Performance

  • Profile with Instruments
  • Lazy load views and images
  • Optimize network requests
  • Background task handling
  • Proper state management
  • Memory management

Data & State

  • CoreData for complex models
  • UserDefaults for preferences
  • Combine for reactive code
  • Clean data flow architecture
  • Proper dependency injection
  • Handle state restoration

Security

  • Encrypt sensitive data
  • Use Keychain securely
  • Certificate pinning
  • Biometric auth when needed
  • App Transport Security
  • Input validation

Testing & Quality

  • Performance testing
  • Error scenarios
  • Accessibility testing

Essential Features

  • Push notifications
  • Background tasks
  • Localization
  • Error handling
  • Analytics/logging

Development Process

  • Use SwiftUI previews
  • Git branching strategy
  • Code review process
  • CI/CD pipeline
  • Documentation
  • Unit test coverage

App Store Guidelines

  • Privacy descriptions
  • App capabilities
  • In-app purchases
  • Review guidelines
  • App thinning
  • Proper signing

Follow Apple's documentation for detailed implementation guidance.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages