App stopped running on device - ‘No such file or directory' - iphone

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.

Related

Xcode 7.1 crashes always when debugging is executed

If I set a breakpoint and start the debugging mode, Xcode tried to read the attributes and after that Xcode crashes. The position of the breakpoints in the source code has no influence. I tried following steps:
After XCode crashes:
If simulator is still running make sure to select IOS Simulator->Reset Content And Settings before closing it.
Close Simulator (CMD-Q)
Window --> Organizer --> Delete derived data
If debugging on ANY devices, delete the app from the device and REBOOT the device completely.
Launch XCode
Remove All breakpoints
Product --> (hold down Alt/option key) Clean Build Folder
Product --> Clean
Close XCode again via XCode->Quit XCode (NOTE: Must be a GRACEFUL Exit, so XCode can properly do a complete shutdown/cleanup cycle)
Reboot your Mac
Launch Xcode
If running in simulator, pick a different device to simulate than when it crashed.
Do a test run of your app (with no breakpoints)
If all goes well, start adding a breakpoints (All Exceptions is always a good starting point).
But Xcode still crashes and crashes and ...
I used Xcode 7.1 and Yosemite (I cannot update to El Capitan).
In Xcode Build Settings there is Enable Clang Module Debugging disable it.
Hope,It helps you!

xcode 4.5 app can not run in device No such a file directory error [duplicate]

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

Xcode can not run the project on selected device

I got the project from my team and i am working on it when ever i restart the system my Xcode not runs the project, but i am able to run other projects easily .... after i run the project with the changes i do it shows me
"Cannot run on the selected destination- The selected destination does not support the architecture for which the selected software is build. Switch to a destination that supports that architecture in order to run the selected software."
And if i run the original project it runs fine then i have to again copy and paste the codes that i did in the project after that it runs fine, but when i open my Mac the next day it does not runs and again i have to start from the original project, What is happening i don't know why after Restarting or Shut Down the project does not runs.
I am using Xcode 4.5.2 on iMac 21.5-inch - Software OS X 10.8.2 (12C60)(Mountain Loin)
Processor 2.5 Ghz Intel Core i5, Memory 4 GB 1333 MHz DDR3.
Project target is iOS SDK 6.0 (on iOS 6 simulator).
Does Not runs on Simulator and on Device also.
Sometimes just runs on the simulator but not on Device.
I have tried :
Restarting the Mac.
Cleared Derived Data.
Reinstalling Xcode.
But still can't figure out .. Nothing helps .. plz Help me on this ...
I think that if the project finds some cache memory problem then after restarting the system it some times start working fine or in case of same project with different destination with some minute changes you are running then it some times hanged in the device or simulator for that we have to need to switch off the device and restart again then after it start working fine. And if the project code is in iOS 5.0 and the IPod/IPhone device os is 6.0 then it does not show in the device section for running. For that first you have to run the device to the xcode with ios 6.0 and then it start working fine . But here, you have to notice that for each and every time after switch off you have to run the device first with xcode 6.0. But in your case some build target problem which is not clear to me . So , if you provide the details of bug then it will be easy for understand.
Check under Build Settings > Architectures and set Architectures to Standard (armv7) or ${ARCHS_STANDARD_32_BIT} for all your profiles.
Set Base SDK to Latest iOS().
Set Build Active Architecture Only to NO for all profiles.
Set Valid Architectures to armv6 armv7 for all profiles. You may have to add either depending on what is already available.
I have solve the problem using the below steps.
Close the Xcode
Delete the application from device
Restart the device
then re-run the application
it working fine..

Installing iPhone app onto device from Xcode, no files installing with app

I've just set up a new computer and now trying to install my app onto my device through xcode. I've installed the certificates, developer provisioning files, etc..
The app is being installed onto my device, but none of the .png files are being loaded. So my app has the UIButtons and UILabels but nothing else is showing up in my app. Even though the simulator is running the app perfectly.
This app was just installing fine on my old computer to my device, with all the files included. Same version of Xcode and I'm not aware of any changes to settings I made that would have caused this.
No issues or errors when building the app, everything looks good.
Xcode 4.2.1, iPhone 4S 5.0
Thank you
There's sometimes strange things like that which cache themselves in the DerivedData or BuildIntermediates folders of your Xcode project so rebuilding doesn't actually get any changes through. You may want to try Product > Clean and then build again, and then if nothing changes jump into the Xcode Organizer (Window > Organizer) and delete the Derived Data from the project. This will force a reindex of all the project files and any trace of prior builds will be deleted. It should then pick up all of the images as listed in your Copy Bundle Resources build phase(s).

Xcode error: Failed to launch simulated application

Problem
Unlike people have asked at here and
here, I got this error after a brand new installation of Leopard (hackintosh), this problem really driving me crazy and nowhere else to find an clue, I googled and visited every article related with this, still can't get it solved.
After the first time install iPhone SDK 2.2.1, start a new project(any type, Navigate based, OpenGL ES application), then build and go, I got the following problem:
sometime it's:
Failed to launch simulated application: Unknown error.
and sometimes it's:
Failed to launch simulated application: iPhone Simulator failed to find the process ID of com.yourcompany.[application name]
It seems that apps in the simulator crashed immediately, so Xcode can find the process ID.
Solution
This link says that this even can't be solved. Some others make a detailed step by step:
Uncheck Info.plist
Quit XCode
Delete directory /Lib/Caches/com.apple.DeveloperTools.###
Open Xcode project
Clean All Targets
Rebuild
and I reset the iPhone Simulator. This also didn't solve the problem…
I've even tried uninstall the SDK and reinstall it, still got the same error…
Is this a problem related with hardwares? or the operating system version? I'm using a hackintosh (iDenebv1.4 10.5.6), all other software works good including iTunes && vmware fusion.
Great thanks for any further tips or clues!
FIXED For the issue:
iPhone Simulator failed to find the process ID of com.yourcompany.[your application name]
I was having an issue building and simulating a project I built under OS Version 2.2.1, which I could no longer get to build and run in the simulator for XCode 3.1.4, even though I forced XCode to build for "Simulator - 2.2.1 Debug"
I was able to get past this problem by:
- Close the iPhone Simulator
- Putting XCode into View->Detail
- Opening the "Info.plist" file in the "Resources" folder
- Near the top of the file you should see "Info.plist" with and up/down arrow selector
- Click on the up/down arrow selector
- Select "Clear File History"
Built For:
Simulator - 2.2.1
XCode Version:
3.1.4 (Which includes OS3.1 Beta 3)
I had the same issue last night, and suddenly my system got reboot. At that moment, i was trying to install an application into simulator. When system returned, and i tried again to install the app, it said, "Failed to launch simulated application"
Than i did googled it, and tried many solutions, like cleaining all targets and try building again, but didn't worked out.
So i have found the following link, where it is described, how to reset the iPhone Simulator contents:
http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/125-Using_iPhone_Simulator/iphone_simulator_application.html
I tired doing it, and you guys would'nt believe me, it worked :) ,
Solution was : "To set the user content and settings of the simulator to their factory state and remove the applications you have installed, choose iPhone Simulator > Reset Content and Settings"
Best of Luck to all.............. :)
This ends up being a product name issue:
The fix is to revert back to
${EXECUTABLE_NAME}
${PRODUCT_NAME}
for the executable file and com..${PRODUCT_NAME} in the info.plist.
Clean XCode, Quit, rese and quit simulator and you're good to go.
found some wierd log in /var/log/system.log.
May 8 16:17:50 th084134 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard[1170]: MobileInstallationLookup: Generating the install map
May 8 16:17:50 th084134 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard[1170]: load_application_info: Could not load signer identity from /Users/test/Library/Application Support/iPhone Simulator/User/Applications/5D55807A-7489-4DC5-B4D7-2ECD5E230F29/new1.app/new1
May 8 16:17:50 th084134 [0x0-0x2e02e].com.apple.iphonesimulator[1168]: error compiling query "SELECT value FROM _SqliteDatabaseProperties WHERE key = ?;": no such table: _SqliteDatabaseProperties
May 8 16:17:51 th084134 SpringBoard[1170]: Unable to obtain task name port for com.yourcompany.new1. Either it failed to exec or it terminated immediately: (os/kern) failure
May 8 16:17:51 th084134 SpringBoard[1170]: Couldn't activate <SBApplication: 0x123e6d0> com.yourcompany.new1 activate: animated deactivate:
May 8 16:17:51 th084134 SpringBoard[1170]: Application <SBApplication: 0x123e6d0> com.yourcompany.new1 activate: animated deactivate: exited abnormally with signal 256: Unknown signal: 256
May 8 16:17:51 th084134 SpringBoard[1170]: Unable to obtain task name port for com.yourcompany.new1. Either it failed to exec or it terminated immediately: (os/kern) failure
May 8 16:17:51 th084134 com.apple.launchd[164] (UIKitApplication:com.yourcompany.new1[0xa455][1171]): Bug: launchd_core_logic.c:2812 (23714):103: sandbox_init(j->seatbelt_profile, j->seatbelt_flags, &seatbelt_err_buf) != -1
May 8 16:17:51 th084134 com.apple.launchd[164] (UIKitApplication:com.yourcompany.new1[0xa455][1171]): Sandbox failed to init: Cannot apply builtin profile `/Users/test/Library/Application Support/iPhone Simulator/User/Applications/5D55807A-7489-4DC5-B4D7-2ECD5E230F29.sb': Policy not found
May 8 16:17:51 th084134 com.apple.launchd[164] (UIKitApplication:com.yourcompany.new1[0xa455][1171]): Exited with exit code: 1
May 8 16:17:51 th084134 [0x0-0x2e02e].com.apple.iphonesimulator[1168]: 2009-05-08 16:17:51.026 SpringBoard[1170:10b] Unable to obtain task name port for com.yourcompany.new1. Either it failed to exec or it terminated immediately: (os/kern) failure
Here is a discussion about how to run app in simulator via command line, hope it helps to understand how does xcode and simulator works.
But I didn't work it out.
Well, I "solved" it by install another distribution of hackintosh(IPC 10.5.6), works perfect!
In my case, I was adding a target to an existing app that had always worked. In my case, I had forgotten to select all the source code, xibs, frameworks, etc. and click their target checkbox. My clue was that the build happened instantaneously, which didn't make any sense. It never built anything. It just failed to install in the simulator. Once I included all the source files, etc., for the new target, then it built and installed fine.
I had the same problem, I fixed it by launching the simulator through another app and deleting the app I was trying to run on it. Then try to build and run and worked perfect.
Cheers
Matt
I had the same problem. I had accidentally added my info.plist file to my target and it was getting copied to the app bundle every time I built the application. So there were 2 .plist files in the bundle - mine and the Info.plist, created by XCode - which confused the simulator.
Simply delete the app from the simulator (and/or device if you're attempting to run on your device) via the UI of the simulator, then shut the simulator down and attempt to re-run the app. Doing the deletion of the actual files backing the simulator will also remove the app and do the same thing (but the deletion via the simulator's UI, if it works for you, is a little bit faster and easier).
Is your CPU Intel, and, of a model distributed in Apple hardware?
I doubt the Simulator will work reliably (if at all) on non-Intel CPUs and/or in VMWare. The simulator is very CPU specific in order to reflect the arm hardware of the iPhone.
The SDK ONLY supports Intel hardware from Apple.
There is a significant effort involved in creating the simulator and it's not easy or cheap (read, thousands of man hours) to support every CPU.
I fixed this problem by removing the "Icon already includes gloss and bevel effect" property from the Info.plist file in my project.
My problem centered around a Product Name the simulator simply wouldn't accept. Picking alternative names got me past the problem. Changing the name back to the original suspect choked the simulator every time.
Try moving the project to your local hard driver and opening it from there! That solved the issue for me (the project used to be stored on a samba share).
My fix:
restarted the Mac and it was fixed. (before that tried clearing caches, deleting caches from iPhone Simulator, cleaning, rebuilding, quitting OS, quitting Simulator, nothing worked.) Restarting the OS worked.
This was bugging me too but finally got it working.
Unfortunately, I can't reproduce what I did it but here's my list of actions for your information.
The project causing the problem was one I'd downloaded from Apple and tweaked.
Interestingly, I could still launch my own projects fine.
So, here's a list of actions that I did (note that none of the actions below worked just by itself):
- closing the simulator and doing "clear file history"
- restarting simulator
- rebooting
- restarting xcode
- resetting the iPhone with Reset Content and Settings
However, by the time I'd tried all of the above with a fresh version of the code I'd downloaded - it was working again. Just out of interest, I dragged the project that was causing this problem back to the desktop and it was OK now.
Wow, what a pain. I had to uninstall XCode 4 via the command line and then install XCode 3 again. Make sure that you restart after you reinstall. Working...
why anybody didn't tell about restarting simulator.
In my case,
Resetting the iPhone with Reset Content and Settings
and
**ReStart Simulator**
works well~
I had the exact same problem - I reset the iphone simulator and then quit the simulator then started it again.