From 67372cb6848e959276881a18429de9fdcf5a46ce Mon Sep 17 00:00:00 2001 From: diffwireauto <330573775+diffwireauto@users.noreply.github.com> Date: Mon, 30 Nov 2026 18:46:13 -0500 Subject: [PATCH] fix(#1340): run natively on iPad instead of iPhone compatibility mode The iOS app declared iPhone only (TARGETED_DEVICE_FAMILY = 1), so iPadOS ran it in a phone-sized window. It now declares iPhone and iPad. Info.plist already lists every iPad orientation and the icon set already holds the iPad sizes, so nothing else in the bundle changes. A Mac now runs the iPad version, so the iPhone-on-Mac notice drops its "fixed phone-sized window" claim. CI fails if the built app, or the signed IPA, lacks iPad in UIDeviceFamily, with a negative test on an iPhone-only plist. Co-Authored-By: Claude Opus 5.5 --- .github/scripts/ios-assert-ipad.sh | 17 +++++++++++++++++ .github/workflows/build.yml | 15 +++++++++++++++ .github/workflows/ios-signed.yml | 3 +++ ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/l10n/app_en.arb | 4 ++-- lib/l10n/app_localizations.dart | 4 ++-- lib/l10n/app_localizations_bg.dart | 4 ++-- lib/l10n/app_localizations_de.dart | 4 ++-- lib/l10n/app_localizations_en.dart | 4 ++-- lib/l10n/app_localizations_es.dart | 4 ++-- lib/l10n/app_localizations_fr.dart | 4 ++-- lib/l10n/app_localizations_hu.dart | 4 ++-- lib/l10n/app_localizations_it.dart | 4 ++-- lib/l10n/app_localizations_ja.dart | 4 ++-- lib/l10n/app_localizations_ko.dart | 4 ++-- lib/l10n/app_localizations_nl.dart | 4 ++-- lib/l10n/app_localizations_pl.dart | 4 ++-- lib/l10n/app_localizations_pt.dart | 4 ++-- lib/l10n/app_localizations_ru.dart | 4 ++-- lib/l10n/app_localizations_sk.dart | 4 ++-- lib/l10n/app_localizations_sl.dart | 4 ++-- lib/l10n/app_localizations_sv.dart | 4 ++-- lib/l10n/app_localizations_uk.dart | 4 ++-- lib/l10n/app_localizations_zh.dart | 4 ++-- lib/widgets/ios_on_mac_notice.dart | 5 +++-- test/widgets/ios_on_mac_notice_test.dart | 5 ++++- 26 files changed, 85 insertions(+), 46 deletions(-) create mode 100644 .github/scripts/ios-assert-ipad.sh diff --git a/.github/scripts/ios-assert-ipad.sh b/.github/scripts/ios-assert-ipad.sh new file mode 100644 index 00000000..32c88a1d --- /dev/null +++ b/.github/scripts/ios-assert-ipad.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Fails unless the iOS app declares iPad (UIDeviceFamily 2). Without it, +# iPadOS runs the app in iPhone compatibility mode (#1340). +# Usage: ios-assert-ipad.sh +set -u +PLIST="$1/Info.plist" +i=0 +while v="$(/usr/libexec/PlistBuddy -c "Print :UIDeviceFamily:${i}" "${PLIST}" 2>/dev/null)"; do + if [ "${v}" = "2" ]; then + echo "UIDeviceFamily includes iPad (2)." + exit 0 + fi + i=$((i + 1)) +done +echo "::error::${PLIST} does not declare iPad in UIDeviceFamily (#1340)." +/usr/libexec/PlistBuddy -c "Print :UIDeviceFamily" "${PLIST}" || true +exit 1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3d890dd..ef3e44bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -153,6 +153,21 @@ jobs: - name: Assert the app holds its native-asset frameworks (#1037) if: needs.classify.outputs.docs_only != 'true' run: bash .github/scripts/ios-assert-frameworks.sh "build/ios/iphoneos/Offband MeshCore.app" + - name: "Negative: the iPad assertion refuses an iPhone-only app" + if: needs.classify.outputs.docs_only != 'true' + run: | + set -u + ONLY="${RUNNER_TEMP}/iphone-only.app" + mkdir -p "${ONLY}" + /usr/libexec/PlistBuddy -c "Add :UIDeviceFamily array" -c "Add :UIDeviceFamily:0 integer 1" "${ONLY}/Info.plist" + if bash .github/scripts/ios-assert-ipad.sh "${ONLY}" > /dev/null; then + echo "::error::The iPad assertion passed on an iPhone-only app." + exit 1 + fi + echo "Refused, as required." + - name: Assert the app runs natively on iPad (#1340) + if: needs.classify.outputs.docs_only != 'true' + run: bash .github/scripts/ios-assert-ipad.sh "build/ios/iphoneos/Offband MeshCore.app" # ios-signed.yml cannot run on a PR, so its output check is proven here, # with no secrets: every case that must not count as success (#1040). - name: "Negative: the altool check refuses anything but success" diff --git a/.github/workflows/ios-signed.yml b/.github/workflows/ios-signed.yml index 9d170357..d8c3b7e4 100644 --- a/.github/workflows/ios-signed.yml +++ b/.github/workflows/ios-signed.yml @@ -208,6 +208,9 @@ jobs: - name: Assert the IPA holds its native-asset frameworks (#1037) run: bash .github/scripts/ios-assert-frameworks.sh "${APP}" + - name: Assert the IPA runs natively on iPad (#1340) + run: bash .github/scripts/ios-assert-ipad.sh "${APP}" + - name: Assert the IPA's identity and version run: | set -eu diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 0873daf9..91236ffc 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -435,7 +435,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Profile; @@ -562,7 +562,7 @@ MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -615,7 +615,7 @@ SUPPORTED_PLATFORMS = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 703ebb27..31fd24fb 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -544,8 +544,8 @@ "sponsorPrompt_anytime": "You can support Offband anytime from About in Settings, or at offband.org/donate.", "sponsorPrompt_notNow": "Not now", "sponsorPrompt_never": "Never Show Again", - "iosOnMac_title": "iPhone app on a Mac", - "iosOnMac_body": "This is the iPhone version of Offband MeshCore. It's made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.", + "iosOnMac_title": "iPad app on a Mac", + "iosOnMac_body": "This is the iPhone and iPad version of Offband MeshCore. It's made for touch screens, so on a Mac some things may look or work differently.", "settings_aboutLinkFailed": "Could not open the link", "settings_aboutOpenMeteoAttribution": "LOS elevation data: Open-Meteo (CC BY 4.0)", "settings_aboutPresetsAttribution": "Regional radio presets: MeshCore's suggested settings, maintained by Liam Cottle (api.meshcore.nz), with Offband additions.", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index c8f792a7..1faf0b65 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -1837,13 +1837,13 @@ abstract class AppLocalizations { /// No description provided for @iosOnMac_title. /// /// In en, this message translates to: - /// **'iPhone app on a Mac'** + /// **'iPad app on a Mac'** String get iosOnMac_title; /// No description provided for @iosOnMac_body. /// /// In en, this message translates to: - /// **'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'** + /// **'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'** String get iosOnMac_body; /// No description provided for @settings_aboutLinkFailed. diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index a111d7f5..6fffe434 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -1027,11 +1027,11 @@ class AppLocalizationsBg extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index f3f5de92..3edb6cc6 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -1022,11 +1022,11 @@ class AppLocalizationsDe extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 89933123..b0bc5ec1 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -1013,11 +1013,11 @@ class AppLocalizationsEn extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index 0b113f6f..293ca130 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -1023,11 +1023,11 @@ class AppLocalizationsEs extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 90ec1839..a688024c 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -1027,11 +1027,11 @@ class AppLocalizationsFr extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index 71749bab..1157a2d5 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -1025,11 +1025,11 @@ class AppLocalizationsHu extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 839c4ac8..6a6f7122 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -1025,11 +1025,11 @@ class AppLocalizationsIt extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index 634475f2..26d0b7c9 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -998,11 +998,11 @@ class AppLocalizationsJa extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index fc4cfc83..da32abef 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -998,11 +998,11 @@ class AppLocalizationsKo extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index 60d7de26..ffc7d719 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -1019,11 +1019,11 @@ class AppLocalizationsNl extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index c03df7ad..84cfc0a5 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -1027,11 +1027,11 @@ class AppLocalizationsPl extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 202624f1..e011ae44 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -1025,11 +1025,11 @@ class AppLocalizationsPt extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index a992595c..9b01cb0f 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -1024,11 +1024,11 @@ class AppLocalizationsRu extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index a8c1ebfc..3c85ae60 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -1019,11 +1019,11 @@ class AppLocalizationsSk extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 2b3b3f48..10b2c14b 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -1016,11 +1016,11 @@ class AppLocalizationsSl extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index 7740d3f5..a6409baa 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -1014,11 +1014,11 @@ class AppLocalizationsSv extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index 3b31ece6..877b6158 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -1022,11 +1022,11 @@ class AppLocalizationsUk extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index f1f40342..060607a3 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -990,11 +990,11 @@ class AppLocalizationsZh extends AppLocalizations { String get sponsorPrompt_never => 'Never Show Again'; @override - String get iosOnMac_title => 'iPhone app on a Mac'; + String get iosOnMac_title => 'iPad app on a Mac'; @override String get iosOnMac_body => - 'This is the iPhone version of Offband MeshCore. It\'s made for iPhone and iPad, so on a Mac it runs in a fixed phone-sized window.'; + 'This is the iPhone and iPad version of Offband MeshCore. It\'s made for touch screens, so on a Mac some things may look or work differently.'; @override String get settings_aboutLinkFailed => 'Could not open the link'; diff --git a/lib/widgets/ios_on_mac_notice.dart b/lib/widgets/ios_on_mac_notice.dart index 6dd5d5ac..5d4f1f00 100644 --- a/lib/widgets/ios_on_mac_notice.dart +++ b/lib/widgets/ios_on_mac_notice.dart @@ -8,8 +8,9 @@ import '../storage/prefs_manager.dart'; import '../utils/app_logger.dart'; import '../utils/platform_info.dart'; -/// Tells a Mac user they are running the iPhone app (#1140). Shown once per -/// app version. No link to the macOS download, by the owner's decision. +/// Tells a Mac user they are running the iPhone and iPad app (#1140, #1340). +/// Shown once per app version. No link to the macOS download, by the owner's +/// decision. class IosOnMacNotice { static const String shownForKey = 'ios_on_mac_notice_shown_for'; static const MethodChannel _channel = MethodChannel('offband/platform'); diff --git a/test/widgets/ios_on_mac_notice_test.dart b/test/widgets/ios_on_mac_notice_test.dart index a8a7390e..a8823b66 100644 --- a/test/widgets/ios_on_mac_notice_test.dart +++ b/test/widgets/ios_on_mac_notice_test.dart @@ -45,7 +45,7 @@ Future _launch( await tester.pumpAndSettle(); } -final _title = find.text('iPhone app on a Mac'); +final _title = find.text('iPad app on a Mac'); Future _dismiss(WidgetTester tester) async { await tester.tap(find.text('OK')); @@ -58,6 +58,9 @@ void main() { ) async { await _launch(tester, await _prefs()); expect(_title, findsOneWidget); + // With iPad support a Mac runs the iPad version, so no window-size claim. + expect(find.textContaining('phone-sized'), findsNothing); + expect(find.textContaining('iPhone and iPad version'), findsOneWidget); expect(find.byType(TextButton), findsOneWidget); // the test's own button expect(find.byType(FilledButton), findsOneWidget); await _dismiss(tester);