Cannot simulate a moving location in iOS simulator - ios

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.

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.

Not found iOS Simulator in Xcode6.4

I updated Xcode version to 6.4.
Then I deleted all files in /Users/my/Library/Developer/CoreSimulator/Devices.
At first it worked, but now there is no simulator I can switch except my iPhone.
Take a look a picture.
Once I deleted a device file:
/Users/my/Library/Developer/CoreSimulator/Devices
during working simulator.
Is it a cause?
Anyone knows solutions?
Looks like all of your development devices are just not created.
To add devices you want to set the destination to, or output device, on the menu bar: Window > Devices. Then at the bottom left corner there is a add button, there you will create a simulator.

Xcode 6.1 issues while opening the simulator

I have recently started working on IOS app development and was encountering an issue. I have downloaded XCode 6.1.1 and my target SDK is IOS 8.1.
On building and running my application I dont have the mobile/Iphone interface coming up in which I can check my layout how the app will be presented once it is deployed on Iphone. All I get is a rectangular box which is definitely not resizable and I am unable to check my app.
On this rectangular box which is definitely not the one I am expecting, I can see my labels and buttons in a crap state.
I tried changing the SDK version to 7.1, changed the build type from debug to release, change the deployment target to 7.1 also, using Iphone 5S,7.1 simulator also but the issue seems non-resolved.
It looks like you're on 100% zoom, so you should be able to see the full phone by zooming out. In the iOS simulator, in the top bar go to Window->Scale and select 50% or 75%. If the zoom level is the problem, that should fix it. Hope it helps :)

"Simulate Location" seems to get stuck

I am on the latest version of XCode and using iOS 8. I have a scheme with a default location set and it seems to get stuck in the simulated location even on a device. I have tried, setting the location to "None" and unchecking the simulate box, and still on an iPhone 5 it keeps using New York, NY as the simulated location. Curiously, this doesn't happen on the iPhone 6. Any ideas?
Restarting the device seemed to clear this problem.

Xcode 4.3.2, issue with running on simulator

I have been having this weird problem with Xcode 4.3.2, of course after the recent update.
After successfully building and running on the simulator several times, xcode seems to not be able to connect to the simulator and can't even stop the project; it's like the simulator does not exist. I have tried:
Stopping the project – doesn't work.
Quitting the simulator – doesn't work, xcode still shows it's running on the simulator even when I quit the simulator.
Cleaning the project – doesn't work.
I have to force quit xcode to get it communicate with the simulator. Nothing else works. It gets quite frustrating to do it every half an hour. This only started with 4.3.2.
I always stop before building and running, so it is not an issue of simulator/xcode getting thrashed by me.
Any suggestions?
I have found by chance, it is not a solution by any means -
When xcode hangs, saying it is running the app, but nothing is on simulator, opening the simulator from the dock by clicking on the dock icon (not using command+tab) seems to work.
It is very weird,but it works; atelast till xcode fixes it.
I had the same damn issue on XCode 4.5.1, but I resolved it just now.
When the program is running, it gets compiled but doesn't show anything on the simulator. just click on iOS Simulator icon in dock in order to bring it to front. Click iOS Simulator on top left -> Reset content and settings -> then force quit the iOS Simulator and run the program again. !!
Besides a restart, there is one other way I've managed to get around this:
Let's say your app hangs, go to the targets selector in the top of the Xcode window and change your sim target to a new SDK (or if you don't have another SDK, change it to a universal app and run on the opposite device simulator).
Then, when your app loads on the new device/OS completely, quit the sim, change your targets back, et voilà!
Uninstall application from Simulator and again run. Then it will works fine :)
This has frustrated me for -years- now but stumbled across what appears to get things going again for me:
Hide the simulator (iOS Simulator -> Hide iOS Simulator) or Cmd-H, then reopen the simulator.
The problem seems to happen when something CPU intensive is happening in the background (like a Time Machine backup) on my old 2 core MacBook.
Xcode 4.6.3 update (June 13, 2013) resolves the following issue:
Hang when debugging in iOS Simulator on OS X 10.8.4. 13722320
https://developer.apple.com/library/mac/#releasenotes/DeveloperTools/RN-Xcode/
You can try to update your Xcode to see if that works for you..

Resources