
- 更新邮箱登录相关功能,新增邮箱验证码获取和登录API端点。 - 添加AccountModel以管理用户认证信息,支持会话票据的存储和更新。 - 实现密码恢复功能,支持通过邮箱获取验证码和重置密码。 - 增加本地化支持,更新相关字符串以适应新功能。 - 引入ValidationHelper以验证邮箱和密码格式,确保用户输入的有效性。 - 更新视图以支持邮箱登录和密码恢复的用户交互。
116 lines
2.3 KiB
Plaintext
116 lines
2.3 KiB
Plaintext
---
|
|
description:
|
|
globs:
|
|
alwaysApply: true
|
|
---
|
|
You are an expert iOS developer using Swift and SwiftUI. Follow these guidelines:
|
|
|
|
# Architechture
|
|
- Use TCA(The Composable Architecture) architecture with SwiftUI & Swift
|
|
- Don't use TCA for UI Navigation
|
|
|
|
# Code Structure
|
|
- Use Swift's latest features and protocol-oriented programming
|
|
- Prefer value types (structs) over classes
|
|
- Follow Apple's Human Interface Guidelines
|
|
|
|
|
|
# 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
|
|
|
|
|
|
# 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
|
|
|
|
- XCTest for unit tests
|
|
- XCUITest for UI tests
|
|
- Test common user flows
|
|
- Performance testing
|
|
- Error scenarios
|
|
- Accessibility testing
|
|
|
|
|
|
# Essential Features
|
|
|
|
- Deep linking support
|
|
- 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.
|
|
|