Xcode 8 simulator extremely slow - ios

I am running Xcode 8 on macOS Sierra 10.12.2, and there seems to be a problem with running the simulator on my first "Hello World!" app (simulating iPhone 7 Plus). As you can see, I am very new at app development.
The simulator gets stuck at the loading bar with the Apple logo for about 10 to 15 minutes, and then gives me the message of "The operation couldn't be completed. (Mach error -308 - (ipc/mig) server died)".
I dug around the web and found solutions suggesting to go to Product > Clean in Xcode, also Simulator > Reset Content and Settings... in Simulator.
After which, the system gets stuck at the spinning clock for about 20 minutes and gives me the error message "Unable to contact local DTServiceHub to bless simulator connection" (solution I found online tells me to "Reset Content and Settings...")
I'm just really lost here because the error codes seems inconsistent in ways I cannot explain. Maybe it is my laptop? (Early 2011 MacBook Pro 15" 4GB ram, 2.2GHz Corei7)
Thank you in advance for your effort to help me.

On older/slower Macs the first run of an App on a simulator will be slow like this and an error often occurs:
The Apple logo bit is the simulator initialising (just like a real device when you cold start it) - just be patient and let it finish.
The error I suspect is something in XCode timing out due to be excessive delay. If this happens don't clean, just re-run: the simulator should not need to re-initialise so everything should be quicker and on my slow Mac setup the error does not tend to re-occur (unless I shut down or close the simulator - in which case I have to wait for it to re-initialise again!)
Helpfully you can manage without getting a new Mac :o)

I usually do this on Xcode 8.3.3.
Uncheck Debug->Optimize Rendering for Window Scale
Check again Debug->Optimize Rendering for Window Scale
It will work now

No Xcode simulator is not slow, It may be because slow animation is checked
Select Simulator
Debug Option and uncheck slow animation
That's work for me. Hope it works for you

Related

Xcode 12, iPadOS14.0.1 App won't start on device from Xcode

I have an app and when I choose to run it on the device (an iPad pro) from Xcode, it just sits and the LaunchScreen.storyboard for 30-45 seconds. Eventually and message pops up in the console that says:
Metal API Validation Enabled and it works normally. Other people are having this issue. Any thoughts from the world of smart people:
It's documented here too: https://developer.apple.com/forums/thread/661008
Thank you.
Turns out there are a lot of people with this issue. By following the suggestions in these articles I got it down from 80 seconds to about 8-10. While not good, it's way better.
Cheers.
https://developer.apple.com/forums/thread/651012
Slow app launch time after updating to iOS 14 and Xcode 12
https://developer.apple.com/forums/thread/123068?answerId=420683022#420683022
https://developer.apple.com/forums/thread/651012

Build stops when running for the first time in a day and shows Restore the connection to "iPhone 5" and run "Quiz" again

I am having a problem with my Xcode 6. Sometimes when I run in simulator the build stops after few minutes and shows:
Restore the connection to "iPhone 5" and run "Quiz" again, or if "Quiz" is still running, you can attach to it by selecting Debug > Attach to Process > Quiz.
This problem usually occurs when the app is running for the first time in a day. If I run again, it works perfectly.. I don't know what that problem was :(
Thank you..
As mentioned on my post in the dev forums and in the Xcode 6.1 release notes, this is unfortunately a known issues with the iOS Simulator.
3) "(Domain = FBSOpenApplicationErrorDomain, Code = 4)", "(Domain
NSPOSIXErrorDomain, Code = 3"),
"Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3", "Lost
Connection to ...", "Debugger disconnected", or app getting SIGKILLed
soon after launch
Upon installation of an app, SpringBoard will
SIGKILL that app's process in order to force a relaunch of the app
with the new executable. The problem is that there is a race
condition whereby SpringBoard may accidentally SIGKILL a new process
that we just launched rather than the old process. Which of the
various error messages you get depends on exactly when in the launch
process the SIGKILL was delivered. Normally, this shouldn't happen,
so the advise is to just try again (sorry =/). If you find that this
happes to you all the time or more frequently than you can tollerate,
we are incredibly sorry. We are aware that systems with slower disk
I/O will see this happen more frequently than faster systems, so if
you are using an NFS home directory, you may want to create a local
directory for your simulator data and setup a simlink to it from
~/Library/Developer/CoreSimulator

Simulator/device does not sync with iCloud

From time to time I'm getting errors that my iOS 8 device or simulator will sometimes not sync with iCloud (Drive). The following message appears (multiple times) in the output log:
CoreData: iCloud: Error: failed to receive initial sync notification
call back in 90 seconds
Only reinstalling the app helps.
Has anyone experienced the same issue or got some information about this?
I have seen that error (today) on an iPad running iOS 8. I fixed it by performing a reset (hold power and home/sleep buttons until the Apple logo appears). After that when I reran my app it synced immediately.
For the simulator it may be sufficient just to quit the simulator and relaunch. However, I have seen cases where restarting the computer was required.
I'm not sure what the cause of the issue is but hopefully the above help.

App crashes on some device with Application exited abnormally with signal 11: Segmentation fault: 11

I'm working on an iOS app and it load images from an URL like this image it is working perfectly on all the test devices in my office(and on simulator as well). but client said that the app is crashing whenever any image comes, everything else working as expected.
Now the question is if there is any problem than how it is working on my side? Is there any way(any app or anything) by using them client can send crash report to me so i can check?
Note:- we are testing on the same iOS version(7.x)
EDIT:- Some how they get the log and send to me from that i got
May 20 22:48:47 iPhone-5S com.apple.launchd[1] (UIKitApplication:com.Ba-cha[0xfbd1][287]) <Warning>: (UIKitApplication:com.Ba-cha[0xfbd1]) Job appears to have crashed: Segmentation fault: 11
May 20 22:48:47 iPhone-5S backboardd[31] <Warning>: Application 'UIKitApplication:com.Ba-cha[0xfbd1]' exited abnormally with signal 11: Segmentation fault: 11
I searched for the same and tried NSZombieEnabled but in my device (iPhone 4 and iPhone5) it is working perfectly no log? And now the question is How can i reproduce the issue on my device?
This is hit and try solution(at least worked for me):- My app Was worked fine on iPhone4 and 5(32 bit) but crash on iPhone 5s i.e. 64 bit processor. From some research on stackoverflow and Apple official i come to know perhaps there may be some problem in conversion between NSInteger to int. so i use NSInteger every where instead int.
Also i'v to remove armv64 from my project and set NO for "Build Active Architecture Only" (debug and release)
That did the trick for me, I didn't really need any 64bit specific functionality on my app so I took it out. I know this is a hack and not a good solution but at least it works.
As Adam suggested, iTunes would work but it may be better to save your client the chore...
You could alternatively send them a new version of the app using something like HockeyApp or TestFlight (free) integrated, allowing you to automatically receive the crash logs as well as the wide range of other useful tools they provide such as easier installation by the client.
They can load Xcode, and connect the device. Device logs can be viewed in the Organizer window. Crashes are marked as such. The log text can be cut and pasted or the export button can just save the whole thing as text.
Crashlytics offers software and service to upload crash logs.
It is possible to build up the information that appears in a crash log, but you will need unix signal handlers, various exceptions handlers, and a server to upload to.
Segmentation fault 11 means memory allocation issue. You possibly have made a coding issue like: using weak/assign, instead strong on NSObject

Instruments: Target failed to run: already running on exited process

I quit out of Instruments, the iPhone simulator, Xcode, and unplugged and reconnected my iPhone. I still get the following error.
This first answer below didn't help.
Try to switch off your iPhone and restart it. Sometimes this is the only way to fix a problem with some process being hanged in the debugger, maybe it also works for Instruments.

Resources