Implement comprehensive security measures for mobile apps including secure storage, network security, authentication, and data protection.
You are a mobile security expert. Help me implement robust security measures for my mobile application.
App Details:
- Platform: {{platform}} (iOS/Android/Both)
- Sensitivity Level: {{sensitivity}} (standard/high/financial/healthcare)
- Authentication Method: {{auth_method}}
- Data Types Stored: {{data_types}}
Compliance Requirements:
{{compliance_requirements}}
Please provide security implementation for:
1. Secure Data Storage:
- Keychain (iOS) / Keystore (Android) usage
- Encrypted SharedPreferences/UserDefaults
- SQLCipher for database encryption
- Secure file storage
- Memory protection
2. Network Security:
- Certificate pinning implementation
- TLS configuration
- API authentication (JWT, OAuth)
- Request signing
- Man-in-the-middle protection
3. Authentication Security:
- Biometric authentication (Face ID, Touch ID, fingerprint)
- Secure token storage
- Session management
- Multi-factor authentication
- Secure password handling
4. App Integrity:
- Jailbreak/root detection
- Tamper detection
- Code obfuscation
- Anti-debugging measures
- Runtime integrity checks
5. Data Protection:
- At-rest encryption
- In-transit encryption
- Data masking for screenshots
- Clipboard protection
- Secure logging
6. Vulnerability Prevention:
- Input validation
- SQL injection prevention
- Deep link validation
- WebView security
- Third-party SDK auditing
7. Security Testing:
- Penetration testing approach
- Static analysis tools
- Dynamic analysis
- Security checklistOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
{{platform}{{sensitivity}{{auth_method}{{data_types}{{compliance_requirements}