Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a warning for the play family policy. #562

Merged
merged 3 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/cli/src/lib/cmds/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export interface InitArgs {
}

async function confirmTwaConfig(twaManifest: TwaManifest, prompt: Prompt): Promise<TwaManifest> {
// Warn about the Google Play Family Policy
prompt.printMessage(messages.warnFamilyPolicy);

// Step 1/5 - Collect information on the Web App.
prompt.printMessage(messages.messageWebAppDetails);
prompt.printMessage(messages.messageWebAppDetailsDesc);
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/lib/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ type Messages = {
promptNewAppVersionName: string;
promptVersionCode: string;
promptUpdateProject: string;
warnFamilyPolicy: string;
warnPwaFailedQuality: string;
updateConfigUsage: string;
jdkPathIsNotCorrect: string;
Expand Down Expand Up @@ -368,6 +369,12 @@ the PWA:
promptVersionCode: 'Starting version code for the new app version:',
promptUpdateProject: 'There are changes in twa-manifest.json. ' +
'Would you like to apply them to the project before building?',
warnFamilyPolicy:
bold(yellow('WARNING: ')) + 'Trusted Web Activities are currently incompatible' +
' with applications\ntargeting children under the age of 13.' +
' Check out the Play for' +
' Families\npolicies to learn more.\n' +
cyan('https://play.google.com/console/about/families/'),
warnPwaFailedQuality: red('PWA Quality Criteria check failed.'),
updateConfigUsage: 'Usage: [--jdkPath <path-to-jdk>] [--androidSdkPath <path-to-android-sdk>]' +
'(You can insert one or both of them)',
Expand Down