| 144 | } |
| 145 | |
| 146 | export function isAppleOs(value: unknown): value is AppleOS { |
| 147 | // The stored Apple-OS discriminant carried additively on the PUBLIC device output |
| 148 | // (iPhone/iPad/tvOS/visionOS/macOS). Used by the client normalizers to validate the |
| 149 | // optional `appleOs` field parsed from a daemon response. Its values never include the |
| 150 | // internal `apple` platform token, so surfacing it does not affect the apple-leak guard. |
| 151 | return (APPLE_OS_VALUES as readonly unknown[]).includes(value); |
| 152 | } |
| 153 | |
| 154 | export function matchesPlatformSelector( |
| 155 | device: Pick<DeviceInfo, 'platform' | 'appleOs'>, |