From aa09f8e3251669f9778cfa2b9f99ea9a281360c1 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Oct 2026 06:49:21 +0000 Subject: [PATCH] Make the app really iPad only; build 4 project.yml set TARGETED_DEVICE_FAMILY "2" in the project's settings, but XcodeGen gives every iOS target TARGETED_DEVICE_FAMILY '1,2' as a target setting, and a target's own value wins. Uploaded builds therefore listed iPhone too, and App Store Connect asked for iPhone screenshots. Each target now sets "2" itself, and a test checks that the built app's UIDeviceFamily is [2]. Build 3 was uploaded with iPhone support, so this is build 4. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01W5tzx8GXgMz9DMzc5BF4ND --- project.yml | 9 +++++++-- tests/PointerLockerTests/DeviceFamilyTests.swift | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 tests/PointerLockerTests/DeviceFamilyTests.swift diff --git a/project.yml b/project.yml index 7365787..aa155cf 100644 --- a/project.yml +++ b/project.yml @@ -8,12 +8,11 @@ options: settings: base: SWIFT_VERSION: "5.0" - TARGETED_DEVICE_FAMILY: "2" # iPad only CODE_SIGN_STYLE: Automatic # Change to your own team to build elsewhere. DEVELOPMENT_TEAM: AR9ZHABG8Y # IceBear s.r.o. MARKETING_VERSION: "1.0" - CURRENT_PROJECT_VERSION: "3" + CURRENT_PROJECT_VERSION: "4" targets: PointerLocker: @@ -26,6 +25,10 @@ targets: buildPhase: resources settings: base: + # iPad only. Set on each target, not under the project's settings: + # XcodeGen gives every iOS target TARGETED_DEVICE_FAMILY '1,2', and a + # target's own value wins over the project's. + TARGETED_DEVICE_FAMILY: "2" # Change to something unique to you (free Apple IDs need a unique ID). PRODUCT_BUNDLE_IDENTIFIER: sk.icebear.mouselook # Apps/PointerLocker/Assets.xcassets; rendered by tools/render-icon.sh. @@ -92,6 +95,7 @@ targets: - target: PointerLocker settings: base: + TARGETED_DEVICE_FAMILY: "2" PRODUCT_BUNDLE_IDENTIFIER: sk.icebear.mouselooktests GENERATE_INFOPLIST_FILE: YES @@ -102,6 +106,7 @@ targets: - path: Apps/MouseLockPrototype settings: base: + TARGETED_DEVICE_FAMILY: "2" PRODUCT_BUNDLE_IDENTIFIER: sk.icebear.mouselockprototype info: path: Apps/MouseLockPrototype/Info.plist diff --git a/tests/PointerLockerTests/DeviceFamilyTests.swift b/tests/PointerLockerTests/DeviceFamilyTests.swift new file mode 100644 index 0000000..83e94d1 --- /dev/null +++ b/tests/PointerLockerTests/DeviceFamilyTests.swift @@ -0,0 +1,10 @@ +import XCTest + +/// The app is iPad only. If the built Info.plist lists iPhone (1), App Store +/// Connect asks for iPhone screenshots and the app installs on iPhones. +final class DeviceFamilyTests: XCTestCase { + func testTheAppIsIPadOnly() { + let families = Bundle.main.object(forInfoDictionaryKey: "UIDeviceFamily") as? [Int] + XCTAssertEqual(families, [2]) + } +}