I have a problem with my iPhone simulator. Since yesterday when I press Build and run.
Xcode builds the project
Simulator closes the running app
Simulator opens the running app in same state as it closed (multitasking?)
The old build keeps running, I have to quit the simulator before i can run the new build.
I tried cleaning the project, tested with a new project. Same problem. Rebooted everything.
Running Xcode 3.2.4 / 4.1 SDK.
I was going crazy with the same problem. It seems that some people have this problem and some don't. Somehow I stumbled onto this: http://openradar.appspot.com/8915498
Basically, it says that if you're running the iPhone simulator on a different volume than the xCode app, there is some problem with updating the simulator and you have to restart each time.
I almost ignored the fix because I only use one volume, but I DO use filevault for my home folder. Since the Library/Application Support/iPhone Simulator was in my /Users/[me] directory, I guess it's a different volume.
So, what I did was:
1) Go to /Users/[Me]/Library/Application Support/iPhone Simulator and renamed to "old-iPhone Simulator" (just to get it out of the way without deleting)
2) Go to /Library/Application Support and create a new folder called "iPhone Developer"
3) Open Terminal and enter: ln -s "/Library/Application Support/iPhone Simulator" "/Users/[Me]/Library/Application Support/iPhone Simulator"
Viola! Worked like a charm for me! Now iPhone simulator shows me the changes I make every time I push "Build and Run" without any other hassles! Yay!
3)
I added a Run Script to my target to work arround the issue
killall -9 "iPhone Simulator"
Not a proper fix, but works for now.
Related
I'm getting a weird bug on Xcode 4.5. When i tried to run my application on Ipad 2 from xcode with iOS 6, I'm getting this error.
I done the following methods to run the application, but no luck.
Cleaned the project and run
Restarted the device
Restarted xcode
I have a valid certificate in my machine and the application is installing on the device but it's not launching automatically. What could be the issue ?
Thanks in advance
That is really annoying. This error happens in a number of different situations. Sometimes restarting the Xcode, fixes the problem. If not, follow these steps:
Disconnect your device.
Delete the app from your device.
Quit Xcode (Do not just simply close the window, quit it)
Delete derived data folder (~/Library/Developer/Xcode/DerivedData/-gbrvhlvwmpiobxdujegtghggrffp - or something like that)
Now start Xcode once again, connect device and run the project. It should work fine.
from DhilipSiva blog
I just tried to get my own app on my iPhone without a developer account. The following are steps I did:
I patched Xcode and my project (Currency.xcodeproj) with JailCoder
I want to build the project with "iOS device" in Xcode. But I got a error message like "no device found". So I ran it in the emulator and I got the currency.app-file in /Users/Dogan/Library/Developer/Xcode/DerivedData/Currency-gjxrulouxbmjslbzslsplyehgfgm/Build/Products/Debug-iphonesimulator
SSH to iPhone in /var/mobile/Applications
Creating a new folder named FADE9826-4878-4458-B5BE-90AD4EB60FDF (I have to take a valid UDID. Have I use to specific tools to create a UDID? I have the UDID from an other example). I also created a directory in this folder with the name "Documents".
chown -R mobile FADE9826-4878-4458-B5BE-90AD4EB60FDF
scp -r Currency.app root#IP-ADRESS-OF-IPHONE:/var/mobile/Applications/FADE9826-4878-4458-B5BE-90AD4EB60FDF/
Restarting Springboard in SSH with "killall SpringBoard"
I got the app, but it doesn't work. Every time on click, it crashes and kicks me to the home screen. Had I missed something?
You missed that simulator builds don't work on iPhones, because they are built for the wrong CPU type. Simulator builds are Intel x86 apps, and the iPhone has an ARM CPU.
There might be other problems (I don't know how jailcoder works) but there's no way you're getting the simulator build running on the phone.
After downloading Jailcoder and going through the guided patch of Xcode and then patching your project, if your device is plugged into your computer, select the target type (where you can select simulator, iOS Device, etc.) and there should be a listing of your device's name.
Initially I started building an iPhone app (App still in development stage) using Xcode 4.2, it was working fine on both device and simulator.Later, we wanted to add support for iPhone 5 (4 inch display). When I ran it on Xcode 4.5 (including Default-568h.png), it was working fine (on the simulator both 3.5 inch and 4 inch). But when i tried to run it on device, it keeps on giving me the error
"Could not launch appname.app” No such file or directory (/Users/<user>/Library/Developer/Xcode/DerivedData/appname-ffotpypmbvaguyhfvnnejhjotpbp/Build/Products/Debug-iphoneos/appname.app/appname).
I tried the following steps, but no luck :(
Deleted the app from device. Restarted the device.
Quit XCode.Trashed all folders from `DerivedData.Cleaned the project. Restarted
machine.
Set Build for active architectureto YES
Deleted Required device capabilities from -info.plist
Do I have any other options to try, or should I repeat these again and again?
The last time I had a similar issue, a normal clean wasn't enough, as it left some derived data. In Xcode, select the Product menu and hold down the option key to reveal "Clean Build Folder...", or even better, close Xcode and delete /Users/<user>/Library/Developer/Xcode/DerivedData/ entirely.
I have updated my Mac to 10.6.7 with Xcode 4. I am trying to build and run some projects which has downloaded from Internet. I set the deployment target as 4.1/4.2/4.3 and device family as 'iPhone' and trying to build and run the application in Simulator. For ex: i downloaded a project from the following link from GitHub:
http://www.icodeblog.com/2010/10/07/cloning-uiimagepickercontroller-using-the-assets-library-framework/
I set the deployment target as 4.1 or 4.2 or 4.3 and device family as 'iPhone' and trying to build and run the application in Simulator. But Simulator launches and stuck up infinitely. I had to do force quit of simulator, i checked so many times, but the same result. But at the same time, i'm able to build and run some other my projects without any issues. This is happening only for few projects when i run.
What could be the reason here? Is there any settings that i need to make-up?
Please advise me.
Thank you in Advance!
Trash your /Users/{Your name}/Library/Application Support/iPhone Simulator/ directory and rebuild the projects you are having trouble with.
#Kirby Todd Answer perfectly correct with a small change
notifications doesn't show/ doesn't scheduled in Simulator but works in device Problm on Simulator 4.3?
Make Sure we put a copy of "User's" folder existed in iPhone Simulator folder
Thank U #Kirby Todd
I have a fresh iPhone project. When I "Build and Go":
Error from Debugger: Failed to launch simulated application: iPhone Simulator failed to install the application.
Why is that?!
You need to remove the folder as sudo ~/Library/Application Support/iPhone Simulator
sudo rm -Rfv ~/Library/Application\ Support/iPhone\ Simulator
It looks like previous versions of the SDK have some kind of permission trouble.
You don't have to sign code to run in the simulator, only for running on real devices.
Was the app running in the simulator successfully before? If so, did you make changes to the app since? Maybe try rolling them back until it starts working again to identify where the problem is.
Can other apps run in the simulator, or is the problem isolated to one particular app?
Take a look at this article.
Have you tried opening the simulator from /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
and checking if anything (ie Mail, Safari, etc) works in the simulator? That'd tell you at least whether the Simulator is broken or there's something wrong with deployment.
I had this problem too! I deleted the folder "/Library/Application\ Support/iPhone\ Simulator" in my user directory. Started the simulator again and it started right up.
I ran into a similar situation where my home directory was on an NFS share. Deleting my "~/Library/Application Support/iPhone Simulator" directory didn't help, but sym-linking that directory to a location on my local disk did fix the problem.
I just solved this problem by reinstalling the SDK (iphone_sdk_3.1_beta_3__leopard) and restarting my machine.
After renaming the application the app would not launch in simulator. I was getting the above error. I tried most of the suggestions above, checked all my settings in the plist, also checked the build settings, and nothing worked. What worked for me was to reset the simulator.
try to "reset content and settings" on ios simulator menu