MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / getDevicePlatformLabel

Function getDevicePlatformLabel

src/cli/commands/setup.ts:621–641  ·  view source on GitHub ↗
(platformIdentifier?: string)

Source from the content-addressed store, hash-verified

619}
620
621function 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
643function parseDeviceListResponse(value: unknown): SetupDevice[] {
644 if (!value || typeof value !== 'object') {

Callers 1

parseDeviceListResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected