v4.0.0: Remove deprecated API - #43
Open
chrisdhaan wants to merge 4 commits into
Open
Conversation
Removes three public API members that have been marked @available(*, deprecated) for at least one prior release cycle: CDUntappdAPIClient.cancelAllPendingAPIRequests() (since 2.0.0), CDUntappdOAuthClient.authorize(withCode:completion:) (since 3.0.0), and CDUntappdKitError.httpError(statusCode:data:) (since 3.3.0). Removing public API is source-breaking, so this ships as 4.0.0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HdhEtXezNpB31vv93S5D4b
Ported from CDYelpFusionKit 8.0.1's example app: tapping an endpoint row now pushes a pretty-printed JSON view of the response (via a Mirror-based JSONPrettyPrinter, since response models are Decodable-only) instead of printing to the Xcode console, and failed requests show an alert instead of a silent console log. Requires wrapping the storyboard's root view controller in a UINavigationController to support the push. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HdhEtXezNpB31vv93S5D4b
@UIApplicationMain replaced with @main, and long single-line comments wrapped to the configured max width. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HdhEtXezNpB31vv93S5D4b
Adds fetchUserBadges, fetchUserBeers, fetchUserActivityFeed, searchBeers, searchBreweries, fetchBeerInfo, fetchBreweryInfo, fetchBeerActivityFeed, and fetchBreweryActivityFeed to the endpoint list (3 -> 12 rows). The beer/brewery-ID-based rows resolve a real ID via a live search first instead of hardcoding one that could go stale. Refactors didSelectRowAt to a single Task that delegates to a response(forRow:) switch, since the prior per-row Task/do/catch duplication would have pushed the function well past SwiftLint's function_body_length limit at 12 rows. Venue-based endpoints and everything requiring OAuth or a write/ action call are intentionally left out - the example app has no OAuth login flow, and write endpoints mutate a real Untappd account. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HdhEtXezNpB31vv93S5D4b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CDUntappdAPIClient.cancelAllPendingAPIRequests()—@available(*, deprecated)since 2.0.0; useTask.cancel()on the task wrapping the async API call instead.CDUntappdOAuthClient.authorize(withCode:completion:)—@available(*, deprecated)since 3.0.0; useauthorize(withCode:)(async throws) instead.CDUntappdKitError.httpError(statusCode:data:)—@available(*, deprecated)since 3.3.0; use.httpErrorWithHeaders(statusCode:data:headers:)instead.Documentation/ARCHITECTURE.mdandDocumentation/Usage.mdto drop now-stale references to the removed symbols.Mirror-basedJSONPrettyPrinter, since response models areDecodable-only) instead of printing to the Xcode console, and failed requests show an alert instead of a silent console log. Required wrappingMain.storyboard's root view controller in aUINavigationController.fetchUserBadges,fetchUserBeers,fetchUserActivityFeed,searchBeers,searchBreweries,fetchBeerInfo,fetchBreweryInfo,fetchBeerActivityFeed,fetchBreweryActivityFeed. The beer/brewery-ID rows resolve a real ID via a live search first instead of hardcoding one that could go stale. Venue-based endpoints and everything requiring OAuth or a write/action call are intentionally left out for now (no OAuth login flow in the example app yet; write endpoints mutate a real account).CHANGELOG.mdentry covering all of the above.Test plan
swift build— cleanswift test— 275 tests, 53 suites, all passingswiftformat Source Tests --lint— cleanswiftformat "iOS Example" --lint— cleanswiftlint lint --strict— 0 violations (includesiOS Example/Source, which is in.swiftlint.yml'sincludedpaths)xcodebuildfor theiOS Examplescheme —** BUILD SUCCEEDED **🤖 Generated with Claude Code
https://claude.ai/code/session_01HdhEtXezNpB31vv93S5D4b