(device: Pick<DeviceInfo, 'platform' | 'appleOs'>)
| 66 | * is authoritative. |
| 67 | */ |
| 68 | export function isMacOs(device: Pick<DeviceInfo, 'platform' | 'appleOs'>): boolean { |
| 69 | // The `appleOs` discriminant is authoritative for discovered devices; the legacy |
| 70 | // leaf `platform: 'macos'` (persisted pre-collapse records, or synthetic |
| 71 | // leaf-string devices) is still honored via the cast for back-compat. |
| 72 | return device.appleOs === 'macos' || (device.platform as string) === 'macos'; |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * The touch iOS family: every Apple OS except the macOS desktop host |
no outgoing calls