Schlaubischlump / LocationSimulator

MacOS application to spoof / fake / mock your iOS / iPadOS or iPhoneSimulator device location. WatchOS and TvOS are partially supported.
https://schlaubischlump.github.io/LocationSimulator/
GNU General Public License v3.0
2.39k stars 184 forks source link

Location doesn't change #138

Closed DmitryShipilov closed 1 year ago

DmitryShipilov commented 1 year ago

Hi! I am using Xcode 14.0 and virtual iPhone 13 simulator. When I pick location in LocationSimulator it doesn't change on my iPhone simulator. However, in Xcode 13 it worked correctly. What should I do to simulate location change?

Schlaubischlump commented 1 year ago

Which version of XCode 14 do you use ? It was working fine for me up until 14.0 Beta 2. I haven't tested newer versions

DmitryShipilov commented 1 year ago

Xcode version: Version 14.0 (14A309)

Schlaubischlump commented 1 year ago

Could you update to the lastest version (14.0.1) and report back if it is working ?

DmitryShipilov commented 1 year ago

Ok, I will try. Should I use Xcode project or it is enough to install LocationSimulator from brew?

Schlaubischlump commented 1 year ago

Should be enough to install it using brew.

Since I use an internal API to change the location inside the Simulator, it is more than likely, that Apple changed something and that I need to update LocationSimulator to use a different API.

DmitryShipilov commented 1 year ago

The problem hasn't gone. It seems, Apple has changed API.

Schlaubischlump commented 1 year ago

I just checked it on my machine with XCode 14.0.1 on Ventura. Its working fine for the iPhone 13 mini simulator. The error must be on your machine.

Which version of the Simulator and which version of LocationSimulator are you using ?

DmitryShipilov commented 1 year ago

I've got Monterey 12.6, LocationSimulator: Version 0.1.9 (4), Simulator: iPhone 13 with iOS 16.0 (20A360)

Schlaubischlump commented 1 year ago

Still working for me with the iPhone 13 sim. Did you maybe revoke the permission to access the location inside the Simulator? Or maybe any update screwed up the permission. Does LocationSimulator show any error inside the log ?

DmitryShipilov commented 1 year ago

LocationSimulator log is saying: LocationSimulator[67203:5996629] [MKCoreLocationProvider] CLLocationManager(<CLLocationManager: 0x600003feac20>) for <MKCoreLocationProvider: 0x600001137900> did fail with error: Error Domain=kCLErrorDomain Code=0 "(null)"

Schlaubischlump commented 1 year ago

This looks like a problem with your simulator device. It doesn't have permission to change the location.

Open the settings app inside the iPhone 13 simulator and disable and enable the location permission for LocationSimulator in the Privacy tab. If this does not work, see if you can reset the location services from within the settings app.

This stackoverflow post has some hints you could also try, for example:

I had to clear everything via "iOS Simulator" >> "Reset Content and Settings....

DmitryShipilov commented 1 year ago

It works fine with google maps. Location changes. Thank you.