feat(native): everything the App Store and Google Play submissions need

- iOS: microphone usage text for "Take Video", no-export-compliance flag,
  ExportOptions.plist for App Store Connect uploads, the unused push
  forwarders gone; CI builds with Xcode 26 and lints the property lists.
- Android: version and signing from Gradle properties (unsigned without
  them), R8 with keep rules for TREK's and Capacitor's reflective classes,
  no Auto Backup of the session cookie, no external file provider path,
  template and Firebase leftovers removed, keystores and service accounts
  ignored, full-size adaptive icon layers with a monochrome layer; CI also
  builds the release APK.
- native-release.yml: signed bundle to a Play testing track and archive to
  TestFlight, by hand or on a v* tag, behind the store environment.
- Version handshake: the server reports nativeApi 1, the app refuses a
  server below its minimum and tolerates an app older than the offline copy.
- Address screen: privacy policy link, "Try the demo" and "What is a TREK
  server?"; the privacy link also in the app's server settings. Three new
  native strings in all 27 locales.
- Donation links and the notices asking for one are hidden in the app.
- Store listings for "TREK Travel Planner" in client/fastlane: texts, review
  notes with placeholders, privacy and account deletion page drafts, the
  feature graphic and icon, a length and image check in CI, and a Playwright
  store project with the scripts that turn its captures into screenshots.
- Docs: wiki/Native-Apps.md, README no longer says there is no store app.
This commit is contained in:
Maurice
2026-10-25 18:37:31 +01:00
parent 5c37dd43c5
commit 8963180006
121 changed files with 1443 additions and 327 deletions
+3 -2
View File
@@ -15,6 +15,7 @@ import {
} from 'lucide-react';
import { type ComponentType, type CSSProperties, type ReactNode } from 'react';
import { useTranslation } from '../../i18n';
import { withoutDonationsInApp } from '../../utils/donations';
import { escapeReleaseHtml as escapeHtml, parseReleaseNotes } from '../../utils/releaseNotes';
import { fs } from '../shared/DialogShell';
import { SETTINGS_BUTTON, SettingsCard, StatusPill } from '../Settings/settingsKit';
@@ -134,7 +135,7 @@ export default function GitHubPanel({ isPrerelease = false }: { isPrerelease?: b
});
};
const supportLinks: SupportLink[] = [
const supportLinks: SupportLink[] = withoutDonationsInApp([
{
href: 'https://ko-fi.com/mauriceboe',
brand: '#ff5e5b', // theme-lint-disable: Ko-fi brand colour
@@ -177,7 +178,7 @@ export default function GitHubPanel({ isPrerelease = false }: { isPrerelease?: b
title: 'Wiki',
hint: t('settings.about.wikiHint'),
},
];
]);
const subtitle = t('admin.github.subtitle').replace('{repo}', REPO);
+20 -14
View File
@@ -5,6 +5,7 @@ import Section from './Section';
import { StatusPill } from './settingsKit';
import { fs } from '../shared/DialogShell';
import { useAuthStore } from '../../store/authStore';
import { donationsShown } from '../../utils/donations';
interface Props {
appVersion: string;
@@ -107,20 +108,25 @@ export default function AboutTab({ appVersion }: Props): React.ReactElement {
not the part being trimmed here. */}
{!managed && (
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3">
<LinkTile
href="https://ko-fi.com/mauriceboe"
color={BRAND.kofi}
icon={<Coffee size={19} />}
title="Ko-fi"
hint={t('admin.github.support')}
/>
<LinkTile
href="https://buymeacoffee.com/mauriceboe"
color={BRAND.bmac}
icon={<Heart size={19} />}
title="Buy Me a Coffee"
hint={t('admin.github.support')}
/>
{/* Not in the native apps, whose store rules allow no outside payment links. */}
{donationsShown() && (
<>
<LinkTile
href="https://ko-fi.com/mauriceboe"
color={BRAND.kofi}
icon={<Coffee size={19} />}
title="Ko-fi"
hint={t('admin.github.support')}
/>
<LinkTile
href="https://buymeacoffee.com/mauriceboe"
color={BRAND.bmac}
icon={<Heart size={19} />}
title="Buy Me a Coffee"
hint={t('admin.github.support')}
/>
</>
)}
<LinkTile
href="https://discord.gg/NhZBDSd4qW"
color={BRAND.discord}
@@ -1,4 +1,4 @@
// FE-SETTINGS-NATIVE-SERVER-001 to FE-SETTINGS-NATIVE-SERVER-006
// FE-SETTINGS-NATIVE-SERVER-001 to FE-SETTINGS-NATIVE-SERVER-008
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { fireEvent, render, screen } from '../../../tests/helpers/render';
import MSettingsServer from '../../mobile/screens/settings/MSettingsServer';
@@ -31,6 +31,14 @@ describe.each([
fireEvent.click(screen.getByRole('button', { name: 'Change server' }));
expect(TrekShell.resetServer).toHaveBeenCalled();
});
it('links to the privacy policy, opened outside the app', () => {
vi.mocked(nativeServerHost).mockReturnValue('trek.example.com');
render(<Section />);
const link = screen.getByRole('link', { name: 'Privacy policy' });
expect(link).toHaveAttribute('href', 'https://liketrek.com/privacy');
expect(link).toHaveAttribute('target', '_blank');
});
});
describe('the sign-in screen link', () => {
@@ -8,7 +8,7 @@ import { useNativeServer } from './useNativeServer';
/** Only inside the iOS/Android app: which server it talks to, and the way to another one. */
export default function NativeServerSection(): React.ReactElement | null {
const { t } = useTranslation();
const { host, changeServer } = useNativeServer();
const { host, changeServer, privacyUrl } = useNativeServer();
if (!host) return null;
return (
<Section title={t('native.settings.server')} icon={Server}>
@@ -20,6 +20,14 @@ export default function NativeServerSection(): React.ReactElement | null {
>
{t('native.changeServer')}
</button>
<a
href={privacyUrl}
target="_blank"
rel="noopener noreferrer"
className="block text-caption text-content-muted underline"
>
{t('native.privacy')}
</a>
</Section>
);
}
@@ -1,14 +1,17 @@
import { PRIVACY_URL } from '../../native/links';
import { nativeServerHost } from '../../native/platform';
import { TrekShell } from '../../native/trekShell';
/**
* The server section both settings views show inside the iOS and Android app:
* the host the app is connected to (null in a browser, where the section stays
* hidden) and the way back to the address screen.
* hidden), the way back to the address screen, and the privacy policy the store
* listings name, which an app has to reach from inside itself.
*/
export function useNativeServer(): { host: string | null; changeServer: () => void } {
export function useNativeServer(): { host: string | null; changeServer: () => void; privacyUrl: string } {
return {
host: nativeServerHost(),
privacyUrl: PRIVACY_URL,
changeServer: () => {
void TrekShell.resetServer();
},
@@ -3,6 +3,7 @@ import { useSystemNoticeStore, type SystemNoticeDTO } from '../../store/systemNo
import { useTranslation } from '../../i18n/index.js';
import { ModalRenderer } from './SystemNoticeModal.js';
import { BannerRenderer, ToastRenderer } from './SystemNoticeBanner.js';
import { donationsShown, noticeAsksForDonation } from '../../utils/donations';
// Mobile breakpoint matches the modal sheet's (max-width: 639px).
function useIsMobile() {
@@ -76,7 +77,9 @@ export function SystemNoticeHost() {
// desktopOnly notices (e.g. the thank-you/support modal) are hidden on mobile, and a
// notice whose copy this build does not have yet waits for the reload (see hasCopy).
const readable = notices.filter(n => hasCopy(n, t));
// Inside the native apps a notice that asks for a donation never shows: the
// store rules on payments allow no outside payment link there.
const readable = notices.filter(n => hasCopy(n, t) && (donationsShown() || !noticeAsksForDonation(n)));
const visible = isMobile ? readable.filter(n => !n.desktopOnly) : readable;
const modals = visible.filter(n => n.display === 'modal');