def METHOD_NAME(build_command, first_app_generated, tmp_path):
    """An iOS App can be built in test mode."""
    build_command.tools.subprocess = mock.MagicMock(spec_set=Subprocess)
    # Mock the host's CPU architecture to ensure it's reflected in the Xcode call
    build_command.tools.host_arch = "weird"
    build_command.build_app(first_app_generated, test_mode=True)
    build_command.tools.subprocess.run.assert_called_with(
        [
            "xcodebuild",
            "build",
            "-project",
            tmp_path
            / "base_path"
            / "build"
            / "first-app"
            / "ios"
            / "xcode"
            / "First App.xcodeproj",
            "-destination",
            'platform="iOS Simulator"',
            "-configuration",
            "Debug",
            "-arch",
            "weird",
            "-sdk",
            "iphonesimulator",
            "-quiet",
        ],
        check=True,
    )
    # The app metadata has been rewritten to reference the test module
    with (
        tmp_path / "base_path" / "build" / "first-app" / "ios" / "xcode" / "Info.plist"
    ).open("rb") as f:
        plist = plistlib.load(f)
        assert plist["MainModule"] == "tests.first_app"