XCode simulator won't run most recent code - xcode

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.

Related

Xcode 6 simulator not deleting sandbox

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.

Xcode 5 IOS simulator black screen and app install fails

I just updated my xcode to work with ios7. Now whenever I make a new app, even if its set to build for ios7, I get an error in the simulator when running. It says that the install failed, even if I just made the project and haven't coded anything into it yet. The simulator also shows a black screen. I have tried the reset content, and it didn't work. I saw something somewhere saying to delete the Iphone Simulator folder in application support, but no such folder seems to exist. What can I try to do?
Update--
With some additional research, I found that Iphone Simultor is in the Xcode.app now, but I don't know what to delete. There are many files under the iPhone Simulator Folder. If I delete the actual app, it just doesnt open. Any ideas?? I dont even get an iphone on the screen, just a black window...
Update 2:
Even when I just go to open developer tools -> iphone simulator
it still gives me just a black screen....
Update 3
I just re-installed X-code, and all works now! Strange....I have no idea what happened...But I thought I would let y'all know for others who have similar issues.
Deleting the iOS Simulator folder of the iOS version in question in
/Users/xxx/Library/Application Support/iPhone Simulator
helps, but then you always have to repeat all the settings you made in the simulator (language, for example). Try to press the home button and then delete your app like you do it on a real iOS device. You should then be able to install it again.
This seems to be a known issue.
When simulator open - Go to iOS simulator tab -> reset content and settings..
Work for me.
Perhaps this answer will help?
The simulator should be in this folder:
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iOS Simulator.app
Make sure any #try and #catch(NSException *exception) {} blocks are not commented or are working properly.
This is a version mismatch between your OS X version and your Xcode (iOS simulator)
and it seems that you have upgraded your OS X so Xcode needs to be upgraded as well, Check the versions that match with each other.
You need to upgrade your Xcode which will upgrade iOS simulator.
Good Luck,

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.

IOS Simulator cannot find sdk and the simulated application quit errors

I have been having this Xcode problem for a couple of months where my iOS simulator stops working whenever i run any application on Xcode and says, "The simulated application quit." and "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." I am running Xcode 4.3.3 and have iOS sdk 5.1 and everything updated but it happened on my previous version of Xcode also. I have tried reinstalling Xcode over 10 times now and have been posting this question for a while now. No one has been able to get a solution. I have even sent in a bug report to apple but i don't think they will respond. I have tried doing everything every other person that has this problem has been told to do in other threads. I'm honestly thinking about just buying a new mac and seeing if Xcode will work on that one or taking in my current one to get looked at by apple. So if anyone has any ideas please let me know.
Go to Xcode -> Preferences -> Downloads and make sure the "Target SDK" you have selected in your project is in fact installed under the Downloads windows. For me this magically was uninstalled. Once i installed the SDK that my app was using, all worked again
This worked for me: http://www.colinbowern.com/posts/the-simulated-application-quit
I just deleted the folder "6.1" under ~/Library/Application Support/iPhone Simulator
The I just launched again the app and the simulator recreated correctly the 6.1 folder.
Resetting the simulator settings (iOS Simulator > Reset Contents and Settings) resolved this issue for me.
I had the same issue. For me suddenly all the installed simulators (4.3 through to 6.0) stopped working. I then went to Xcode -> Preferences -> Downloads, and there I had the chance to update at least the 5.0 simulator. This is now working, yet I was not able to get the 4.3 or 5.1 or 6.0 to work.
I have personally experienced a weird thing with xcode regarding this issue. Sometimes the sdk is installed properly but it still gives this error. I have two classes, if I call first class from the app delegate then the ipad simulator works fine but when I call the second class then it gives the error that the sdk needs to be re-installed.
In my case when the error occured, I had two errors in the second class. When I corrected the errors after debugging, the ipad simulator started to work completely fine. This is quite weird but its not the problem with your sdk, the problem is somewhere in the code.
This just happened to me. I tried to launch with iPhone 5.1 Simulator, got the error "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." I tried running iPad 5.1 Sim, which worked. I switched to non-retina iPad. Then I tried running iPhone 5.1 Simulator again, and it worked.

BreakPoint are not working in ipad?

I have seen many question like this before but in my case it is not working only on iPad.
I have breakpoints that are not working in iPad but when I Run my application on Simulator or on the iPhone all the breaking point are working properly.
I have tried install SDK again, Delete the previous build, clean , clean all target & Load Symbols Lazily.
Try deleting the app from the iPad, restart, clean the project, run normaly, stop, activate breakpoints, and re-try.
Sometimes when Xcode is started and device is already connected to MAC, the device appears in XCode even if the device iOS version is higher than the XCode iOS version. At this time the break point doesn't work.

Resources