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

[BUG] Could not start com.apple.dt.simulatelocation! #106

Closed ctrlcmdshft closed 2 years ago

ctrlcmdshft commented 2 years ago

Describe the bug Fresh install of Location Simulator app will not set location. I ran app via Xcode to see what's going on and this error comes up when trying to set location [ERROR]: Could not start com.apple.dt.simulatelocation!

To Reproduce Steps to reproduce the behavior:

  1. run app try to set location
  2. error pops up saying error changing location, could not change the location

Expected behavior Should Set location

Desktop (please complete the following information):

Smartphone (please complete the following information):

Schlaubischlump commented 2 years ago

Most likely a problem with the iOS 15.4b1 Developer Disk Image. This problem will solve itself, when iOS 15.4 is officially released. Take a look at #105 to find instructions of how to replace the Developer Disk Image file with a working one, which you can find if you google a little bit or search github.

ctrlcmdshft commented 2 years ago

105 didn't work using prior bundles still same issue

Schlaubischlump commented 2 years ago

Prior bundles will not work. pdso has most likely uploaded the wrong iOS 15.4 DeveloperDiskImage. Since you have Xcode installed, you can just copy /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.4/DeveloperDiskImage.dmg and the signature file to the Application Support directory.

ctrlcmdshft commented 2 years ago

Didn't work pulling the files from Xcode so probably another issue idk. Now the app won't even show map like before. Apps blank even after reinstall

Schlaubischlump commented 2 years ago

Strange... That shouldn't be the case. I never had a blank screen. Maybe the saved application state got corrupted. Is your normal maps app working correctly ?

ctrlcmdshft commented 2 years ago

MacOS maps works fine still having issues getting this to work I may wipe my max install and do fresh install soon so I’ll see if that helps

ctrlcmdshft commented 2 years ago

Ok so before wiping and redoing the OS i decided to download Beta 7 and it works fine for me

Schlaubischlump commented 2 years ago

Beta 7 is working, but Beta 8 isn't working ? Which iOS version are you using. Beta 7 has no support for iOS 15 at all.

ctrlcmdshft commented 2 years ago

Yes correct beta 7 is working for me. I’m on iOS 15.4 beta 1

Schlaubischlump commented 2 years ago

I assume you have mounted the DeveloperDiskImage with XCode ? Because otherwise this would definitely not work. Xcode will do this automatically if you connect your iPhone, will Xcode is open.

Strange that Beta 8 is not working... Have you disable SIP (System Integrity Protection) or something like that ? Which Mac OS Version are you using?

ctrlcmdshft commented 2 years ago

Fresh boot open location simulator beta7 connect to phone and it just works. Xcode isn't running and nothing is mounted. Running newest macOS beta.

Schlaubischlump commented 2 years ago

Fresh boot of the iPhone I assume ? If this is the case, than I have absolutely no idea why this is working. Beta 7 does not even include a download link for this DeveloperDiskImage.

bailaowai commented 2 years ago

Hello,

I have the latest beta version and every time I tried to set a location I get the message as per the attached photo.

Any idea on how to fix it?

Thanks, Horst

Schlaubischlump commented 2 years ago

Which iOS version are you using ?

bailaowai commented 2 years ago

The latest.

On Mon, Mar 7, 2022 at 2:19 AM Schlaubischlump @.***> wrote:

Which iOS version are you using ?

— Reply to this email directly, view it on GitHub https://github.com/Schlaubischlump/LocationSimulator/issues/106#issuecomment-1060013503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPI2AGKIMOUFOHHQQVT6B3U6TZMXANCNFSM5NHBY6GQ . You are receiving this because you commented.Message ID: @.***>

Schlaubischlump commented 2 years ago

iOS 15.4 Beta or iOS 15.3?

bailaowai commented 2 years ago

macOS Monterey Version 12.2.1.

On Mon, Mar 7, 2022 at 3:56 PM Schlaubischlump @.***> wrote:

iOS 15.4 Beta or iOS 15.3?

— Reply to this email directly, view it on GitHub https://github.com/Schlaubischlump/LocationSimulator/issues/106#issuecomment-1060287257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPI2AE2T3DQEUJHB7YB6PTU6WZCRANCNFSM5NHBY6GQ . You are receiving this because you commented.Message ID: @.***>

Schlaubischlump commented 2 years ago

This is the macOS version number. This is good to know as well, but most importantly I need to know the iOS version on your iPhone. You can find it in 'Settings' -> 'General' -> 'About'.

bailaowai commented 2 years ago

Sorry, it is 15.3.1.

On Mon, Mar 7, 2022 at 6:40 PM Schlaubischlump @.***> wrote:

This is the macOS version number. This is good to know as well, but most importantly I need to know the iOS version on your iPhone. You can find it in 'Settings' -> 'General' -> 'About' https://support.apple.com/en-us/HT201685.

— Reply to this email directly, view it on GitHub https://github.com/Schlaubischlump/LocationSimulator/issues/106#issuecomment-1060478775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPI2AFWTW2XBKJEBUJLA2TU6XMKPANCNFSM5NHBY6GQ . You are receiving this because you commented.Message ID: @.***>

Schlaubischlump commented 2 years ago

Yeah that makes perfectly sense. I didn't think about iOS 15.3.1... This will most likely require the 15.2 DeveloperDiskImage as well. I'll fix the error and upload a new version in the coming days. Hopefully tonight. I'll update this thread when I have uploaded the new version of LocationSimulator.

bailaowai commented 2 years ago

Thank you. There is no rush.

On Mon, Mar 7, 2022 at 7:14 PM Schlaubischlump @.***> wrote:

Yeah that makes perfectly sense. I didn't think about iOS 15.3.1... This will most likely require the 15.2 DeveloperDiskImage as well. I'll fix the error and upload a new version in the coming days. Hopefully tonight. I'll update this thread when I have uploaded the new version of LocationSimulator.

— Reply to this email directly, view it on GitHub https://github.com/Schlaubischlump/LocationSimulator/issues/106#issuecomment-1060545652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPI2AEOFYBJNL3U35IHKSLU6XQHVANCNFSM5NHBY6GQ . You are receiving this because you commented.Message ID: @.***>

Schlaubischlump commented 2 years ago

I thought I knew what the error is, but I just tested LocationSimulator with iOS 15.3.1 and everything is working as expected on my devices. That means I have no idea why you get this error...

Could you try the following:

  1. Open the folder /Users/YOU_USERNAME/Library/Application Support/LocationSimulator/iPhone OS
  2. If the folder exists, delete all folders inside of it.
  3. If the folder does not exists check if /Users/YOU_USERNAME/Library/Containers/com.schlaubi.LocationSimulator/Data/Library/Application Support/LocationSimulator/iPhone OS exists and delete everything inside of this folder
  4. Reboot you iPhone
  5. Connect your iPhone, open LocationSimulator, wait till the download is finished and see if the same error occurs again
bailaowai commented 2 years ago

It is working now. Thanks!

On Tue, Mar 8, 2022 at 12:39 AM Schlaubischlump @.***> wrote:

I thought I knew what the error is, but I just tested LocationSimulator with iOS 15.3.1 and everything is working as expected on my devices. That means I have no idea why you get this error...

Could you try the following:

  1. Open the folder /Users/YOU_USERNAME/Library/Application Support/LocationSimulator/iPhone OS
  2. If the folder exists, delete all folders inside of it3.
  3. If the folder does not exists check if /Users/YOU_USERNAME/Library/Containers/com.schlaubi.LocationSimulator/Data/Library/Application Support/LocationSimulator/iPhone OS exists and delete everything inside of this folder
  4. Reboot you iPhone
  5. Connect your iPhone, open LocationSimulator, wait till the download is finished and see if the same error occurs again

— Reply to this email directly, view it on GitHub https://github.com/Schlaubischlump/LocationSimulator/issues/106#issuecomment-1060890481, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQPI2AB5JWDY7T4RAN6DMI3U6YWKNANCNFSM5NHBY6GQ . You are receiving this because you commented.Message ID: @.***>

ctrlcmdshft commented 2 years ago

After messing around mine isn't working again still running MacOS Current Beta as Well as iOS Current Beta. After a clean install of LocationSimulator when opening LocationSimulator i get no image of a map or any downloads

Schlaubischlump commented 2 years ago

Problem: Each time apple releases a new beta build you have to download a new version of the DeveloperDiskImage for this beta. This is problematic because:

  1. The repo with the DeveloperDiskImages must be updated before you connect your device.
  2. If LocationSimulator detects that you already downloaded a DeveloperDiskImage for a beta version, it will NOT download the updated image.

Solution: That means each time you upgrade to a new beta version you have to wait ~2 days, until the new DeveloperDiskImage is uploaded on the corresponding github repo and after that perform the steps I mentioned above:

  1. Open the folder /Users/YOUR_USERNAME/Library/Application Support/LocationSimulator/iPhone OS
  2. If the folder exists, delete all folders inside of it.
  3. If the folder does not exists check if /Users/YOUR_USERNAME/Library/Containers/com.schlaubi.LocationSimulator/Data/Library/Application Support/LocationSimulator/iPhone OS exists and delete everything inside of this folder
  4. Reboot you iPhone
  5. Connect your iPhone, open LocationSimulator, wait till the download is finished and see if the same error occurs again

Explanation (technical):

Why did it work then for a short time and why do I have to reboot the iPhone in the steps above ?

If the DeveloperDiskImage is uploaded once to your iPhone, it will not be uploaded again until the iPhone is rebooted. LocationSimulator is not the only program that can upload DeveloperDiskImages. E.g Xcode can do this as well. Lets say Xcode uploaded the correct DeveloperDiskImage before LocationSimulator could upload the outdated one. In this case LocationSimulator will work fine, until you reboot your iPhone (or some other condition unmounts the image) and the DeveloperDiskImage needs to be uploaded again.

Why doesn't the map load ?

Because of a bad coding decision on my side, LocationSimulator will block the UI for a short period of time, while a DeveloperDiskImage is uploaded to your iPhone. If this upload can not be performed or is too slow (because of a wrong DeveloperDiskImage) the UI will block and the app appears to stop responding. Normally this is not a big deal because:

  1. We are talking about ~1 or 2 seconds the UI will block only if no DeveloperDiskImage is uploaded yet.
  2. Even if I change the code, so that the UI does not block, this won't fix the underlying error that the DeveloperDiskImage is wrong. You will just not notice that an error occurred, but it still won't work. Would variant 2. with a nice error message be better than 1 ? Yes definitely. Will it fix my problem: No.

Consequences: The explanations above are the reason, why I don't support beta iOS versions. Once apple has released a stable iOS version the DeveloperDiskImage will NOT change again for this iOS version. That being said: feel free to use beta versions on your iPhone, but don't expect LocationSimulator to fix your corrupted DeveloperDiskImages download once the final or a new beta version is online. You have to fix this yourself by performing the steps mentioned in the solution.