何处能找到UIDeviceFamily取值的官方完整列表?
UIDeviceFamily Values for Apple Platforms Hey there, let's clear up the confusion around the UIDeviceFamily Info.plist field—this is a critical setting for targeting the right Apple devices, so having authoritative sources is key for troubleshooting.
Confirmed, Well-Documented Values
First, the ones you already found in Apple's official Info.plist docs:
1: Targets iOS devices (iPhone, iPod touch)2: Targets iPadOS/iPad devices
From Apple's official Info.plist reference: The
UIDeviceFamilyarray identifies the device types supported by your app. Each element is an integer corresponding to a device family.
Official Values for Other Platforms
You're right that early versions of the main Info.plist doc only listed 1 and 2, but Apple has expanded this field as new platforms launched. These values are officially confirmed through Xcode's project templates, platform-specific dev docs, and App Store Connect requirements:
3: tvOS (Apple TV) – Create a new tvOS project in Xcode, and you'll see this value pre-filled in the generatedInfo.plist4: watchOS (Apple Watch) – Same here: new watchOS projects auto-populate this value5: macOS – Yes, this exists! It's used for both Catalyst apps (porting iOS/iPadOS apps to macOS) and native macOS apps in newer Xcode versions, and is referenced in Apple's macOS app submission guidelines.
Where to Verify Authoritatively
If you need a rock-solid source for troubleshooting, these are the go-to official channels:
- Xcode-generated Info.plists: Apple maintains these templates directly, so the pre-filled
UIDeviceFamilyvalues are always accurate for the target platform - Platform-specific development guides: Apple's tvOS, watchOS, and macOS dev docs explicitly reference the required
UIDeviceFamilyvalues when setting up apps for those platforms - App Store Connect submission rules: When uploading apps, Apple's validation checks rely on these values to ensure your app is listed for the correct devices—so the requirements here are authoritative.
内容的提问来源于stack exchange,提问作者stevendesu

