@livx.cc/appwrap 0.39.0 → 0.39.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.ts +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/appwrap",
3
- "version": "0.39.0",
3
+ "version": "0.39.1",
4
4
  "description": "Wrap any PWA into a native app with native capabilities (appwrap runtime + @livx.cc/native-kit).",
5
5
  "license": "MIT",
6
6
  "author": "Elya Livshitz",
package/src/cli.ts CHANGED
@@ -1761,10 +1761,14 @@ async function deploy(cwd: string, flags: Record<string, string>, positionals: s
1761
1761
 
1762
1762
  // devicectl process-launch is also stuck when we fell back to usbmux — skip it; the user taps the icon.
1763
1763
  if (!('no-launch' in flags) && !installedViaUsbmux) {
1764
- console.log(`▶ launching ${cfg.id}`);
1764
+ console.log(`▶ launching ${cfg.id} (terminating any running instance first)`);
1765
1765
  try {
1766
+ // --terminate-existing: kill a suspended/running copy before launching, so the FRESHLY installed
1767
+ // binary actually runs. Without it, iOS resumes the old process and you see stale config (e.g. an
1768
+ // old serverUrl) despite a correct new build — masquerading as a build/cache bug. (A reinstall
1769
+ // over the top does NOT replace a running process; this avoids the manual uninstall dance.)
1766
1770
  withUnlockRetry('Launch', () =>
1767
- execFileSync('xcrun', ['devicectl', 'device', 'process', 'launch', '--timeout', '25', '--device', device.id, cfg.id], { encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'] })
1771
+ execFileSync('xcrun', ['devicectl', 'device', 'process', 'launch', '--terminate-existing', '--timeout', '25', '--device', device.id, cfg.id], { encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'] })
1768
1772
  );
1769
1773
  } catch {
1770
1774
  console.error('⚠ Launch failed (still locked after waiting). The app is installed — unlock and tap it, or re-run.');