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

Xcode Build Scheme needs to be updated #78

Closed bslatyer closed 3 years ago

bslatyer commented 3 years ago

Describe the bug Xcode can't build with the Homebrew method due to the location being changed by the Homebrew team to support Apple Silicon systems. So the Xcode Homebrew build scheme needs to be updated to support Apple Silicon Mac Systems using the new location /opt/homebrew

To Reproduce Steps to reproduce the behavior:

  1. Clone Repo
  2. Open in Xcode
  3. Change Team/Bundle ID to my own
  4. Change Build Scheme to Homebrew and select "My Mac"
  5. Build Fails due to libimobiledevice and other required components not being in /usr/local/homebrew

Expected behavior Project should be able to build using the homebrew scheme in the new location /opt/homebrew on Apple Silicon systems

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Thanks for creating this project!

Schlaubischlump commented 3 years ago

Thanks for the info! I'll look into this. I haven't updated my homebrew in a long time...

Why did the old install path not work on Apple Silicon anymore ?

bslatyer commented 3 years ago

All good, the homebrew paths are /usr for Intel and /optARM Macs. The old path wouldn't work due to me upgrading homebrew and forcing me to use the new /opt path

bslatyer commented 3 years ago

Hey, any updates yet?

Schlaubischlump commented 3 years ago

Changing the Build scheme alone isn't enough, since all library paths needs to be changed. If I change the paths to fit the new homebrew paths, I have to change them back if I want to compile and run them on an Intel mac. So either the App crashes on homebrew installations with the old path or the new path. Maybe there is some kind of homebrew prefix I don't know about, but without it I can not support both paths.

Since I only have an Intel Mac with the old homebrew path, I can not test anything.

If you want to run the app:

If you want to compile the app with the new homebrew path: - Manually change the paths according to your platform and compile the app. Since libimobiledevice is not updated yet, you have to compile for the Intel architecture.

If somebody knows how I can support both homebrew path and has an M1 mac to test, let me know and I implement the changes.

Edit: I might have found a way. I changed the Xcode file to include both header / library search paths for homebrew and added the linked libraries as additional linker flags. This should allow compiling the project regardless of which homebrew path is choosen. Could you try to compile the project ?

bslatyer commented 3 years ago

Hi Schlaubischlump,

I'll try to compile the project now as I just saw your edited reply. I'll get back to you soon with an answer to whether it works or not.

bslatyer commented 3 years ago

Ok, here's what I found:

Schlaubischlump commented 3 years ago

Thanks for the feedback. I'll change the paths tomorrow

Edit: I updated the search paths according to your description. It should be working now. I therefore consider this issue resolved.