iOS: Custom location on a device - ios

I have a location aware app that I am trying to test and the simulator isn't updating my location when I do Debug>Location>Custom Location and enter latitude and longitude coordinates . However, the app is working fine on the phone. Is there a way to enter GPS coordinates (latitude, longitude) to change my current location on my device?

When faced with such problems and you have no other solution then go to File menu of the simulator and reset its contents and settings. Then quit and restart both Xcode and the Simulator.

Related

Why is the iOS Simulator location moving?

I am creating an Uber Clone App and I go the location of the simulator which is Apples location, and when I started the simulator the location started moving, as if someone is following a path around Apple. I haven't made it to where it can move, all my code is doing is grabbing the users location. Can anybody explain why this is happening?
The location in the iOS Simulator can move because it is being simulated by software. The iOS Simulator can simulate various locations for testing purposes. The location can be changed manually in the Debug > Location menu or programmatically through code.
If you're experiencing unexpected movement in the location, it's possible that it's being changed by an app or a test that you're running. If that's not the case, then it might be a bug in the iOS Simulator and you can try restarting it or resetting it to its default settings.

How to fake location iOS

I want to change real location (fake location) on iphone with out jaibreak (not Simulator).
So I think I can add GPX by code.
Any suggest or other solutions?
As #paulw11 says, you have to run your app from Xcode with the device tethered to a USB cable.
Create one or more GPX files and add them to the project. Then in the Xcode debug menu there is an option to simulate location. If you pick one of your GPX locations the device's GPS shows that location.
There is also a option in the scheme editor that lets you pick a default location to use on launch.

Cannot simulate a moving location in iOS simulator

I'm trying to simulate a moving location (freeway drive) on the ios simulator, however it simply doesn't work. The only location that works is the static Custom Location... option.
To reproduce the problem:
open up Xcode>open developer tools>simulator,
open up the maps app
set debug>location to "Freeway Drive"
press the location button in the bottom left corner
It loads for a while, then says:
Current Location Not Available
Your current location cannot be determined at this time
When I open up system.log, I see the message:
SimulatorBridge[41185]: Selected location simulation scenario does not exist
I'm using Xcode 7.1.1 and the iPhone 6s / iOS 9.1 simulator. I've tried:
Setting a default location
Resetting the simulator in Simulator>Reset Content and Settings...
Reinstalling the simulator
but nothing seems to work. Anyone know what I might be doing wrong?
Ok, this may be a problem on Apple's end with Simulator for iOS 9.1.
I downloaded the iOS 9.0 simulator instead (Xcode>Preference>Downloads), fired up Maps in Simulator with the location set to Freeway Drive, and everything works -the location updates.
If you've had trouble simulating a moving location in your own app, just download and use a previous iOS Simulator version like above. Make sure you clean your project in Xcode first (Product>Clean), then rebuild it and everything should work fine.

iPhone location services show wrong place after connecting to XCode

After I connect my iPhone to XCode it starts showing that I am in center of London, however I am on north of Russia. I remember there was an option for simulating location in iOS simulator on Mac, but nothing like that for devices, so I don't know how to disable it.
Uncheck "Allow Location Simulation" in scheme setting.
Select "Don't Simulate Location" when run the app.

iOS simulator and gps

How do I simulate GPS movement on iOS simulator? I am developing an app that uses gps an I need to test it while the user location is changing.. How can I do that? thank you in advance..
From the Features > Location menu of the iOS Simulator, check the Location menu:
Note: The screenshot below is outdated, however the path above has been updated to reflect the proper menu location for this option.
It provides you with several options pertaining to changing the location of the simulated device.
For those that are getting here in 2020, things have changed a little bit,
You'll find the options to modify location settings under Features

Resources