Linux command
idevicesetlocation 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Set device location
idevicesetlocation -- [latitude] [longitude]
Reset to actual location
idevicesetlocation reset
Target specific device
idevicesetlocation -u [device-udid] -- [37.7749] [-122.4194]
说明
idevicesetlocation sets or resets the simulated GPS location reported by an iOS device, useful for testing location-aware apps. It is part of the libimobiledevice suite and communicates with the device's developer services. Pass `reset` instead of coordinates to clear the simulated location and resume real GPS reporting. Coordinates are decimal degrees: positive for north/east, negative for south/west.
参数
- -u _udid_, --udid _udid_
- Target a specific device by its UDID.
- -n, --network
- Connect to the device over the network instead of USB.
- -d, --debug
- Enable verbose debug output.
- -h, --help
- Display help information.
- --
- Separator before positional coordinates (required when longitude is negative so the leading minus is not parsed as an option).
FAQ
What is the idevicesetlocation command used for?
idevicesetlocation sets or resets the simulated GPS location reported by an iOS device, useful for testing location-aware apps. It is part of the libimobiledevice suite and communicates with the device's developer services. Pass `reset` instead of coordinates to clear the simulated location and resume real GPS reporting. Coordinates are decimal degrees: positive for north/east, negative for south/west.
How do I run a basic idevicesetlocation example?
Run `idevicesetlocation -- [latitude] [longitude]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -u _udid_, --udid _udid_ do in idevicesetlocation?
Target a specific device by its UDID.