(platformIdentifier?: string)
| 619 | } |
| 620 | |
| 621 | function getDevicePlatformLabel(platformIdentifier?: string): string { |
| 622 | const platformId = platformIdentifier?.toLowerCase() ?? ''; |
| 623 | |
| 624 | if (platformId.includes('ios') || platformId.includes('iphone')) { |
| 625 | return 'iOS'; |
| 626 | } |
| 627 | if (platformId.includes('ipad')) { |
| 628 | return 'iPadOS'; |
| 629 | } |
| 630 | if (platformId.includes('watch')) { |
| 631 | return 'watchOS'; |
| 632 | } |
| 633 | if (platformId.includes('tv') || platformId.includes('apple tv')) { |
| 634 | return 'tvOS'; |
| 635 | } |
| 636 | if (platformId.includes('vision')) { |
| 637 | return 'visionOS'; |
| 638 | } |
| 639 | |
| 640 | return 'Unknown'; |
| 641 | } |
| 642 | |
| 643 | function parseDeviceListResponse(value: unknown): SetupDevice[] { |
| 644 | if (!value || typeof value !== 'object') { |
no outgoing calls
no test coverage detected