Skip to main content

Publish your terms of use and privacy policy and put their links into .env

For paywall

The App Store asks an app that sells subscriptions to link to its terms of use and its privacy policy, both in the app and in its App Store metadata. Google Play asks every app for a privacy policy, linked in Play Console and in the app. The paywall shows the links Terms of Use and Privacy Policy from two values of .env: PAYWALL_TERMS_URL and PAYWALL_PRIVACY_URL.

While a value is empty, or is no web address, the paywall leaves its link out, and a debug build names the key in its note for the developer. The terms of use on iOS then lead to the standard license agreement of Apple.

tip

The screenshots use the app My App and the address https://example.com/privacy. The orange frames mark what to click, in the order of their numbers.

1. Publish the pages. Put both pages at public web addresses, such as on the website of the app. Google Play takes no PDF for the privacy policy.

  • The privacy policy says who you are and how to reach you, what data the app collects and shares and why, how it keeps the data safe, and how long it keeps it and how a user has it deleted. The modules of the app decide what data it sends: RevenueCat, for example, gets the id of the user and what the user bought.
  • The terms of use are your own, or the standard license agreement of Apple if it fits your app.

2. Put the addresses into .env. In .env at the root of the app:

.env
PAYWALL_TERMS_URL=https://example.com/terms
PAYWALL_PRIVACY_URL=https://example.com/privacy

An address with https or http and a host counts. An address with an anchor goes into double quotes, since # after a plain value starts a comment: PAYWALL_TERMS_URL="https://example.com/legal#terms". Stop flutter run and start it again with --dart-define-from-file=.env, since the flutter tool reads .env when a command starts.

3. Give App Store Connect the privacy policy. In App Store Connect, open Apps and your app, and in the sidebar, under Trust & Safety, App Privacy. Click Edit (1) next to Privacy Policy, enter the address, and click Save.

The page App Privacy of an app in App Store Connect, with Edit next to Privacy Policy marked 1

The App Store shows the change with the next version of the app.

4. Give App Store Connect the terms of use.

  • With the standard license agreement of Apple, add a link to it, or to your page of the terms, to the description of the app in App Store Connect. App Review asks for that link in the description of an app with subscriptions.
  • With terms of your own, open App Information (1) in the sidebar, click Edit (2) next to License Agreement, choose to apply a custom license agreement, paste its text, choose the countries or regions, click Done and Save. The App Store then shows a link to it on the page of the app.
The page App Information of an app in App Store Connect, with App Information in the sidebar marked 1 and Edit next to License Agreement marked 2

5. Give Google Play the privacy policy. In Google Play Console, open the app, then Monitor and improve > Policy and programs > App content. Find Privacy policy on the tab Need attention and click Start, or, once it has an address, on the tab Actioned and click Manage (1). Enter the address and save.

The tab Actioned of App content in Play Console, with Manage in the row Privacy policy marked 1

Check. In a debug build, the paywall shows the links Terms of Use and Privacy Policy, its note for the developer names no key of .env, and each link opens its page in the browser.