MCPcopy Index your code
hub / github.com/callstack/agent-device / isMobilePlatform

Function isMobilePlatform

src/kernel/device.ts:86–91  ·  view source on GitHub ↗
(device: Pick<DeviceInfo, 'platform' | 'appleOs'>)

Source from the content-addressed store, hash-verified

84}
85
86export function isMobilePlatform(device: Pick<DeviceInfo, 'platform' | 'appleOs'>): boolean {
87 // Phone/tablet device family: Android plus every Apple OS except the macOS desktop
88 // host. Preserves the pre-collapse `platform === 'ios' || platform === 'android'`
89 // set exactly (the old `ios` platform covered iOS/iPadOS/tvOS/visionOS).
90 return device.platform === 'android' || (isApplePlatform(device.platform) && !isMacOs(device));
91}
92
93/**
94 * The PUBLIC leaf platform string emitted to machine consumers (approach b: output

Calls 2

isApplePlatformFunction · 0.85
isMacOsFunction · 0.85

Tested by

no test coverage detected