Skip to content

Commit 5c20f36

Browse files
LazarievOlegoleg.lazariev
andauthored
fix(getDeviceTypeFromApp): strip query params and properly detect .app/.zip/.ipa builds (#1738)
Co-authored-by: oleg.lazariev <[email protected]>
1 parent 96647df commit 5c20f36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/device-utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ export const getDeviceTypeFromApp = (app: string): 'real' | 'simulator' | undefi
5858
if (!app) {
5959
return;
6060
}
61-
return app.endsWith('.app') || app.endsWith('.zip') ? 'simulator' : 'real';
61+
/* Remove query parameters from app path */
62+
const cleanAppPath = app.replace(/\?.*$/, '').toLowerCase();
63+
return cleanAppPath.endsWith('.app') || cleanAppPath.endsWith('.zip') ? 'simulator' : 'real';
6264
};
6365

6466
export function isAndroid(pluginArgs: IPluginArgs): boolean {

0 commit comments

Comments
 (0)