Skip to content

Ask for an App Store rating after an import that saved something new - #8

Merged
guo-yu merged 1 commit into
mainfrom
claude/project-thread-x7c662
Nov 16, 2026
Merged

guo-yu merged 1 commit into
mainfrom
claude/project-thread-x7c662

Conversation

@guo-yu

@guo-yu guo-yu commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Dropack still has 0 ratings. Its App Store search ranks started dropping about three weeks after launch, for example jp「SDカード」went from 26 to 138. This adds the system rating prompt at a good moment.

When it asks

  • An import run finishes with every item resolved (phase .completed), was not paused, and saved at least one new item to Photos. An import where every item was skipped as already imported does not count.
  • At most once per app version (CFBundleShortVersionString), stored in UserDefaults under dropack.reviewPrompt.lastRequestedVersion.
  • 1.5 s after the finish, so the finished state is on screen first. It only asks if the app is still active and idle, with no sheet, alert or share in progress. If any of those is happening, it does not ask and the next qualifying import tries again.
  • Never in the -dropack-import / -dropack-url test mode, so UI tests are not covered by a system sheet.
  • StoreKit still decides whether anything appears. It shows at most 3 prompts in 365 days, none in TestFlight, and none if the person turned ratings off in Settings. In debug builds it always shows.

Changes

  • Dropack/Core/ReviewPromptPolicy.swift: a pure policy (shouldRequest(newlySavedCount:appVersion:lastRequestedVersion:)), with Tests/RelayCoreTests/ReviewPromptPolicyTests.swift.
  • ImportController: counts items confirmed saved in the current run and publishes finishedImport from finishRun() when the conditions above hold.
  • ContentView: watches finishedImport and calls @Environment(\.requestReview) after the checks.
  • The project was regenerated with scripts/generate_project.py. There are no new user-facing strings, because the prompt is the system's own.

Checks

  • python3 scripts/generate_project.py --check, python3 scripts/localization_audit.py and python3 -m unittest discover -s scripts/tests pass locally.
  • I wrote this without a Swift toolchain, so swift test and the simulator build rely on the Verify workflow.
  • Not checked on a device. Worth trying once on a debug build: finish an import of a few photos and confirm the rating sheet appears once, then not again on the next import.

Generated by Claude Code

Dropack has no ratings yet, and its App Store search ranks dropped about
three weeks after launch. Ask StoreKit for a rating at a good moment: when
an import finishes with every item resolved and at least one item newly
saved to Photos. Ask at most once per app version, only while the app is
active and nothing else is presented, and never in the -dropack-import
test mode. StoreKit still limits prompts to three a year and shows none
in TestFlight.

ReviewPromptPolicy lives in Core with unit tests; ImportController counts
items saved in the current run and publishes a FinishedImport event that
ContentView turns into a delayed requestReview call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P3ShCoyT7VfTxVxTvbHDkW
@guo-yu
guo-yu marked this pull request as ready for review November 16, 2026 15:49
@guo-yu
guo-yu merged commit 922a103 into main Nov 16, 2026
2 checks passed
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.

2 participants