A comprehensive Swift wrapper for the Yelp Fusion REST API with full support for all endpoints, async/await concurrency, and cross-platform deployment.
- Complete Yelp Fusion API coverage (search, business details, reviews, events, categories, autocomplete, AI chat, engagement metrics, service offerings, business insights, review highlights, home services, reservations)
- Async/await support (iOS 13+, macOS 10.15+, tvOS 13+, watchOS 6+)
- Traditional completion handler API for backward compatibility
- Event monitoring and request adapters for logging, metrics, and header injection
- Built-in response caching with configurable TTL
- Automatic retry with exponential backoff
- Customizable JSON decoding strategies
- Mock networking utilities for unit testing (
CDYelpMockURLProtocol,CDYelpMockClientFactory) - Full Swift concurrency support with
@unchecked Sendableconformance - Privacy manifest for App Store compliance
- Comprehensive unit test suite (Swift Testing framework, 193 tests)
- Multi-platform support (iOS, macOS, tvOS, watchOS, visionOS)
import CDYelpFusionKit
let client = CDYelpAPIClient(apiKey: "your-api-key")
Task {
do {
let response = try await client.searchBusinesses(
byTerm: "coffee",
location: "San Francisco",
latitude: nil,
longitude: nil,
radius: nil,
categories: nil,
locale: nil,
limit: 10,
offset: nil,
sortBy: .bestMatch,
priceTiers: nil,
openNow: nil,
openAt: nil,
attributes: nil
)
print("Found \(response.businesses?.count ?? 0) businesses")
} catch {
print("Search failed: \(error)")
}
}| Platform | Minimum Version |
|---|---|
| iOS | 12.0 |
| macOS | 11.0 |
| tvOS | 12.0 |
| watchOS | 4.0 |
| visionOS | 1.0 |
Add CDYelpFusionKit to your Package.swift:
dependencies: [
.package(url: "https://github.com/chrisdhaan/CDYelpFusionKit.git", .upToNextMajor(from: "5.1.0"))
]Or in Xcode: File → Add Packages and enter the repository URL.
Add to your Podfile:
pod 'CDYelpFusionKit', '~> 5.1'Then run pod install.
- Usage Guide — Complete API reference with examples for all endpoints
- Architecture — Technical design and implementation details
- Migration Guide — Upgrade from v3.x to v4.0
- API Documentation — Generated DocC reference
Christopher de Haan (@chrisdhaan)
CDYelpFusionKit is released under the MIT license. See LICENSE for details.