Skip to main content

PrismGamification

PrismGamification brings Duolingo-style engagement mechanics to your app — challenges, streaks, badges, leaderboards, analytics, and AI-powered personalized messages. Built on SwiftData with CloudKit sync.

Challenges

Define challenges as enums. Track progress with counters or milestones. Earn points on completion.

Streaks & Badges

Daily streaks with break detection. Badges with 5 tiers and auto-unlock conditions.

AI Messages

Apple Intelligence generates personalized celebrations, motivation, and recommendations — on-device.

Architecture

Quick Start

Define Challenges
Use the Manager

Key Concepts

All public APIs return Sendable snapshot types instead of @Model classes. This ensures safe cross-actor data transfer in Swift 6 strict concurrency.

CloudKit Sync

Enable CloudKit sync by passing a container ID:
CloudKit Configuration
For testing, use an in-memory container:
In-Memory for Tests

Next Steps

Challenges

Define challenges, track progress, earn points.

Streaks & Badges

Daily streaks and tiered badge system.

Leaderboards

Multi-period scored leaderboards.

AI Messages

Apple Intelligence personalized messages.