validate / check: Game Center entitlement vs App ID capability vs config, the PGS APP_ID resource vs Gradle and config, store state vs the games list, player id as User ID reminders (App Privacy USER_ID, Data safety PSL_USER_ACCOUNT)

This commit is contained in:
CRTkafa 2026-10-21 05:03:25 +07:00
parent 5a5d7fd4e7
commit 23f7c5a5eb
3 changed files with 100 additions and 0 deletions

View file

@ -14,6 +14,7 @@
// Live apps: crash / ANR vitals (Play Reporting API) and App Store diagnostics, as in `storebound health`: over a Play
// bad behavior threshold is a blocker, near it a warning; a store without vitals access is only noted. --no-health skips.
import { templateBlockers } from './lib/template-answers';
import { gameServicesFindings, gameServicesStatus } from './games-status';
import { ascClient, EDITABLE as APPLE_EDITABLE, type J } from './apple/asc';
import { allVersions, type AscPlatform, parsePlatform, platformOf, stateOf, versionsPath } from './apple/platform';
import { capabilityReport } from './apple/signing';
@ -226,6 +227,11 @@ export async function run(ctx: Ctx): Promise<void> {
try { findings.push(...playRules({ ...(await collectPlay(ctx)), renders: local?.play })); }
catch (e) { findings.push({ store: 'play', level: 'blocker', code: 'api', msg: (e as Error).message.slice(0, 400) }, ...rendersFindings('play', local?.play)); }
} else if (a.has('play')) warn('validate', 'no play section in the config');
// Game Center / Play Games Services: entitlement, APP_ID resource, store state vs the config
if (config.games && (config.games.gameCenter || config.games.playGames)) {
try { findings.push(...gameServicesFindings(await gameServicesStatus(ctx.loaded, { apple: both || a.has('apple'), play: both || a.has('play') }))); }
catch (e) { warn('validate', `game services: ${(e as Error).message}`); }
}
// other platforms named in a store's listing text (App Store 2.3.10, Play Metadata): blockers (pitfall 77)
try {
for (const h of listingFileMentions(ctx.loaded, { apple: (both || a.has('apple')) && !!config.apple, play: (both || a.has('play')) && !!config.play }))