metadata library

Classes

AppStoreMetadata
ImageInfo
What a screenshot has to satisfy, read straight out of the file header.
LocaleMetadata
One locale's listing.
ScreenshotSpec
The pixel sizes Apple accepts for one ScreenshotDisplayType.
StoreImageRules
What one store accepts in the encoding of a listing image.

Enums

ImageFormat
Which container a header came out of.

Constants

appInfoLimits → const Map<String, int>
App Store Connect's limits on the listing text, in UTF-16 code units.
appStoreImageRules → const StoreImageRules
Apple, for every screenshot.
contentRightsDeclarations → const Set<String>
The two answers Apple accepts for "does this app contain, show or access third-party content".
maxScreenshots → const int
minScreenshots → const int
Apple takes 1 to 10 screenshots per display type.
playIconImageRules → const StoreImageRules
Play's app icon, the exception in both directions: it is the one slot that asks for an alpha channel, and it is still 8 bits per channel.
playImageRules → const StoreImageRules
Play, for screenshots, the feature graphic and the TV banner — every slot this package checks but the icon. (Play's Android XR slot says only "PNG or JPEG"; nothing here uploads to it.)
reviewNotesLimit → const int
What Apple accepts in appStoreReviewDetails.notes.
reviewNotesMarker → const String
Where the reviewer-facing half of review-notes.md stops.
screenshotSpecs → const Map<String, ScreenshotSpec>
Keyed by ScreenshotDisplayType as the API spells it, because these names are also the directory names in the tree — so a typo fails this lookup rather than being uploaded into the wrong slot, or silently ignored.
urlLimit → const int
URLs are capped too, and Apple rejects the whole localization rather than the offending field.
versionLimits → const Map<String, int>

Functions

imageEncodingProblem(ImageInfo image, StoreImageRules rules) String?
What rules refuse about image's encoding, as a sentence to follow the file's name, or null when nothing does.
loadMetadata(String path) AppStoreMetadata
Loads and fully validates the tree rooted at path.
readImageInfo(List<int> bytes) ImageInfo?
Dimensions, transparency and bit depth of a PNG or JPEG, or null if bytes is neither.
readReviewNotes(File file, {String label = 'review-notes.md'}) String
The reviewer-facing half of a review-notes file, as plain text.

Exceptions / Errors

MetadataException
Thrown for anything wrong with the tree. Always actionable: it names the file and says what would have to be true instead.