Can't set geolocation on ios real device


I try to set geolocation via command set_location()
When I try to run my script I have the error that:

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Can't set the location on device '4fadcea3bcf9c9e91fdb296513e**********'. Original error: Command 'idevicelocation -u 4fadcea3bcf9c9e91fdb296513e********** 49 123' exited with code null

This is my desired capabilities:
def real_device_iphone_8():
device = {
‘platformName’: ‘iOS’,
‘udid’: ‘4fadcea3bcf9c9e91fdb296513e**********’
‘app’: PATH_TO_APP,
‘deviceName’: ‘iPhone 8’,
‘xcodeOrgId’: ‘G333Q****’,
‘xcodeSigninId’: ’ iPhone Developer’,
‘clearSystemFiles’: True,
‘automationName’: ‘XCUITest’,
‘noReset’: True,
‘platformVersion’: ‘12.2’,
‘locationServicesAuthorized’: True
return device


When I try to run this command via the terminal:

idevicelocation 48.856614 2.3522219000000177

I got this error:

Abort trap: 6

On Android the command:
driver.set_location(48.856614 2.3522219000000177, None)
Works perfect for me


I was able to run like idevicelocation 0 100 on my iPhone SE 12.2, Xcode 10.2.1. Appium calls the command internally.

What about building the binary from the latest code or restarting your device or host machine?


Thank you for your answer!
I will try to do this.


I try to do all that you told me maybe I do something different than you, can you please tell me what did you mean when said: “What about building the binary from the latest code or restart host machine?”


I meant simply restarting your machine or building again.
The error is probably C layer.
So, I assumed building the binary again will help…


Help for me:

brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller