Developer / DVT¶
DVT (DTX Instruments) services power the developer dvt CLI commands. On iOS 17+ they require a
tunnel-backed service provider — see iOS 17+ tunnels.
Each instrument is constructed with a DvtProvider (e.g. DvtProvider(service_provider)), used as
an async context manager; several instruments are async-iterable and yield telemetry/events.
Provider¶
pymobiledevice3.services.dvt.instruments.dvt_provider.DvtProvider ¶
Bases: DtxServiceProvider
Provides access to the DVT (DTX Instruments) services exposed by Apple's
instruments daemon.
The provider opens a DTXConnection on top of a
given service provider and is the entry point used by the individual DVT
DTXService subclasses (process control, device
info, screenshot, etc.).
The underlying service is reached differently depending on the transport:
- over lockdown (
SERVICE_NAME/OLD_SERVICE_NAME) on older iOS versions - over an RSD tunnel (
RSD_SERVICE_NAME) on iOS 17 and later
The provider is meant to be used as an async context manager, which connects the DTX transport on entry and closes it on exit::
async with DvtProvider(lockdown) as provider:
...
It additionally advertises the process-control terminationCallback
capability so that the device reports process termination events.
Source code in pymobiledevice3/services/dvt/instruments/dvt_provider.py
Process control¶
pymobiledevice3.services.dvt.instruments.process_control.ProcessControl ¶
Bases: DtxService[ProcessControlService]
Launch, terminate and observe processes on the device through the DVT
processcontrol instruments service.
Backed by ProcessControlService, this wraps the remote
process-control DTX channel and exposes high-level operations such as
launching an app, killing it, sending signals and waiving its memory limit.
Iterating over an instance yields OutputReceivedEvent objects for
stdout/stderr output emitted by observed processes.
Source code in pymobiledevice3/services/dvt/instruments/process_control.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
signal
async
¶
Send a signal to a running process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pid
|
int
|
PID of the process to signal. |
required |
sig
|
int
|
Signal number to send. |
required |
Source code in pymobiledevice3/services/dvt/instruments/process_control.py
disable_memory_limit_for_pid
async
¶
Waive the memory limit (jetsam limit) for a given process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pid
|
int
|
PID of the process whose memory limit should be lifted. |
required |
Raises:
| Type | Description |
|---|---|
DisableMemoryLimitError
|
If the device declines the request. |
Source code in pymobiledevice3/services/dvt/instruments/process_control.py
kill
async
¶
Kill a process. The request is fire-and-forget (no reply is awaited).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pid
|
int
|
PID of the process to kill. |
required |
process_identifier_for_bundle_identifier
async
¶
Resolve the PID of a currently running process by its bundle identifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_bundle_identifier
|
str
|
Bundle identifier of the running app. |
required |
Returns:
| Type | Description |
|---|---|
int
|
PID of the matching process, or 0 if no such process is running. |
Source code in pymobiledevice3/services/dvt/instruments/process_control.py
launch
async
¶
launch(bundle_id: str, arguments=None, kill_existing: bool = True, start_suspended: bool = False, environment: Optional[dict] = None, extra_options: Optional[dict] = None) -> int
Launch an installed application by its bundle identifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bundle_id
|
str
|
Bundle identifier of the app to launch. |
required |
arguments
|
List of command-line arguments to pass to the process.
Defaults to an empty list when |
None
|
|
kill_existing
|
bool
|
Whether to kill an already-running instance of the app
before launching (sent as the |
True
|
start_suspended
|
bool
|
Start the process suspended, waiting for a debugger to
attach (sent as the |
False
|
environment
|
Optional[dict]
|
Environment variables to set for the process. Defaults to an
empty dict when |
None
|
extra_options
|
Optional[dict]
|
Additional launch options merged into the options dict sent to the device, overriding the defaults on key collision. |
None
|
Returns:
| Type | Description |
|---|---|
int
|
PID of the newly launched process. |
Raises:
| Type | Description |
|---|---|
AssertionError
|
If the device returns a falsy PID (launch failure). |
Source code in pymobiledevice3/services/dvt/instruments/process_control.py
Device & application info¶
pymobiledevice3.services.dvt.instruments.device_info.DeviceInfo ¶
Bases: DtxService[DeviceInfoService]
Query device, process, filesystem and kernel information over the
com.apple.instruments.server.services.deviceinfo DTX channel.
Constructed with a DvtProvider, e.g. DeviceInfo(DvtProvider(service_provider)),
and used as an async context manager to open the channel.
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
ls
async
¶
List the contents of a directory on the device.
Invokes the directoryListingForPath: selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Absolute path of the directory to list. |
required |
Returns:
| Type | Description |
|---|---|
list
|
The directory entries. |
Raises:
| Type | Description |
|---|---|
DvtDirListError
|
If the listing fails or the device returns no result. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
execname_for_pid
async
¶
Get the executable path of a running process.
Invokes the execnameForPid: selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pid
|
int
|
Process identifier. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Full executable path of the process. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
proclist
async
¶
Get the list of running processes from the device.
Invokes the runningProcesses selector. Any per-process startDate
field is normalized to a datetime.
Returns:
| Type | Description |
|---|---|
list[dict]
|
One dict of attributes per running process. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
is_running_pid
async
¶
Check whether a process is currently running.
Invokes the isRunningPid: selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pid
|
int
|
Process identifier. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
system_information
async
¶
Get general system information.
Invokes the systemInformation selector.
Returns:
| Type | Description |
|---|---|
|
Mapping of system attributes (OS build, device name, etc.). |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
hardware_information
async
¶
Get hardware information.
Invokes the hardwareInformation selector.
Returns:
| Type | Description |
|---|---|
|
Mapping of hardware attributes (CPU count, model, etc.). |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
network_information
async
¶
Get network interface information.
Invokes the networkInformation selector.
Returns:
| Type | Description |
|---|---|
|
Mapping describing the device's network interfaces. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
mach_time_info
async
¶
Get the Mach absolute-time clock parameters.
Invokes the machTimeInfo selector.
Returns:
| Type | Description |
|---|---|
|
Mapping with the Mach timebase and current time values. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
mach_kernel_name
async
¶
Get the running Mach kernel name.
Invokes the machKernelName selector.
Returns:
| Type | Description |
|---|---|
str
|
The kernel name string. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
kpep_database
async
¶
Get the KPEP (kernel performance event) database.
Invokes the kpepDatabase selector and parses the returned plist bytes.
Returns:
| Type | Description |
|---|---|
Optional[dict]
|
The parsed KPEP database, or |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
trace_codes
async
¶
Get the kernel trace-code table.
Invokes the traceCodesFile selector and parses the whitespace-separated
<hex-code> <name> lines.
Returns:
| Type | Description |
|---|---|
|
Mapping of integer trace code to its symbolic name. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
sysmon_process_attributes
async
¶
Get the per-process attribute names supported by sysmontap.
Invokes the sysmonProcessAttributes selector.
Returns:
| Type | Description |
|---|---|
list[str]
|
The supported process attribute names. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
sysmon_system_attributes
async
¶
Get the system-wide attribute names supported by sysmontap.
Invokes the sysmonSystemAttributes selector.
Returns:
| Type | Description |
|---|---|
list[str]
|
The supported system attribute names. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
name_for_uid
async
¶
Resolve a user id to its user name.
Invokes the nameForUID: selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uid
|
int
|
Numeric user id. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The corresponding user name. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
name_for_gid
async
¶
Resolve a group id to its group name.
Invokes the nameForGID: selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gid
|
int
|
Numeric group id. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The corresponding group name. |
Source code in pymobiledevice3/services/dvt/instruments/device_info.py
pymobiledevice3.services.dvt.instruments.application_listing.ApplicationListing ¶
Bases: DtxService[ApplicationListingService]
Enumerate the applications installed on the device over the
com.apple.instruments.server.services.device.applictionListing DTX channel.
Constructed with a DvtProvider, e.g. ApplicationListing(DvtProvider(service_provider)),
and used as an async context manager to open the channel.
Source code in pymobiledevice3/services/dvt/instruments/application_listing.py
applist
async
¶
Get the list of installed applications.
Invokes installedApplicationsMatching:registerUpdateToken: with an empty
match filter and no update token, so every installed application is returned.
Returns:
| Type | Description |
|---|---|
list
|
One dict of attributes per installed application. |
Source code in pymobiledevice3/services/dvt/instruments/application_listing.py
Capture & telemetry¶
pymobiledevice3.services.dvt.instruments.screenshot.Screenshot ¶
Bases: DtxService[ScreenshotService]
Capture a screenshot of the device's screen over the
com.apple.instruments.server.services.screenshot DTX channel.
Constructed with a DvtProvider, e.g. Screenshot(DvtProvider(service_provider)),
and used as an async context manager to open the channel.
Source code in pymobiledevice3/services/dvt/instruments/screenshot.py
get_screenshot
async
¶
Capture a screenshot of the current screen.
Invokes the takeScreenshot selector.
Returns:
| Type | Description |
|---|---|
bytes
|
The screenshot image as raw bytes. |
Source code in pymobiledevice3/services/dvt/instruments/screenshot.py
pymobiledevice3.services.dvt.instruments.sysmontap.Sysmontap ¶
Bases: Tap
Sample per-process and system-wide telemetry (CPU, memory, etc.) over the
com.apple.instruments.server.services.sysmontap DTX channel.
Constructed with a DvtProvider (passed as dvt) plus the attribute lists
to sample; prefer the create factory, which discovers the supported
attributes automatically. Used as an async context manager, and is async-iterable:
iterating yields the raw sample rows pushed by the device.
Source code in pymobiledevice3/services/dvt/instruments/sysmontap.py
create
async
classmethod
¶
Build a Sysmontap with the device's full set of supported attributes.
Queries DeviceInfo for the supported sysmon process and system attribute
names and uses them to construct the instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dvt
|
The |
required | |
interval
|
int
|
Sampling interval in milliseconds. |
DEFAULT_INTERVAL_MS
|
Returns:
| Type | Description |
|---|---|
Sysmontap
|
A configured |
Source code in pymobiledevice3/services/dvt/instruments/sysmontap.py
iter_processes
async
¶
Iterate per-process samples, decoded into attribute dicts.
Consumes the raw sample rows, keeps only those carrying a Processes
entry, and maps each process's values onto the requested process
attribute names.
:yields: For each sample, the list of per-process attribute dicts.
Source code in pymobiledevice3/services/dvt/instruments/sysmontap.py
pymobiledevice3.services.dvt.instruments.network_monitor.NetworkMonitor ¶
Bases: DtxService[NetworkMonitorService]
Monitor device network activity over the Instruments networking channel.
Constructed with a DvtProvider. Use as an async context manager: entering starts
monitoring and exiting stops it. The object is async-iterable, yielding decoded
InterfaceDetectionEvent, ConnectionDetectionEvent and ConnectionUpdateEvent
instances as they arrive.
Source code in pymobiledevice3/services/dvt/instruments/network_monitor.py
pymobiledevice3.services.dvt.instruments.energy_monitor.EnergyMonitor ¶
Bases: DtxService[EnergyMonitorService]
Sample per-process energy usage from the Xcode debug-gauge energy provider.
Constructed with a DvtProvider and the list of PIDs to monitor. Use as an async context
manager: entering starts sampling for those PIDs and exiting stops it. The object is
async-iterable, yielding one energy-attribute sample for the monitored PIDs per iteration.
Source code in pymobiledevice3/services/dvt/instruments/energy_monitor.py
pymobiledevice3.services.dvt.instruments.graphics.Graphics ¶
Bases: DtxService[GraphicsService]
Sample GPU/OpenGL graphics performance counters over the Instruments channel.
Constructed with a DvtProvider. Use as an async context manager: entering starts sampling
and exiting stops it. The object is async-iterable, yielding graphics sample events as they
arrive from the device.
Source code in pymobiledevice3/services/dvt/instruments/graphics.py
pymobiledevice3.services.dvt.instruments.activity_trace_tap.ActivityTraceTap ¶
Bases: Tap
Tap the device's unified-logging / activity-trace stream over the Instruments channel.
Constructed with a DvtProvider. It is an async-iterable Tap: iterating yields decoded
log entries (signposts and os_log messages) as message dataclass instances whose fields
follow the table columns advertised by the device. The underlying wire format is a
stack-based opcode stream parsed incrementally; opcodes split across DTX frames are carried
over and reassembled.
Source code in pymobiledevice3/services/dvt/instruments/activity_trace_tap.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
pymobiledevice3.services.dvt.instruments.core_profile_session_tap.CoreProfileSessionTap ¶
Kdebug is a kernel facility for tracing events occurring on a system. This header defines reserved debugids, which are 32-bit values that describe each event:
+----------------+----------------+----------------------------+----+ | Class (8) | Subclass (8) | Code (14) |Func| | | | |(2) | +----------------+----------------+----------------------------+----+ ______/ ClassSubclass (CSC) __________00/ Eventid ___________/ Debugid
The eventid is a hierarchical ID, indicating which components an event is referring to. The debugid includes an eventid and two function qualifier bits, to determine the structural significance of an event (whether it starts or ends an interval).
This tap yields kdebug events.
Constructed with a DvtProvider. Use as an async context manager (async with): entering
configures and starts the session, exiting stops it. While active it can produce a one-time
stackshot and stream raw kdebug buffer chunks.
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 | |
get_stackshot
async
¶
Wait for and parse the stackshot the device emits once per tap creation.
Non-stackshot messages are discarded while waiting. The result is parsed and cached, so subsequent calls return the cached value immediately. Loaded images in the parsed stackshot are annotated with their shared-cache paths where resolvable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
Optional[float]
|
Seconds to wait for stackshot data; |
10.0
|
Returns:
| Type | Description |
|---|---|
dict
|
The parsed stackshot dictionary. |
Raises:
| Type | Description |
|---|---|
ExtractingStackshotError
|
If the timeout elapses, or the device sends a raw kdebug (version 2) buffer instead of a stackshot. |
DvtException
|
If the device reports that kperf is already owned by another session. |
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
dump
async
¶
Stream raw kdebug trace data from the session to a file.
Stackshot and bplist messages are skipped; only kernel trace chunks are written.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
out
|
BinaryIO
|
Binary file object to write the trace data to. |
required |
timeout
|
Optional[float]
|
Seconds to keep dumping; |
None
|
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
pump_kdbuf_chunks
async
¶
Continuously forward received messages into a queue for consumption by a KdBufStream.
Runs until cancelled or the connection ends. On termination or error the offending
exception is placed on the queue; a None sentinel is always enqueued last.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chunk_queue
|
Queue
|
Queue that receives each raw chunk, then any exception, then a final
|
required |
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
get_kdbuf_stream ¶
Wrap a chunk queue in a file-like KdBufStream for reading the kd_buf trace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chunk_queue
|
Queue
|
Queue being fed by |
required |
Returns:
| Type | Description |
|---|---|
|
A seekable, readable stream over the queued kd_buf chunks. |
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
parse_stackshot
staticmethod
¶
Parse raw KCDATA stackshot bytes into a nested dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Raw stackshot buffer beginning with the stackshot KCDATA header. |
required |
Returns:
| Type | Description |
|---|---|
|
The stackshot contents as a dictionary, with construct-internal stream fields removed. |
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
get_time_config
async
staticmethod
¶
Build the time_config mapping required to construct a CoreProfileSessionTap.
Combines the device's mach timebase and absolute time with the host-visible wall-clock epoch and timezone offset taken from lockdown values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dvt
|
DtxServiceProvider
|
The |
required |
Returns:
| Type | Description |
|---|---|
|
A dict with |
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
get_trace_codes
async
staticmethod
¶
Fetch the device's kdebug trace-code table, mapping numeric debugids to symbol names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dvt
|
DtxServiceProvider
|
The |
required |
Returns:
| Type | Description |
|---|---|
dict[int, str]
|
A mapping of debugid code to its trace-code name. |
Source code in pymobiledevice3/services/dvt/instruments/core_profile_session_tap.py
pymobiledevice3.services.dvt.instruments.notifications.Notifications ¶
Bases: DtxService[NotificationsService]
Stream application-state and memory notifications from the device over the
com.apple.instruments.server.services.mobilenotifications DTX channel.
Constructed with a DvtProvider, e.g. Notifications(DvtProvider(service_provider)).
Entering the async context manager opens the channel and enables both
application-state and memory notifications; exiting disables them. The class
is async-iterable: iterating yields each notification payload as the device
pushes it.
Source code in pymobiledevice3/services/dvt/instruments/notifications.py
Conditions & location¶
pymobiledevice3.services.dvt.instruments.condition_inducer.ConditionInducer ¶
Bases: DtxService[ConditionInducerService]
Induce simulated device conditions (such as degraded network or thermal states) via the Instruments ConditionInducer channel.
Constructed with a DvtProvider. A single condition can be active at a time; enabling one
replaces any previously active condition.
Source code in pymobiledevice3/services/dvt/instruments/condition_inducer.py
list
async
¶
List the condition groups available on the device.
Returns:
| Type | Description |
|---|---|
list[dict]
|
The available condition inducers, each a group dict containing an |
Source code in pymobiledevice3/services/dvt/instruments/condition_inducer.py
set
async
¶
Activate the condition profile with the given identifier.
Searches every available group for a profile whose identifier matches, then enables it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile_identifier
|
Identifier of the profile to activate. |
required |
Raises:
| Type | Description |
|---|---|
PyMobileDevice3Exception
|
If no available profile matches |
Source code in pymobiledevice3/services/dvt/instruments/condition_inducer.py
clear
async
¶
Disable the currently active condition, returning the device to normal behavior.
pymobiledevice3.services.dvt.instruments.location_simulation.LocationSimulation ¶
Bases: DtxService[LocationSimulationService], LocationSimulationBase
Override the device's reported GPS location over the
com.apple.instruments.server.services.LocationSimulation DTX channel.
Constructed with a DvtProvider, e.g. LocationSimulation(DvtProvider(service_provider)),
and used as an async context manager to open the channel.
Source code in pymobiledevice3/services/dvt/instruments/location_simulation.py
set
async
¶
Simulate the device being at the given coordinates.
Invokes the simulateLocationWithLatitude:longitude: selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
latitude
|
float
|
Latitude in decimal degrees. |
required |
longitude
|
float
|
Longitude in decimal degrees. |
required |
Source code in pymobiledevice3/services/dvt/instruments/location_simulation.py
clear
async
¶
Stop simulating the location and restore the device's real GPS.
Invokes the stopLocationSimulation selector.