Skip to content

fix(age-rating): show and answer Shared Location and Dating and Relationships - #47

Merged
hanrw merged 1 commit into
mainfrom
fix/age-rating-shared-location-dating
Nov 28, 2026
Merged

hanrw merged 1 commit into
mainfrom
fix/age-rating-shared-location-dating

Conversation

@hanrw

@hanrw hanrw commented Nov 28, 2026

Copy link
Copy Markdown
Member

Problem

App Store Connect's age-rating questionnaire includes Shared Location (sharedLocation) and Dating and Relationships (datingAndRelationships). The SDK, even the latest 4.6.2, doesn't model them, so asc age-rating get dropped them and asc age-rating update couldn't answer them.

(ageRatingOverrideV2 was already covered: --age-rating-override maps to it.)

Fix

  • AgeRatingDeclaration / AgeRatingDeclarationUpdate gain isSharedLocation and isDatingAndRelationships.
  • SDKAgeRatingDeclarationRepository decodes its own AgeRatingDeclarationDocument (the SDK response plus the two answers) and PATCHes a body that merges the SDK's attributes with the two answers. Drop it once the SDK carries them.
  • CLI: asc age-rating update --shared-location <bool> --dating-and-relationships <bool>
  • REST: PATCH /api/v1/age-rating/:id accepts isSharedLocation / isDatingAndRelationships.
  • Docs: age-rating README gotchas, including that a new app's first save must answer every question at once. CHANGELOG ### Fixed.

Verification

  • New tests: wire read, wire write (exact body), CLI JSON, REST. Each failed before the fix. Full swift test passes (2260 + 821).
  • Live: age-rating get on an answered app shows isSharedLocation / isDatingAndRelationships. A full first save on a new app ("Set Up Age Ratings") succeeded, and a read-back shows both answers.

Not in this PR

age-rating update output carries an empty appInfoId, so its getAgeRating next-command has no value. This predates the change.

🤖 Generated with Claude Code

…ionships

App Store Connect's age-rating questionnaire has sharedLocation and
datingAndRelationships, but the SDK (4.6.2) doesn't model them, so
`asc age-rating get` dropped them and `update` couldn't answer them.
The repository now decodes and sends both beside the SDK's own types.

- `asc age-rating update --shared-location --dating-and-relationships`
- REST PATCH body keys isSharedLocation / isDatingAndRelationships

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hanrw
hanrw merged commit d5a5993 into main Nov 28, 2026
2 of 3 checks passed
@hanrw
hanrw deleted the fix/age-rating-shared-location-dating branch November 28, 2026 06:56
@codecov

codecov Bot commented Nov 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.12%. Comparing base (585d062) to head (6e717d5).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...es/ASCKit/Apps/AppInfos/AgeRatingDeclaration.swift 66.66% 2 Missing ⚠️
...pInfos/Internal/AgeRatingDeclarationDocument.swift 92.30% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   83.28%   83.12%   -0.17%     
==========================================
  Files         570      571       +1     
  Lines       17703    17733      +30     
==========================================
- Hits        14744    14740       -4     
- Misses       2959     2993      +34     
Files with missing lines Coverage Δ
...CCommand/Commands/AgeRating/AgeRatingCommand.swift 89.09% <100.00%> (+0.41%) ⬆️
...s/Internal/SDKAgeRatingDeclarationRepository.swift 100.00% <100.00%> (ø)
...pInfos/Internal/AgeRatingDeclarationDocument.swift 92.30% <92.30%> (ø)
...es/ASCKit/Apps/AppInfos/AgeRatingDeclaration.swift 73.82% <66.66%> (-0.31%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant