@ebowwa/ios-devices 1.0.2 → 1.0.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebowwa/ios-devices",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "iOS device control library wrapping xcrun devicectl, libimobiledevice, and simctl",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/device-ctl.ts CHANGED
@@ -410,20 +410,25 @@ export class DeviceCtl {
410
410
  const apps: InstalledApp[] = [];
411
411
 
412
412
  for (const line of lines) {
413
- // Try parsing bundle identifier and name
414
413
  const trimmed = line.trim();
415
- if (trimmed && !trimmed.startsWith('[') && trimmed.includes('.')) {
416
- const parts = trimmed.split(/\s+/);
417
- if (parts.length >= 1) {
418
- apps.push({
419
- bundleIdentifier: parts[0],
420
- bundleName: parts[1] || parts[0].split('.').pop() || '',
421
- bundleVersion: '',
422
- installPath: '',
423
- platform: 'iOS',
424
- type: 'User',
425
- });
426
- }
414
+
415
+ // Skip header and separator lines
416
+ if (trimmed.startsWith('Name ') || trimmed.startsWith('---') || !trimmed) {
417
+ continue;
418
+ }
419
+
420
+ // Split by 2+ spaces (table format)
421
+ // Format: "Name Bundle Identifier Version Bundle Version"
422
+ const parts = trimmed.split(/\s{2,}/);
423
+ if (parts.length >= 2) {
424
+ apps.push({
425
+ bundleIdentifier: parts[1],
426
+ bundleName: parts[0],
427
+ bundleVersion: parts[2] || '',
428
+ installPath: '',
429
+ platform: 'iOS',
430
+ type: 'User',
431
+ });
427
432
  }
428
433
  }
429
434