Anyone have an idea about this
Error launching remote program: No such file or directory (/Users/muself/Library/Developer/Xcode/DerivedData/myproject-hlelojuljidnnagbdqzliazpdgmn/Build/Products/Debug-iphoneos/myproject.app/myproject).
The project was working fine with the previous Xcode versions. I have just updated the Xcode to Version 4.3.2 (4E2002), & the error start coming.
I have search on the web, and tried a lot of the options like
Quit Xcode, clear the Derived Data folder, restart the Xcode.
Rename the project,
Reset the device,etc
I also tried this on another machine but did not work, the same problem occurs.
But one thing i have some other projects as well and they are working fine.
Thanks for at least reading this.
First try restarting Xcode. If it doesn't work, then try hard reset of your device. This happens to me when I change the bundle identifier of my app.
This solution,I found of the above problem its working fine for me.:)
have you tried to "validate settings" (button on the bottom of project settings)? Do you use some static libs in your app? – Vov4yk
Check your deployment target. I am running Xcode 4.5, and it gave me that cryptic message, while the reason was that my iPad is running version 5.1.1, and my app was set with deployment target of 6.0.
I also get same problem. This below solution works for me.
Thats really annoying. This error happens in a number of different situations. Sometime restarting the Xcode, fixes the problem. If not, follow these steps:
Disconnect your device.
Delete the app from your device.
Quit xcode (Don't just simply close the window, quit it)
Delete derived data folder (~/Library/Developer/Xcode/DerivedData/APPNAME -gbrvhlvwmpiobxdujegtghggrffp - or something like that)
Now start Xcode, connect device and run the project. It should work fine.
Source: http://dhilipsiva.com/2012/07/24/xcode-could-not-launch-app-no-such-file-or-directory-error.html
Hard reset of the device fixed it for me. i.e. power off and back on.
Quitting Xcode, disconnecting, reconnecting the device etc didn't.
The error occurred just after I had created a new project with the a duplicate Bundle Identifier to another. Both apps coexist OK on the device/ in Xcode, but this does seem to cause the above issue.
I saw this when I let the build configuration set up as ad-hoc. After I put it back to Debug it worked fine.
Related
I am facing a weird issue while running my project on the device. I see below error even though the app file is present in the mentioned path. Also the project gets copied in the device & I need to tap on app icon to launch it but it fails while launching from XCODe. Any clue - is this because of spaces in my schema name?:
error: failed to launch '/Users/abhi/Library/Developer/Xcode/DerivedData/MyProject-atlkwwnwccqaopgembmyzeecthfx/Build/Products/QA - Debug - Production-iphoneos/MyProject.app/MyProject' -- No such file or directory (/Users/abhi/Library/Developer/Xcode/DerivedData/MyProject-atlkwwnwccqaopgembmyzeecthfx/Build/Products/QA - Debug - Production-iphoneos/MyProject.app/MyProject)
Delete app from your device, switch OFF and ON your device, clean your code and then run it on device, it will install..
If not Restart your Xcode...
I have tried this when i have faced same problem and this one worked for me
Tried advice by Sree Charan with no success for XCode 4.3.3. Ultimately (and I'm not sure this is what fixed it), I went to Validate Settings on the Editor Menu and it updated settings from GDB to LLDB and then it worked.
I'm only providing the info above in hopes it might help someone else. I have no way to verify that is what fixed this problem (and I spent 2 hours looking for a solution).
when i compile my app, Xcode just says "Attaching to Projectname..." and gets stuck there.
The debugger just prints this out:
error: failed to attach to process ID 0
I tried to clean & build again and it still doesn't work out. I googled but couldn't find anything helpful.
How can I fix this problem? Thank You!
The solution for me was to delete everything Xcode has generated earlier:
the App on the Simulator...if this is not possible because you cant
reach the Homescreen, you can delete the App directly under
~/Library/Application Support/iPhoneSimulator/6.0/Applications
delete the Derived Data in the Organizer under Projects or directly
in ~/Library/Developer/Xcode/DerivedData
clean the Build Folder by choosing "Product" in the MenuBar and click
while you press the Alt-key on "Clean Build Folder"
Restart Xcode
Have you tried closing down the simulator entirely, or failing that, reset the simulator and all its contents usually does the trick.
What finally got the simulator working again for me was deleting everything under Library/Application Support/iPhone Simulator/ within the user directory. What I think caused the problem for me in the first place was trying to use a directory named 'Resources' as described here: https://stackoverflow.com/a/1265168/649
This happened to me when I had two xcode projects open with the same bundle identifier.
Solution: leave only one project open which has the same bundle id.
Lindemann's solution worked for me. Nonetheless, during further development I came across another situation that generates this problem: if you create a folder reference (blue folder on Xcode's file explorer, as opposed to the yellow ones which are just groups) called "Resources" the same issue will arise. The solution in this case is to simply rename that folder.
After this, follow Lindemann's solution.
I had similar issues when i installed XCode 4.5 on OS X Mountain Lion. I searched a while and tried some fixes but what finally solved the problem was adding "127.0.0.1 localhost" to my hosts file (/etc/hosts).
Here is what i have done:
Open a terminal shell with cmd+space > terminal
type in "cd /etc"
type in "sudo nano hosts"
type in your root password
add "127.0.0.1 localhost"
save with ctrl+o > return
close with ctrl+x
log out and log in again or restart
Ctrl-Shift-Option-K (same as holding down option and selecting Product ... Clean Build Folder) has always worked for me.
What seemed to work for me was build & run my code so that it opened the Simulator, then hold down on the Simulator Icon in the Dock and select Options -> Keep In Dock
After this I just closed the simulator and launched it from the dock and deleted the app from the home screen on the simulator.
Build & Run the app from XCode and everything seemed to be OK again.
There seems to be quite a lot of things that can cause this error, but for me it turned out to be that I was missing the key CFBundleIdentifier from my plist.
Added it back, and the simulator started normally.
Also make sure none of your file/group name collide with the projects default settings.
Things started breaking for me when I added an info.plist file to my project (Bad Idea). Same happens when you add a "Resource" Group. I don't have an exhaustive list, but if someone does please do share.
Cleaning out / Renaming these conflicting files and following the solution provided by Lindemann(https://stackoverflow.com/a/12504712/2069749) solved the problem for me.
What worked for me was that I realized i was messing with the project settings and accidently removed the info-plist section. After specifying the plist file again properly, it worked. Hope that helps someone.
You need to change the debbugger LLDB to GDB. This helped me start my program in the simulator.
If you are using a network account, you should replace the "~/Library/Application Support/iPhone Simulator" with a link to a local directory. This worked for me after trying everything else.
Make sure you do not have an invalid build rule, that will cause this error, happened to me once (I had added a build rule by mistake and left it invalid).
I had the same problem, in my case i have left the ios simulator open in one user account and switched (without logout the previous one) to another user account. I couldn't event able to open ios simulator to clear and reset its settings. [Shows could no open ios simulator OSStatus - 10829]
My solution:
I quit the simulator in the first user account and then came back to second user account, every thing is working fine.
try to do next steps:
Go to Product/Scheme/Edit Scheme then select Run section.
Select Info Tan and set Debugger None.
Run project. It must be working (without debugger)
Go back to Edit Scheme and selecet debugger LLDB
Run project. It is working.
Maybe additionally you need to delete derived data and do Product/Clean
Can't tell you how frustrated I am trying to narrow down the cause of this one. Took me hours. Trial and error here and there.. all leads to nothing until one comment in one of the threads relating to this mentioned about "Executable". Boom! I remember the plist key "Executable file" in my project plist (PROJECT-info.plist). So I got there and found out that that entry was missing. I filled it in with whatever default you see when creating new project, "Executable file" paired with "${EXECUTABLE_NAME}". Build + Run. Then it finally worked!
Btw, I did try all those deleting/resetting stuff found all over SO. None of them works.
If resetting content and settings in the Simulator doe snot work for you, make sure that there is an entry for localhost in your /etc/hosts file:
127.0.0.1 localhost
Some programs can delete the line or comment it out (#) or even delete your /etc/hosts/ file completely. I tried everything described, but once I added localhost back to the file, the simulator worked perfectly for me.
What worked for me was to select 'Delete Derived Data' from the Projects tab in the organiser.
I fixed my problem by I making a new blank project and importing all the old files.
It must have been a problem with Xcode because it worked before iOS 5.1.
After much frustration I've finally got an application to run on an iPad without errors. However it doesn't run. It gives the following error. My application does run on the simulator but doesn't run on an iPad and gives the below error. I'm really not sure why. I went to the described folder the structure of the folder is as follows.
Products
.DS_Store
Debug-iphoneos
.DS_Store
sampleproject.app
sampleproject.app.dSYM
Debug-iphonesimulator
.DS_Store
sampleproject.app
sampleproject.app.dSYM
error: failed to launch '/Users/x/Library/Developer/Xcode/DerivedData/sampleproject/Build/Products/Debug-iphoneos/sampleproject.app/myProject' -- No such file or directory (/Users/x/Library/Developer/Xcode/DerivedData/sampleproject/Build/Products/Debug-iphoneos/sampleproject.app/myProject)
Just had the same error on Xcode 4.3.2, with target iPad3 5.1, but was able to build and run on my device after these steps:
Deleted my DerivedData directory (emptied trash too)
Quit XCode
Disconnected iPad USB
Rebooted Mac
Rebooted iPad (power down and back up)
Reconnected iPad USB.
Restarted Xcode with project
Confirmed build for debug on device selected.
Clicked Run
I've no idea whether all these steps are mandatory. This is a crummy answer, since it neither explains the problem, nor offers a sure fix. I expect better of Apple; I've looked for a better answer, but found nothing.
Rebooting to solve problems is no solution! OTOH, it let me proceed on with my work, so...a small blessing.
Deleting the DerivedData directory and restarting Xcode worked for me. Simple restart of xcode did not.
Following Tarryn's suggestion to delete DerriveData leads to another problem "No Code Sign found", which brings my attention to the Code Sign section in my Build Setting. The Code Sign for Debug is set to "Don't Allow". Changing it back to my iOS developer profile solves the issue.
If anyone gets this problem and follow the path Tarryn suggested, there is one more step you can try to work this out.
Very frustrating, but in the end a simple exit XCode and restart XCode seemed to clear the issue.
Firstly quite the Xcode and restart, it'll run finely..
restarting the Mac fixes for me.
under /DerivedData: rm -r sampleproject
-> disconnect ipad -> reboot ipad -> reconnect ipad
-> quit & relaunch XCode
it worked for me, hope it helps!!!
Restart Xcode and it works again.
Another cause of this problem
Selecting the wrong mobileprovisioning profile. For example you can have a Distribution profile selected in Debug mode, Xcode will then not allow the app to start in debug mode.
To fix this
Select your project file in Xcode
Choose "Build Settings"
Search for "code signing"
Confirm that a Development profile is selected for "Develop" builds
It sounds like the target is not necessarily set up correctly. What is the name of the Target? I see "Virgin Atlantic" there, but the project root is "sample project"?
It happened to me using Xcode 7.1.1 with OSX Yosemite.
Followed all steps of #tarryn (the accepted answer) but did not restart my mac. Restarting the mac eventually solved the problem for me.
Disconnecting the iPad and reconnecting it just worked for me.
So... this is beyond strange.
I had an app that was running perfectly fine in simulator and on device. I've actually already submitted the app and it is for sale in the App Store.
Today I went back in and made a few changes for an update.
The app now will not load on my device and it won't load in the simulator.
In the simulator it says "Attaching to app_name" (it lists the actual app name) and it stays on this process of "Attaching" indefinitely, while the Simulator screen is entirely black.
When running the app on the device it says "Build Succeeded", then "Finished running app_name" without anything ever showing up on the device.
I restarted XCode and tried restarting my computer, but still no luck...
Other apps do work, but not this one.
Any ideas?
EDIT: I just started a brand new project, copied over all the assets and code, tried running and STILL the same thing happened. I thought for sure creating the project anew would work...
FINAL EDIT: After running "Clean", deleting the DerivedData folder, and restarting my computer a SECOND time, the new project (with all assets copied over) is now working. The original project still does not work. So I am not sure what caused the issue and what fixed the issue, but for me at least I can now move on. What do I do with this thread? Can it just be deleted? Thanks everyone who chimed in to try and help!
Tried above options but didn't work for me.
Finally, Just Resetting Simulator did the trick.
In the options move the DerivedData into your project directory. Whenever I have problems with xcode4 I just quit it and delete this directory. It contains the builds and caches of the background compiles that xcode4 does.
Deleting this folder usually fixes all problems I get.
Try cleaning your project. In Xcode 4: Product menu >> Clean.
Why don't you try this one.you can quit the simulator and run the project again.This works for me
There are a lot of different solutions people suggest for this:
Do a clean
Reset simulator
Do a 'clean build folder' (hold down option key when selecting clean)
Remove ~/Library/Developer Tools/Xcode/Derived Data/YourProject*
Remove your 'xcuserdata' directory inside your .xcodeproj directory
I just spent an hour trying different combinations of the items above, doing all of them, ... nothing worked. My app would either 1) Immediately start and quit before launch screen would show up, or 2) Hang at launch screen. The simulator took forever to reset, sometimes wouldn't respond to a Quit, ... Just really odd stuff going on.
This solved my problem: Reboot machine.
(It blows my mind this had to be done on Mac OS, but it worked. This may have something to do with upgrading to XCode 4.6 and not rebooting since then, I'm not sure... But I'm back running again)
Tried all posts here without success. Then I found something that worked for me:
I had a ~3000 resources folder in my Xcode Project.
At first I had them as "folder reference", which made XCode unable to launch the app.
When I switched them to be a "group" in the project, the error was gone.
I still needed to restart Xcode and the Simulator and rebuild, but it worked.
Building an iPhone project results in:
Failed to launch simulated application: SpringBoard failed to launch application with error: 7
And the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7?
I had the exact same problem - I reset the iphone simulator and then quit the simulator (i.e. command q) then started it again.
Worked.
Boy, is the answer to this one hard to find, but I came up with a workaround. The simulator gives this error if it has any problems with accessing files in ~/Library/Application Support/iPhone Simulator/. This could be a permissions problem, but in my case it was even more subtle: my home directory is NFS mounted, and that seems to somehow be the source of the problem.
The basic workaround is to create a directory local to the machine, and link the iPhone Simulator's directory to that local directory. You shouldn't need to move your source files or project directory; it's just the simulator targets that are the problem.
Here is one series of steps to accomplish the workaround, to be typed in at the terminal
(1-3 done on every machine you'll be developing on, 4-6 once in your NFS-mounted home directory):
sudo mkdir /usr/local/iphone-dirs
sudo chmod 777 /usr/local/iphone-dirs
mkdir /usr/local/iphone-dirs/my-dir
cd "~/Library/Application Support/"
rm -rf "iPhone Simulator/"
ln -s /usr/local/iphone-dirs/my-dir/ "iPhone Simulator"
There are obviously many variations on this theme; I suspect that using a locally-hosted directory in /tmp would be fine (and not require admin privs, but would have to be redone every time the system is rebooted). As given, steps 1 and 2 are good if you will have multiple users using these machines that you don't want to collide with each other. If you have your own personal machine but NFS-mount your homedir, you could probably just skip to something like step 3 (and sudo it). Just make sure that whatever dir you create in step 3 is the dir that you symlink to in step 6.
No need to quite the simulator or delete the app..
Just select simulator, press command + shift + h + h and remove the app from background process(long press on app icon) then run your app again.
I started with a new project in Xcode and got the error 3 message, but otherwise same deal. New damn project - so no problems with broken code I added or name mistakes or anything else. But the app would build but fail to run in Simulator with the Springboard -3 error code. I've seen this before lots of times, and the basic kill-the-app-in-simulator, clean-and-run would work, but not this time.
Turns out my old 2007 iMac barely has enough RAM and disk space free any more. I'm running Mavericks, and I hid everything but Xcode and the Simulator, then ran a memory cleaning utility to free up every bit of RAM available (got back up to 1GB free or so), and then the app runs in the Simulator without a hitch. No more Springboard error.
I hadn't seen "too little RAM" listed as a reason for this error yet, so this may be useful for somebody else.
Springboard is the app that launches apps. It's the home screen of the iPhone. I had tons of problems when I tried to get my app running on the phone -- turns out that I had an older version of the SDK that was incompatible with the version of the OS my phone had. Reinstalling the latest SDK did the trick.
Also, have heard that clearing the XCode cache sometimes helps (didn't for me) -- XCode menu->Clear cache...
Maybe this will help: http://discussions.apple.com/thread.jspa?threadID=1605042&tstart=72
I had similar issues when I was trying to install my current development on the iPhone and this information about the AppID fixed it.
For quick reference, the AppID you created when you started creating certificates for development and provisioning of your iphone asked you to create a reverse domain name identifier. Something like: QS32H9XPNE.domain.subdomain.companyname.*
To correctly link up your application to the AppID would require you to set the identifier in the application to domain.subdomain.companyname.application.*
Hope this helps
I had the same problem but this solution works...!!!
1)Deleting the app from simulator.
2)Quitting simulator.
3)Restart simulator.
XCode menu->Clear cache solved my problem.
This happens to me when i switch from testing on the device to testing on simulator. Restarting Xcode and simulator gets rid of this error for me.Silly.
I initially solved this by restarting the iPhone Simulator. But this shouldn't be the answer.
The error came from editing the info plist.
Check that you didn't change any values that were set before provisioning your app for your device.
I wanted to change my Bundle Identifier, but had to go back to the default one after having this error.
Now it's fixed.
Next step will be to get a new provision Id with the Bundle Id changed.
I had same problem, the Simulator would just hang. This is on a fresh install of XC 3.2.5 GM and using Simulator with 4.2 SDK. Apps would run fine on a real device but the simulator would just hang.
I ended up changing the iPhone App Support directory and all sub dirs to 777 access permissions. Not a great idea to 777 -R, but I was desperate and it worked.
$sudo chmod -R 777 ~/Library/Application Support/iPhone Simulator/
For me this was solution. If you have enable background fetch mode. Remove this option if you are getting this alert during run app in simulator.
I had the same problem.
It happens as follow...
I had a folder storing images in some sub-folders.
If I add the root image folder as "directory", I receive this error.
If I add the root image folder as "group", simulator runs fine.
weird...
It happens to be related to folder name as well. My image folder was originally named "contents" and I got the error described.
Changed the folder name to "image_files" and reimport it to Xcode project as "folder". It works!
This is totally random...
That did it for me, too:
This happens to me when i switch from
testing on the device to testing on
simulator. Restarting Xcode and
simulator gets rid of this error for
me.Silly.
When a home directory mounted in NFS you have the problem with the simulator.
To get rid of it, you need to to create a couple of directories in some local place where you have permissions to write, "iPhone Simulator" and "Interface builder". Then remove "~/Library/Application Support/iPhone Simulator" and "~/Library/Application Support/Interface Builder 3.0". And finally create symlinks at the exact places of the removed directories pointing to the local directories.
For mine, I got the error when I tried to change the App bundle ID setting in my info.plist file for the sake of running a test. Changing it back cured the problem, but didn't do me any good for the test. Thankfully, the app had loaded in the simulator and I ran it manually for my test.
As far as I can tell, the problem stemmed from having a bundle ID that matched both a specific ID and a wild-card ID. The App IDs I've tried that match only a specific ID/Profile haven't shown a problem.
Check your console and you will get a better idea of what the error might be. That error number is pretty generic. In my case I had an error in my Plist file. I chenged something that I shouldn't have. But I realized this was the problem because the console had a more detailed error message:
2010-09-13 23:30:27.149 Appname[5580:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:
... and it goes on.
I have had this problem frequently, and generally just quitting and restarting Xcode works.
However, I just had this problem again and nothing seemed to fix it - quitting the sim, Xcode, rebooting… What was strange was some targets worked (I have multiplied build targets for this project), and other projects worked. But one target failed to launch no matter what I did.
In the end, I found the problem: In the target's properties the executable name $[EXECUTABLE_NAME] got accidentally deleted ! Replace it, and it works.
Worth remembering…
I got same error. This is how i solved it. Hope this helps.
To show all hidden files type below from command line
$ defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder
Access DerivedData folder and delete it's content(under DerivedData). Basically this is Simulator Cache which sometimes does not get deleted from XCode. Library is a hidden folder
and that is why we run Step 1.
/Users/your username/Library/Developer/Xcode/DerivedData
Quit and re-open simulator , it will work i also got an issue like this and this helped me.
I am facing the exact same issue very frequently, what I do is
1) I quit the iphone simulator
2) and if after following step 1, if issue still the same, then reset the simulator
And it has resolved my issue all the time from step 1 itself.