The result of patchAndroidManifestForSuperwall: the (possibly unchanged)
XML and a tag describing what happened, so the runtime can decide whether
to write the file back and what to print to the user.
The <activity> element Superwall's install docs ask developers to
register inside <application> in
android/app/src/main/AndroidManifest.xml. The plugin's bundled manifest
declares it too, but with Theme.AppCompat.NoActionBar; injecting this
here lets the consumer's app override that with the docs-recommended
Theme.MaterialComponents.DayNight.NoActionBar (main-app manifest wins on
attribute conflicts via Gradle manifest-merger priority).
The post-install hint printed at the end of a RevenueCat run. Returns the
empty string when no Apple key was provided (the user picked n), so the
hint is silently omitted for Android-only setups. Pulled out of iap()
so the conditional is testable.
Validates the CLI invocation and returns the parsed command name (auth
or iap). Returns null for any other shape — the caller is responsible
for printing a usage hint and exiting with a non-zero status code.
Idempotently inserts superwallAndroidActivityXml just after the opening
<application ...> tag in manifestContent. Pure — does no IO so it can
be unit-tested against canned manifest strings.
Builds the slate plan for an iap invocation. Mirrors planAuthSlate in
shape; for RevenueCat and Superwall the user can type n to skip a
platform key, which is normalised to the empty string (the stub treats
'' as "leave the configure line commented out with placeholder text").
Superwall-specific Android hint. The runtime auto-injects the
SuperwallPaywallActivity per Superwall's install docs, so the only thing
the consumer must do manually is raise minSdkVersion to 26 — Flutter's
historical default of 21 fails the build.
Superwall-specific iOS hint. Mirrors iosSetupHintFor but adds the
iOS 14.0+ deployment-target requirement (Superwall's documented minimum).
Empty when no Apple key was provided so Android-only projects don't see
noisy iOS guidance.
Callback used by the planners to read a single line of user input. The
runtime wires this to a CliDialog text question; tests substitute a
canned-answer recorder.