Agent-skills-standard ios-security
Secure iOS apps with Keychain, biometrics, and data protection. Use when implementing Keychain storage, Face ID/Touch ID, or data protection in iOS. (triggers: **/*.swift, SecItemAdd, kSecClassGenericPassword, LAContext, LocalAuthentication)
install
source · Clone the upstream repo
git clone https://github.com/HoangNguyen0403/agent-skills-standard
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/HoangNguyen0403/agent-skills-standard "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ios/ios-security" ~/.claude/skills/hoangnguyen0403-agent-skills-standard-ios-security && rm -rf "$T"
manifest:
skills/ios/ios-security/SKILL.mdsource content
iOS Security
Priority: P0 (CRITICAL)
Implementation Workflow
- Store secrets in Keychain — Use
,SecItemAdd
, andSecItemUpdate
withSecItemDelete
for tokens/PII. Never usekSecClassGenericPassword
.UserDefaults - Add biometric auth — Use
withLocalAuthentication
. Verify availability withLAContext
before prompting.canEvaluatePolicy - Encrypt files — Use
when saving to disk.Data.WritingOptions.completeFileProtection - Keep ATS enabled — Never disable App Transport Security globally in
.Info.plist - Pin certificates — Use
orServerTrustManager
for production apps to prevent MITM attacks.TrustKit - Strip sensitive logs — Ensure PII and tokens removed from logs in Release builds.
See Keychain and biometrics implementation examples
Anti-Patterns
- No Secrets in
: Always use Keychain for tokens and PIIUserDefaults - No Unhandled
: Check forLAError
anduserCancel
in biometric flowsauthenticationFailed - No PII/Token Logging: Strip sensitive data from all logs in Release builds
References
Related Topics
- common/security-standards
- architecture