Post

Replies

Boosts

Views

Activity

Copy app files using devicectl
Hi, I'm trying to retrieve app icons from an iOS device by using devicectl. Unfortunately, the appIcon command was broken when I first tried it, it worked for the last couple of months, but with the new macOS/Xcode, it is no longer working. Reference: https://developer.apple.com/forums/thread/738793 As a result, I'm now looking for alternative ways to fetch and app icon. When retrieving a list of apps using devicectl, the app file location is returned, e.g. /private/var/containers/Bundle/Application/57ABEEB5-D488-4215-8C9B-8951BA401B33/WhatsApp.app for WhatsApp on my iPhone. The .app file contains the app icon and therefore I'm wondering if it's possible to copy this file to my Mac. xcrun devicectl device info files -h mentions file options: FILE OPTIONS: --username <username> The username of the user we should target. Only relevant for certain domains. --domain-type <domain-type> The file service domain. Valid values are: temporary, appDataContainer, appGroupDataContainer, systemCrashLogs. You must specify a valid domain and identifier pair. Certain domains must be accompanied by an identifier that provides additional context. For example, if the domain is an app data container, the identifier is the bundle ID of the app. For temporary directories, the identifier is a unique client-provided string which is used to get your own space, separate from those of other clients. --domain-identifier <domain-identifier> A unique string used to provide additional context to the domain. The domain types are: temporary: for temporary directories, only to get your own space appDataContainer: container identified by app identifier appGroupDataContainer: container identified by app group identifier systemCrashLogs: crash logs The .app file is located in the /private/var/containers/Bundle/Application directory. The available domain types do not seem to include a way to access this file? Is there a way to copy .app files using devicectl? How can I effectively use the .app paths returned by the apps command?
1
0
252
Oct ’24
Using devicectl to observe Darwin Notifications
Hello, I'm trying to use devicectl to observe Darwin Notifications on my iPhone. Instructions: OVERVIEW: Observe a Darwin notification on a device. Note that this command will wait for 300 seconds by default before exiting. You can override this by providing a different --timeout value. USAGE: devicectl device notification observe --device <uuid|ecid|udid|name> --name <name> ... [--verbose] [--quiet] [--timeout <seconds>] [--json-output <path>] [--log-output <path>] DEVICE OPTIONS: -d, --device <uuid|ecid|udid|name> The identifier, ECID, UDID, or name of the device. COMMAND OPTIONS: --name <name> The name of the Darwin notification. This can be passed multiple times to observe multiple Darwin notifications. OUTPUT OPTIONS: -v, --verbose If given, provide more logging output than normal. -q, --quiet If given, output will include only errors. -t, --timeout <seconds> The overall command timeout in seconds. If this limit is exceeded the command is abandoned as a failure. -j, --json-output <path> An optional path to write a JSON file with command results. Note: JSON output to a user-provided file on disk is the ONLY supported interface for scripts/programs to consume command output. -l, --log-output <path> An optional path to write all logging otherwise passed to stdout/stderr. OPTIONS: --version Show the version. -h, --help Show help information. Executed command: xcrun devicectl device notification observe --device *** --name com.example.Notification Result: Darwin notification observation started. 300.0 seconds remaining: On iOS, I'm posting a Darwin notification using: CFNotificationCenterPostNotification(center, CFNotificationName("com.example.Notification" as CFString), nil, nil, true) My CFNotificationCenterAddObserver on iOS does receive this notification. But the devicectl does not. Also no results when I remove the observer on iOS. How can I send a notification in such a way that it is picked up by the devicectl observer?
2
0
603
Feb ’24
devicectl appIcon command not working
Hi, I'm trying to use the appIcon command of devicectl. I'm connecting to an iPhone 14 Pro running iOS 17.0.2. xcrun devicectl device info appIcon --help OVERVIEW: Request app icon generation from this device. This command searches for an app installed on this device and requests for its icon to be generated. USAGE: devicectl device info appIcon [<options>] --device <uuid|ecid|udid|name> --allow-placeholder <allow placeholder> --width <width> --height <height> --scale <scale> DEVICE OPTIONS: -d, --device <uuid|ecid|udid|name> The identifier, ECID, UDID, or name of the device. COMMAND OPTIONS: --app-bundle-id <app bundle identifier> Look for app icon information with the given application bundle identifier on device. Note: If both app-bundle-id and app-path are provided, only app-path will be used. --app-path <app path> Look for app icon information at the given application path on device. Note: If both app-bundle-id and app-path are provided, only app-path will be used. --allow-placeholder <allow placeholder> Allow placeholder icons to be generated. Note: Passing `true` will allow placeholder icons to be returned. Allowing placeholder icons will ensure no I/O is done on device. If you want to make sure you get the icon most accurate to your request -- which could use more resources on the device -- set this to `false`. --width <width> Request app icon generation with the specified width. --height <height> Request app icon generation with the specified height. --scale <scale> Request app icon generation with the specified scale. --destination <destination> Write the image (in png format) to the provided file on the host device. OUTPUT OPTIONS: -v, --verbose If given, provide more logging output than normal. -q, --quiet If given, output will include only errors. -t, --timeout <seconds> The overall command timeout in seconds. If this limit is exceeded the command is abandoned as a failure. -j, --json-output <path> An optional path to write a JSON file with command results. Note: JSON output to a user-provided file on disk is the ONLY supported interface for scripts/programs to consume command output. -l, --log-output <path> An optional path to write all logging otherwise passed to stdout/stderr. OPTIONS: --version Show the version. -h, --help Show help information. I've tried multiple variations of parameters and both apple-bundle-id and app-path, but always receive an error. xcrun devicectl device info appIcon --device *** --app-bundle-id *** --app-path *** --allow-placeholder true --width 60 --height 60 --scale 3 --destination icon.png -j icon.json -t 10 -v With JSON output "error" : { "code" : 6007, "domain" : "com.apple.dt.CoreDeviceError", "userInfo" : { "NSLocalizedDescription" : { "string" : "CGImage was nil when attempting to write to a destination." } } }, Without JSON output 09:32:42 Acquired tunnel connection to device. 09:32:42 Enabling developer disk image services. 09:32:42 Acquired usage assertion. Application Icon Image Information • Is Placeholder - false • Size • Height - 0.0 • Width - 0.0 • Scale - 0.0 • Pixel Size • Height - 0.0 • Width - 0.0 Has anyone managed to successfully extract an app icon using devicectl?
4
0
1.4k
Oct ’23