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.48k stars 190 forks source link

Device randomly disconnects #27

Closed marvinjoa closed 3 years ago

marvinjoa commented 3 years ago

I really like the sleek design and user friendliness of the app. The routing tools are phenomenal.

I have just a problem with the app, its losing it's position every two minutes. And I cant chose a new one without unplugging the cable and plugging it back in.

I'm using the Big Sur beta, if that's making any difference.

Aditionally the search feature seems broken, because the app becomes unresponsive after typing one letter into the search bar.

Schlaubischlump commented 3 years ago

Hi, glad that you like the app!

The search feature was working fine for beta 1-9. Maybe apple changed something for beta 10 or I broke something with the latest update. I have to check that.

Does your device disconnect even if you connect it over USB ? I'm aware that it does disconnect over Wi-Fi. Sadly there is nothing I can do about this, because the device handling routine is implemented in libimobiledevice. If your device is still visible in the popup list, you can just reselect it. This will reset the device connection and you should be able to change the location again.

I'm currently very busy, so I can not promise you, that I find the time to fix the erros, but I'll try my best. I actually wanted to rewrite the app for Big Sur, but Apple broke so many mac OS catalyst features, that I'm not sure wether it's worth the effort or even possible to do.

Edit: Apple broke the search function. Placing a textField inside a toolbar is not possible anymore. I replace the textField with a searchField. I have to see if this breaks support for older os versions.

Schlaubischlump commented 3 years ago

I uploaded a new release, which should fix the searchfield.

marvinjoa commented 3 years ago

Hey @Schlaubischlump,

thanks for updating your software so quickly. I wish I could've fixed it myself, but I'm not a programmer and only no the minimal basics :)

Yes the App will even lose it's location via USB. I even tried to turn off WiFi and Bluetooth to make sure it only connects via USB. But still no luck. My phone isn't locked when it happens, I could understand that when it's locked that it would happen.

Does rewriting even make sense? I feel like the app works, but if you'd just get rid of the bugs it would run fine on Big Sur.

marvinjoa commented 3 years ago

I just tested the search feature and it is working now :) Thank you

Schlaubischlump commented 3 years ago

I might look into the disconnect issues if I find the time. Maybe there is some way to improve the connection.

Rewriting makes sense because the current version includes a lot of code written for older mac OS versions. Big Sur UI changed quite a lot and starting over with a fresh UI would be nice. Currently the app is written in AppKit, if I rewrite it, I would rewrite it in UIKit. That means the app could possibly be ported to jailbroken iOS devices.

marvinjoa commented 3 years ago

Okay, that would make sense. I would be able to use the app on the go.

I might think the disconnection problems mainly occur because of WiFi. I figured that my moms devices would pop up there and my other own devices. It works better (but not perfect) in airplane mode.

Schlaubischlump commented 3 years ago

Yes, I think I found a bug related to the WI-FI implementation inside my app. This will take some time to fix... I'll reopen the issue

Edit: Bug description

If an iOS Device is connected over USB and Wi-Fi and disconnects over Wi-Fi, it will disappear over USB as well.

Schlaubischlump commented 3 years ago

Hi @marvinjoa,

I might upload a new version today or tomorrow. It would be create if you could test it. I rewrote the whole device backend, so there might be a lot of bugs...

marvinjoa commented 3 years ago

Close this issue and comment as soon as you uploaded the new version, so I get a notification :)

Schlaubischlump commented 3 years ago

I uploaded a new release build. It would be great if you could test it a little bit. You should now be able to see an USB or Wi-Fi icon for each device. It should be possible to seamlessly switch between USB and Wi-Fi. Sometimes the map seems to loose focus and you can not navigate anymore using the arrow keys. Somehow I can not reproduce the issue all the time. Maybe try to switch between USB & Wi-Fu and see if some bugs occur. Furthermore I added a settings panel, to ignore network devices or prefer the Wi-Fi connection over the USB connection.

The USB connection should be more reliable. If the Wi-Fi connection had problems before, it will most likely still have problems... There is really nothing I can do about this.

marvinjoa commented 3 years ago

So it happened again, I think I got the hang of it. Even if my main phone is connected via USB and the app finds another phone through WiFi, the connection with the phone via USB stops. It's still present in the latest release / the one you added to your message.

Schlaubischlump commented 3 years ago

This error should be fixed in Beta 5. I hadn't fixed the error in the version I added to the comment. Could you test the Beta 5 version, please ?

marvinjoa commented 3 years ago

So I had time now to try the new release. The Wifi Problem is still present. As soon as the app discovers new phones on the WiFi it will stop my USB connection and lose it's position.

marvinjoa commented 3 years ago

Additionally I would suggest resetting the location should fetch the location of the Mac and set it as the starting location, that would be convenient as hell.

Schlaubischlump commented 3 years ago

I have to think a little bit about this feature. I can see your point, but the whole purpose of resetting the location is to stop the location spoofing. If I set the iOS device location to the location of your mac, then the location on your iOS device is already spoofed. That means there is no way, besides rebooting your iOS device to stop spoofing. E.g If you decide to leave your house your iOS device location won't change although you clicked the reset button.

I might be able to solve this problem by adding a new button which sets your iOS device location to the location of your mac and keep the original purpose of the reset button.

Edit:

I will investigate the Wi-Fi Bug and see if I can reproduce it.

Schlaubischlump commented 3 years ago

I'm unable to reproduce the disconnect error.

What I did:

No error occurred... Am I missing something ? If you change the selection from one device to another, the location spoofing will stop. This is expect behaviour, because I haven't implemented this function yet, as it's a lot of work.

marvinjoa commented 3 years ago

I have 4 devices, 3 off which would be picked up as WiFi Device.

I've done the same as you did, and as soon I receive a notification or unlock another device (or my mom unlocks her phone), it switches to one of the WiFi devices. Then it's saying that it couldn't load the developer image and I have to reselect the phone connected via USB.

Schlaubischlump commented 3 years ago

I'm still unable to reproduce the error. I'll open a new issue and see if more people experience the error.

As a workaround disable Wi-Fi detection by opening LocationSimulator -> Preferences -> Network -> Detect network devices