Could not launch iOS app - objective-c

I don't know what has happened to my Xcode, but since I deleted my app from the device, and tried to rerun it on my iPhone, I get this message coming from the top of the screen:
No such file or directory (/Users/spazm/Library/Developer/Xcode/DerivedData/newProject-cfjhjgezzcapwoadaivpptyywptu/Build/Products/Debug-iphoneos/proj.app/proj)
In addition, where you can select the "active scheme" (iPhone / iPhone Simulator / iPad Simulator), I used to have "iOS device", and right after plugging my device in, I would get my phone's name and everything would go sweet.
Now, I only see "iOS device" (after plugging in), and I need to select my phone manually, which seems like something went wrong here. I am not sure what.

In the xcode organizer delete "derived data"
Alternatively you can open "~/Library/Developer/Xcode/DerivedData" folder and delete derived data folders associated with your application. You also should make a clean/build.
For the second problem, again in the organizer window under devices find your device and click "use for development"
Edit: Today I have experienced again, deleting derived data did not solved the error this time. After deleting data, making a clean build, deleting the app from my device, I needed to close & reopen xcode, which finally fixed the error.

The problem was in the project file itself. Used my backup to load the old project, then manually added all the files from the bad-new-project.
Must have been some setting.

Try checking the Deployment Target for the app. I was getting this same error when trying to deploy an app that required iOS 6.0 to a device that had 5.1 installed.

Related

Application stuck at "Powered by Titanium screen"

I'm trying to run an app made on Titanium in my cellphone. At first it was working fine, until i decided to debug my code. After that whenever i try to run it on my cellphone, it gets stuck # the powered by titanium screen (that red one).
I tried to delete my build folder as some people said after a bit o research but it won't work.
How can i solve this?
What I would try to do is:
clean the project (it also deletes the build folder, but I think it also cleans some more stuff in there).
when the app starts try to set an alert in app.js as the first thing - see if this alert shows, and if it does - move it to the next step until you find a place where it is no longer shown which might indicate that this is where you problem is.
Look at the device logs - if it's an android device open ddms and look at the logs while you run the app - see if anything pops up. If it's an iPhone on xCode you have some sort of console viewer for the phone (sorry - can't remember the name right now).
make sure you are not still running under debug mode.
BTW - you didn't mention if it happens on iPhone or Android? does it happens on the simulator as well?
I was having the same issue. From digging through Appcelerator's Jira I found we weren't alone, and also got a workaround that allows us to get past the splash screen. Check to see if there is a deploy.json file located in your application's directory on the device. If so delete it!
Here is more info on the issue https://jira.appcelerator.org/browse/TIMOB-16086.
It's rated as a high priority to be corrected for the 3.3.0 SDK release.

xcode timed out waiting for app to launch

Application get fail to launch in device having iOS 6.0 from xcode 4.5. Xcode says Application can't be launched timed out waiting for app to launch. I reset my all device settings. Cross checked if i choosed right provisioning. Yes, its right. here i am attaching image of console. Please help me out.
None of the above tips helped me. It turned out I was using my Distribution Profile instead of the Developer Profile in Debug mode. You can check the Profile you are using by going to
Build Settings->Code Signing Entity.
Make sure you are using your Developer Profile in Beta and Debug mode.
I had a similar issue when trying to debug an App with Ad-Hoc provisioning... Check which provisioning you're using, it seems ad-hoc provisioning cannot be used for debbuging.
Whenever this happens to me, I have done the following to fix the problem:
Stop the app from running in Xcode.
Delete the app from the device (or Simulator).
Select Product > Clean from the Xcode menu.
Close Xcode.
Close the Simulator (or restart the device).
Restart your computer (yes I know this like a Windows solution but seriously).
Try again.

Is there an output log like Xcode's available locally in my iPhone?

I am developing an iOS application and thanks to Xcode's "output log" I've been able to fix lots of bugs and such.
When I run my iOS application without Xcode, sometimes it crashes. However, it is hard to tell why did it crash since my device was not connected to Xcode. So I was wondering, when I run my iOS application, is there an output log like Xcode's stored somewhere within the iOS device I can retrieve? Or do I definitely need Xcode? Or perhaps there are other ways?
When you connect your device to your computer, open up the Organizer in XCode. There will be a device log tab that you can select to view device & crash logs.
Go in the organizer then on devices. You'll get logs in there.
If you are jailbroken you can use the syslog in /var/log/. I find it useful.
edit: You need to download syslogd to /var/log/syslog package on cydia also.

iOS Simulator Crash Logs

When I use the iOS simulator and the app crashes, I can't find the crash logs. I've been looking all over the internets and can't figure out how to enable them. I know I can just run on an actual device and get the crash logs that way, but the bug I'm trying to fix right now tends to cause the program to be hung in the debugger. Then there's no qlaunchsuccess packet sending and it's a huge pain, especially when I have to run the program over and over. The only advice I've been able to find says the use CrashReporterPrefs, but a search of my hard drive reveals nothing named something even close to this. I've also dug into the package contents of XCode and the files of the iOS simulator. The iOS simulator has a crash logs folder, but it is empty. Anyone know how to get this working? Thanks.
Run your App with Xcode to install the App to iOS Simulator
Launch your App on Simulator without Xcode
reproduce steps for crash
the Crash log should show up under this directory
~/Library/Logs/DiagnosticReports/
It appears if you aren't running Xcode (mine is 4.5.2) but just the simulator (mine is 6.0) that when an app crashes it does save a crash report. To view it bring up the Application/Utilities/Console and
(1) make sure it shows the log list (see top left of console to make sure not hidden)
(2) under "DIAGNOSTIC AND USAGE INFORMATION" there is a "User Diagnostic Reports" that if you open up should have your crash reports
(3) the area on the right of the console has the log
A Crash log is just an output of what the debugger already gives you. When you are running in the simulator attached to the debugger, and you hit the crash, you can view the back trace information in the debug navigator (default key binding is cmd+5)

Cannot Install into iPhone Simulator

I've got an Xcode project that I've been working on over the past few weeks.
I just made some changes to an embedded framework that I'm working on (recompiled, to be specific) now, however, I am unable to launch the application in the simulator.
The app hangs on "Attaching to [app name]," if I have a debugger on. If I don't have a debugger on, Xcode just says the app has finished running.
There is no icon installed on the device.
Here's what I've done so far:
Restarted
Reset simulator
Clean and build
Deleted derrived data
I cannot install onto a device either, but then I get an error:
Error launching remote program: No such file or directory (/Users/peter/Library/Developer/Xcode/DerivedData/x-gtwuuwmavjonyrcxjmpcletdpyjw/Build/Products/Debug-iphoneos/x.app/x).
Oddly enough, what worked was installing another app in the sim (just launched another project and ran it) and then launching the other app in the sim.
I'm not sure what the issue was, but I tried it on two computers and it was hanging on each, so it was related to the project rather than the simulator. There's an issue to think about...