
Device Integrity
Implements Apple's device integrity APIs for fraud prevention and app authenticity verification. Covers DCDevice for simple per-device bit flags (like tracking promo redemptions) and the full App Attest flow for cryptographic proof that requests come from genuine, unmodified apps. The guide walks through key generation in the Secure Enclave, attestation with Apple's servers, and assertion signing for ongoing request validation. Use this when you need to protect sensitive endpoints, prevent device abuse, or verify that API calls originate from legitimate app instances. The examples include proper keychain persistence and server integration patterns, though you'll need to implement the server-side JWT signing and Apple API verification yourself.
- skills.sh installs
- 3.8K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill device-integrity --agent claude-codeInstalls into .claude/skills of the current project.
Files
Device Integrity
Verify that requests to your server come from a genuine Apple device running a legitimate instance of your app. DeviceCheck provides per-device bits for simple flags (e.g., "claimed promo offer"). App Attest uses Secure Enclave keys and Apple attestation to cryptographically prove app legitimacy on sensitive requests.
Contents
- DCDevice (DeviceCheck Tokens)
- DCAppAttestService (App Attest)
- App Attest Key Generation
- App Attest Attestation Flow
- App Attest Assertion Flow
- Server Verification Guidance
- Error Handling
- Common Patterns
- Common Mistakes
- Review Checklist
- References
DCDevice (DeviceCheck Tokens)
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Backend & APIs, Code Review & Quality, Mobile Development
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Contacts Framework3.8K
- Alarmkit3.8K
- Core Nfc3.8K
- Swift Codable3.8K
- Tipkit3.8K
- App Clips3.8K
- Permissionkit3.7K
- Energykit3.7K
- Shareplay Activities3.7K
- Weatherkit3.6K
- Activitykit3.5K
- Cloudkit3.5K
- Photokit3.4K
- Mapkit3.4K
- Swiftui Webkit3.4K
- Realitykit3.4K
- Avkit3.4K
- Spritekit3.3K
- Cryptokit3.3K
- Metrickit3.3K
- Pdfkit3.3K
- Gamekit3.3K
- Eventkit3.3K
- Musickit3.3K