When i run my project on xcode it shows - ios7

Xcode cannot launch apps on the simulated device “iPhone 6”, as it is currently running an app on “iPhone 4s”. Only one simulated device may be used at a time

This means one of two things:
You have another project window open, and that project is debugging an app using the iPhone 4s simulator;
XCode has gotten confused and thinks you are still debugging something in the simulator, even though you are not. This happens to me pretty often, and I think it's a bug in XCode, in the way it interacts with the simulator.
For #1, go to the other project window(s) and click Stop button to stop debugging.
For #2, quit XCode and start it up again.

Related

Fabric App for Mac crash in background

This suddenly appears these days. I use Xcode 9.2.
Every time I use command+R to run my APP the explorer will be launched and open fabric website. At this time the Fabric App could not be open. It was crash in the background even it was not opened. I must close Xcode. I tried open Fabric App first then open Xcode. After few hours this happens again, every time use command+R would open fabric website. At that time the Fabric App was freeze. The only way to close it was force quit.
Does anyone have the same problem?
More information. It's often happens after long time using Xcode, maybe more than 5 hours. It maybe have some issue with Interface Builder. I use #IBDesinable classes in storyboard and there are more than 10 xibs in this storyboard. It has more probability that Xcode build this storyboard after long time working occurs Fabric App crash.
I use Xcode 9.2 and macOS 10.12.6

Xcode 5 fails to launch app with error: failed to launch '/path/to/.app' -- Busy

I am using XCode 5, with an iPhone 5s as the dev device. Every other time I run the app I get a pop that says "Could not launch [app name] \n busy". My iPhone 5s then appears to crash and the only way it will respond is if I hold the home and lock button until it resets.
The application is a single view application, the only thing I have done is added the Parse.framework from here and used
[Parse setApplicationID:appID clientKey:clientKey];
[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];
In applicationDidFinishLaunchingWithOptions, along with some UI that isn't hooked up to anything.
I'm not sure if this has to do with Parse or possibly the App settings.
So to be clear, the behavior is:
Fresh reset > Build and Run application on iPhone 5s > application runs fine > Build and Run application on iPhone 5s > application appears to launch but screen remains black and iPhone is no longer responsive except the screen will turn off when the lock button is pressed (but not back on) > Build and Run application on iPhone 5s > XCode says "could not launch app - busy" > hard reset iPhone
When I run this on the 64-bit simulator it works fine.
Edit 1:
I have tested with multiple applications now that we know work on multiple other devices (iPhone 5, iPhone 4, iPhone 4s) and the simulators. I don't have another iPhone 5s so it is hard to compare exactly but everything crashes my 5s..
My device was completely stuck with black screen. "To fix you have to hard reboot, holding the power and home button until the phone reboots - doesn't lose any of the data you have on your phone (a concern the first time I did it)." as stated here:
http://blog.paulhadfield.net/2014/01/iphone-hangs-when-running-from-xcode.html
For iPhone7 there is a different approach:
Press and hold down the power button located on the right side of
the iPhone 7.
While holding down the power button, press and hold
down the Volume Down button on the left side of the iPhone 7.
http://www.hongkiat.com/blog/force-reset-iphone7-7plus/
You were using your phone when you ran the app. Make sure you don't use your phone after you press build and run, otherwise it will be "busy"
Which Xcode version do you use? Same issue with Xcode 5.0.1 + iPhone 5S (iOS 7.0.4). It crashed my iPhone 5S even by the simple application created by Xcode's default project template.
It seems this issue has been fixed in Xcode 5.0.2. Xcode 5.0.2 works fine for me by now.
I've got the same problem for several times. It seems that this problem always happens when iCloud or other background App is running & the App I was debug is already in running mode.
My suggestion is: Avoid any background App running when debug and Make sure the App debugging is fully killed before restart a debug.
It is obvious a bug in iOS 7 + Xcode 5.
I had the same issue and upgrading to Xcode 5.0.2 resolved it.

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...

iPod App crashes on launch

Is it normal that when i try to test my app it crashes on launch?
I explain.
I have my app that works fine in the simulator. I wanted to try to test it on my iPod Touch 4g.
I built and run from XCode, and that's what happened: the app launches fine (it shows me a black splash screen),but then suddenly it comes back to the springboard,with no reason.
If i open up the app manually,after it crashed,it works without any problems. It happens only one time,just when i build and run,and i don't know why.
How can i do to avoid this? On simulator it works with any crashes,but when i run it over my iPod,it crashes.
Program ended with exit code: 0 // on simulator
The app is likely to be failing to run on the device as xcode is trying to attach the debugger to it but doesn't have permission to do so.
Check your entitlements.plist within your project; you probably have one that has get-task-allow set to NO. This needs to be 'YES' to allow the debugger to attach. (It does need to be 'NO' for adhoc builds though - one solution is to exclude the entitlements.plist file from the debug build.)