An extensive Swift wrapper for the Untappd API with async/await support and comprehensive unit tests.
- Authentication — OAuth 2.0 via
CDUntappdOAuthViewController - API Endpoints — User Info, Wish List, Friends, Badges, Beers, Beer Info, Brewery Info, Venue Info, Beer Search, Brewery Search, Activity Feed, User/Beer/Brewery/Venue Activity Feed, Notifications, Foursquare Lookup
- Async/Await API — Modern Swift concurrency support
- Swift 6 Safety —
@MainActorandSendableannotations - Comprehensive Tests — 178 unit tests covering all functionality
- Brand Assets — Untappd brown and yellow colors
- Multi-Platform — iOS, macOS, tvOS, watchOS, visionOS
- Documentation — DocC API reference with interactive search
| Platform | Minimum |
|---|---|
| iOS | 15.0+ |
| macOS | 12.0+ |
| tvOS | 15.0+ |
| watchOS | 8.0+ |
| visionOS | 1.0+ |
| Swift | 6.0+ |
Add CDUntappdKit to your Package.swift:
dependencies: [
.package(url: "https://github.com/chrisdhaan/CDUntappdKit.git", .upToNextMajor(from: "3.3.0"))
]The iOS Example app reads its Untappd OAuth clientId/clientSecret from iOS Example/Secrets.xcconfig (gitignored). Before building it:
cp "iOS Example/Secrets.xcconfig.example" "iOS Example/Secrets.xcconfig"Then edit Secrets.xcconfig with your own credentials from the Untappd API.
let client = CDUntappdAPIClient(
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET",
redirectUrl: "yourapp://oauth/callback"
)Task {
do {
let response = try await client.fetchUserInfo(forUsername: "DehaanSolo", compact: false)
if let user = response.user {
print(user.username ?? "")
}
} catch {
print(error)
}
}For complete usage examples, authentication flow details, error handling, and advanced topics, see Documentation/Usage.md.
Upgrading from 1.x? See the 2.0 Migration Guide.
API reference is available at https://chrisdhaan.github.io/CDUntappdKit/documentation/cduntappdkit/
Christopher de Haan, contact@christopherdehaan.me
MIT
For more information, visit the Untappd Developers portal.