MCPcopy
hub / github.com/ionic-team/capacitor / getPlatformId

Function getPlatformId

core/src/util.ts:36–44  ·  view source on GitHub ↗
(win: WindowCapacitor)

Source from the content-addressed store, hash-verified

34}
35
36export const getPlatformId = (win: WindowCapacitor): 'android' | 'ios' | 'web' => {
37 if (win?.androidBridge) {
38 return 'android';
39 } else if (win?.webkit?.messageHandlers?.bridge) {
40 return 'ios';
41 } else {
42 return 'web';
43 }
44};

Callers 1

getPlatformFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected