This document serves as an index to all migration guides for TraktKit version upgrades.
Auth Lifecycle Rework + Paginated fetchAllPages Result
Fixes forced re-authentication for users whose access token expired:
- Expired tokens are now a signed-in state (
isSignedInstaystrue) and refresh on demand AuthenticationError.tokenExpired/.noStoredCredentialsremoved; expiry isAuthenticationState.isExpired, missing credentials are anilstate- Custom
TraktAuthentication.getCurrentState()is now non-throwing and returnsAuthenticationState? checkToRefresh()renamed torefreshTokenIfNeeded()Route.fetchAllPages()returnsPagedFetchResult<Element>(read.items) instead ofSet<Element>
Compiler-enforced; build to find every call site.
Error Type Renames
Improves error type naming for better clarity and consistency:
TraktSpecificError→TraktAPIErrorTraktKitError→TraktClientError
Quick migration with find & replace. Compiler errors will guide you.
Async/Await Migration and API Restructure
Major rewrite introducing modern async/await API:
- Completion handlers replaced with async/await
- Resource-based API organization (
.movies,.shows,.users) - Route-based pattern with chainable methods
- Minimum iOS 16+, Swift 6.0 required
Comprehensive guide with before/after examples for all common patterns.
- CHANGELOG - Summary of all changes across versions
- README - Getting started guide
- Migrations Directory - All detailed migration guides
- Check your current version - Run
swift package show-dependenciesor check yourPackage.swift - Find your migration path - Select the guide(s) that cover your version upgrade
- Read the CHANGELOG - Get a quick overview of what changed
- Follow the migration guide - Detailed steps with code examples
- Test incrementally - Update and test as you go
| Version | Release Date | Major Changes |
|---|---|---|
| 3.7.0 | 2026-07-06 | Auth lifecycle rework; fetchAllPages returns PagedFetchResult |
| 3.6.1 | 2026-06-27 | Route token refresh through the shared AuthCoordinator |
| 3.6.0 | 2026-06-21 | Added missing model properties |
| 3.5.0 | 2026-05-27 | Paginated watched endpoints |
| 3.4.0 | 2026-05-26 | sharedAuthCoordinator for sibling managers |
| 3.3.0 | 2026-04-11 | userAgent required on TraktManager.init |
| 3.2.0 | 2026-02-25 | Error type renames |
| 3.1.1 | 2026-02-24 | Bug fixes |
| 3.1.0 | 2026-02-22 | PKCE authentication support |
| 3.0.0 | 2026-02-21 | Removed completion handlers |
| 2.0.0 | 2026-02-21 | Async/await API, major rewrite |
| 1.5.7 | Earlier | Legacy completion handler API |
Found an issue or have suggestions? Open an issue or submit a pull request!