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.53k stars 196 forks source link

[BUG] UI and Map load blank #112

Closed bslatyer closed 2 years ago

bslatyer commented 2 years ago

Describe the bug Upon launch of LocationSimulator, the UI and map do not load causing it to be a blank screen.

To Reproduce Steps to reproduce the behavior:

  1. Open the application
  2. Error occurs after application launch.

Expected behavior The application is meant to display the UI along with the map

Screenshots

Screen Shot 2022-03-16 at 21 28 04

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context This also occurred during the Developer Beta releases of macOS Monterey 12.3

Schlaubischlump commented 2 years ago

I can not reproduce this error. I just upgraded to 12.3. This must be some problem with your configuration. I downloaded the 0.1.8.2 version from the release page and it opened without error.

Screenshot 2022-03-16 at 18 37 19

I'm going to update Xcode as well to make sure that it got nothing to do with the Xcode version. Which version of Xcode do you use ? Did you download the version from the website or compile it yourself ? If you compile it yourself make sure that commit 548d238ff36205c34c91479877315dd095535583 is included in your build.

bslatyer commented 2 years ago

I've got Xcode 13.3 (13E113) on my Mac. I've tried your version (Intel) and my complied version (Apple Silicon), both had the same error.

Schlaubischlump commented 2 years ago

Yes Xcode 13.3 is the problem. No idea why, yet.

SimDeviceSet *set = [context defaultDeviceSetWithError:&error]; in SimDeviceWrapper.m

This line seems to be the problem. Xcode 13 seems to have changed the API to access the simulator devices. This call seems to block forever without a response.

Edit: I'll look into this. For now just comment out the line and compile the project yourself. I'll try to provide a fix on the weekend. In every case this call should definitely not block without an error. This is an apple bug.

bslatyer commented 2 years ago

No worries, thanks for that!

bslatyer commented 2 years ago

@Schlaubischlump, looks like that workaround fixed the issue for now.

Schlaubischlump commented 2 years ago

I found and fixed the error last night and uploaded the changes now. Apple removed a function I was using to simulate the location in the iOS simulator. I fixed the bug and implemented a couple of checks to try to prevent this kind of bug in the future. I'll upload 0.1.8.3 to address the issue, when I got a little bit more time. The source code is updated right now.