Xcode 6 simulator not deleting sandbox - xcode

Without going on a bizarre snipe hunt into the bowels of ~/Library/Developer/CoreSimulator, I can't seem to remove an app completely from Xcode 6's simulator.
If I run the app the first time, all is good - The app believes it is the first time launched.
(no NSUserDefaults, etc)
If I then tap/hold to delete the app in the simulator, then re-run, all the data is there again-
Ergo it's NOT a clean install launch at this point.
Anyone figure out how to really remove the app from the simulator, as it is not removed as cleanly as it is on the device..

Unfortunately it seems like a bug in the latest simulator. Currently I've only been successful with the "Reset Content and Settings..." item from the "iOS Simulator" drop down menu.

Related

Xcode 8.0 Simulator broken

Something has gone wrong with my Xcode install... I was running my app and seeing odd behaviour within the app itself, for starters I wasn't able to run the build in the simulator.. it'd install and never launch, eventually putting up a dialogue box about being unable to bless the connection to the simulator. I'd had this problem a few days before but it eventually went away, googling just revealed people having issues with the beta builds or beta MacOSX.
Eventually today I rebooted my Mac and having done so, launching Xcode gave me some other error about the simulator, which I didn't properly take notice of. Since then my project no longer lists any simulators to deploy with, if i try to add new simulators the button to add the simulator does nothing and I have to cancel the dialogue box. If I try and run the simulator or watch simulator directly it just beach balls indefinitely and i have to force kill it.
I've created a new user account and within that made a new Xcode project, which also has no simulators.
I've got a zipped backup of my Xcode from before this problem occurred which I've extracted and swapped in place and it makes no difference.
I guess I could do with redownloading the app off the AppStore in hope that the installer would do something to fix this problem.
Anyone got any thoughts on other things I can try?!
Cheers
What is most likely to be the case is that your XCode installation is corrupt. The best thing to do is to delete Xcode entirely and also these directories and files:
~/Library/Caches/com.apple.dt.*
~/Library/Caches/xctest
~/Library/Containers/com.apple.dt.*
~/Library/Developer
~/Library/MobileDevice
~/Library/Preferences/com.apple.dt.*
~/Library/SavedState/com.apple.dt.*
Then reboot your system and reinstall Xcode. Hopefully that should have cleared out the issue.

XCode simulator won't run most recent code

I've been writing an app and I've released one version to the App Store. I've updated it slightly since then and have been playing with it on the Simulator. Unfortunately the Simulator has stopped reacting to the changes in my code. I know it's the simulators fault because if I run the app on my iPad the changes take effect.
I've tried resetting the simulator by going iOS Simulator -> Reset Content and Settings, I've tried quitting the Simulator and Xcode.
I have no clue why the Simulator is not working properly. It's just blatantly not updating.
Clean your project with command+shift+K.
Quit Xcode and clean ~/Library/Developer/Xcode/DerivedData manually. Remove all of its contents.

Simulator in use and even restarting XCode doesn't solve it

I sometimes get a dialog in Xcode which states "Simulator in use." Restarting Xcode didn't help.
I have no Simulator Icon in the Taskbar to quit it and I have no running Simulator.
Is there any solution without rebooting?
I know some of these points to not adress your specific issue since you wrote restarting Xcode would not help you but I'll try to provide a full list of possible fixes for people who might stumble upon this one day.
Is the "Stop" Button in the left corner of Xcode still clickable ? ==> Click It
Try to reset contents & settings of iOS Simulator
Clean Build & Clean Project
Quit iOS Simulator (look at the Activity Monitor if there is still something running)
Restart Xcode
Restart Mac
This is all I can think of. For me most of the times I can resolve it by just restarting Xcode. As you wrote this does not work for you so maybe some of the other points of my list will help you.
Normally this happens when you terminate the iOS Simulator but not the debug session itself, which is why most of the times the "Stop" button in the left corner is clickable most of the times...
This dialog (and the state that triggers it) comes entirely from Xcode and not the simulator itself. This dialog will present itself if Xcode is already using the simulator from another workspace. For example, if you have three projects open at the same time and you do a Build&Run (eg: click "play") in one of them, you will get this dialog if you do a Build&Run in one of the other projects.

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators

Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.
Anybody have a permanent fix or workaround?
Looks like this is a known issue. From the Xcode 5 release notes:
After switching the minimum deployment target of an application from
iOS 7.0 to a release prior to iOS 7.0, building and running the
application may fail with the message “iOS Simulator failed to install
the application.”
Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023
Another release note:
iOS Simulator
If an iOS app is detached, relaunching the same app from Xcode will
result in a black screen in the Simulator even though the new app is
launched. Terminate the app in the Simulator or relaunch it for the
second time. 14648784
Delete the old version app in your simulator (usually iOS 6.x).
Alternatively, header over to iOS Simulator - Reset Content and Settings.
This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.
You need to do this for every iOS Simulator version that causes the problem.
None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!
if you have already developed project and you used xib to develop views then
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.
i got the same problem but solved by following way....
Launch the iOS Simulator
Go and click "iOS Simulator" menu
Click "Reset content and settings"
Close simulator and rebuild your app.
Above screen shot is showing the way how you can do this...
I think this works for you...!!!
Deleting the app in the simulator works for me.
just wanted to add that this happen only if I open xib that created in xcode 4.6
If it's other files, this not happen
try this ....
in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.
None of the above things worked for me. I just reinstalled xcode and it worked.
Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.
/Users/YOURUSERNAME/Library/Developer/Xcode/ --> remove all contents of this folder, then simply launch the app from Xcode.
To check your Executable file settng ex.$(EXECUTABLE_NAME)
(Project setting - info property page)
I have different issue when getting error message “iOS Simulator failed to install application”, the reason is because I have added a property in App-Info.plist without any value. For instance, [Application Category] with no value. Thus the error will show up as well.
When I got this error, the image of the phone actually appeared, but the image of the app I wanted to test did not. Instead, I was on the main page of the phone that shows the apps you have. I fixed this problem by deleting the many icons that appeared on the start screens - about 30 of them. These had been created when I testing apps over the months. So, not saying its a solution, but it started working after I deleted the old app images.
For me it was -framework XCTest.
It made the app die with iOS Simulator failed to install application
and on the device Could not inspect the application package.
Removed it and now works.
You are using Xcode GM which is under beta stage. Use latest Xcode 5.1.1 available.
Also, these error occur while switching between simulator (32 bit and 64 bit).
Quit the simulator and re-build the application. OR
Reset simulator from "iOS simulator" -> "Reset content and settings.."
I changed my app name and bundle id midway. I happened to delete the Executable File name in my plist. I changed it back to "${EXECUTABLE_NAME}" (no quotes) and I'm back in business.

xcode 4.3.2 process hangs

I have run into a rather annoying bug in Xcode 4.3.2.
If you run a process from within Xcode, then stop the simulator directly (outside of Xcode), Xcode still shows the process as running and effectively disables any further interaction with the simulator.
I can't stop the process from within Xcode (no response), and I can't start a new process either as Xcode sees the simulator as being in use. Shutting down the simulator does not notify Xcode either, so I have no option but to shut down Xcode and open it up again But even that does't work as Xcode hangs whilst trying to shut down the process too! So I have to force quit Xcode!
Has anyone found a way round this? I realise I should now only operate the simulator from within Xcode, but I am used to being able to operate the simulator independently.
thanks
I was having similar issues with Xcode 4.3.2. I fixed them by doing the following:
Launch Xcode.
Close any open projects.
Open Organizer.
Delete project form left panel using the gear icon on the bottom left. Select "Remove from Organizer...". This clears all the data about your project that Xcode has cached (indexes, DerivedData, Snapshots, etc.).
5). Re-open project.
Since doing this, my Xcode hanging issues have disappeared.
Here are the steps I follow when this happens:
Start the simulator if it isn’t already running
Choose the option “Reset Content and Settings…” from the iOS Simulator menu
Clean and rebuild the project

Resources