Skip to content

ios metadata pull and push: App Store listing in the fastlane deliver layout - #34

Open
Interlap01 wants to merge 5 commits into
mainfrom
metadata
Open

Interlap01 wants to merge 5 commits into
mainfrom
metadata

Conversation

@Interlap01

Copy link
Copy Markdown
Collaborator

What

builder ios metadata pull and builder ios metadata push sync the App Store listing with files, from any platform, on the existing ASC client.

  • Fields: per-locale description, keywords, What's New (release_notes), promotional text, marketing/support URL (appStoreVersionLocalizations); name, subtitle, privacy URL (appInfoLocalizations); primary/secondary category (appInfos relationships); screenshots per display type (appScreenshotSets / appScreenshots).
  • Layout is fastlane deliver's: metadata/<locale>/<field>.txt, metadata/{primary,secondary}_category.txt, screenshots/<locale>/. Each screenshot's display type comes from its pixel size, or from a <DISPLAY_TYPE>/ subfolder (mapping table in the README). --metadata-dir and --screenshots-dir set the directories.
  • Version: the editable one by default. --version X.Y picks a version, and push creates it if it doesn't exist, then re-plans against the localizations App Store Connect copied into it. The app is found with resolveApp (--bundle-id, --ipa, ios.bundleId, newest dist IPA).
  • push: checks lengths (name/subtitle 30, keywords 100, promo 170, description/notes 4000), URLs, categories, screenshot sizes and the 10-per-set limit locally before any request. Then it prints one Will ... line per difference and needs --yes (--dry-run only prints). Screenshots are compared by MD5 and only pushed with --screenshots. By default missing ones are appended; --replace-screenshots deletes and re-uploads a set that differs. Upload: reserve, PUT the upload operations, PATCH uploaded with sourceFileChecksum, poll assetDeliveryState.
  • pull: writes non-empty fields and never deletes local files unless --clean. Screenshots download only with --screenshots. A pulled tree pushes back as an empty plan.
  • --json on both, like the other asc commands. Exposed as pkg/metadata, plus aliases in pkg/asc.

Why

Roadmap item 12: manage store metadata without a Mac, a browser or fastlane, and let existing fastlane users migrate in place.

How tested

  • internal/asc: screenshot reserve/upload/commit/poll flow, failed delivery, image URL template, localization and category requests (null secondary category).
  • internal/metadata: tested against a stateful fake ASC server. Covers local validation with no requests made, the diff/plan text and the minimal PATCH bodies, creating a new locale (and requiring name.txt for it), creating a version and re-planning, refusing a locked version, screenshot upload/append/replace and the set limit, pixel-size inference, and pull with and without --clean/--screenshots plus the round trip.
  • cmd/builder: pull → edit → push without --yes / --dry-run --json / --yes, and local validation failing before any write.
  • go test -race ./..., golangci-lint v2.12.2 (CI version): 0 issues. No live App Store Connect calls.

Left out

Copyright, review information, age rating, subcategories, app previews (video), reordering screenshots within a set, and fastlane's default/ locale fallback.

appStoreVersionLocalizations and appInfoLocalizations as attribute maps, appInfos with their categories, and the appScreenshotSets / appScreenshots flow: reserve, PUT the upload operations, commit with the MD5 checksum, poll assetDeliveryState.
…yout

Pull writes metadata/<locale>/<field>.txt, the category files and, on request, screenshots/<locale>/<DISPLAY_TYPE>/. NewPlan validates lengths, URLs, categories and screenshot sizes locally, then diffs against the editable version and app info; Apply writes only the differences, creating a missing version and replanning against the localizations App Store Connect copied into it.
push prints a Will line per difference and needs --yes (--dry-run prints only); pull never deletes local files without --clean; screenshots are opt-in with --screenshots on both.
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