Xcode 5 crashing all the time when trying to open a particular project - xcode

When I try to open a particular projects target settings in xcode 5 it crashes. When I try to open it in Xcode 4 versions its fine.
Screen Shot http://img33.imageshack.us/img33/9527/kiew.png

This got fixed with today's update to the OS. I am using OSX Mavericks!. Make sure to update.
Good luck!

Reverting project file changes and resetting the workspace worked for me: https://stackoverflow.com/a/9494112/974531

Related

Xcode 10 storyboard UI components are not visible and painfully slow?

My code was working fine (showing UI properly) when I had Xcode 9 and I removed it from the application folder (could not update as it had installed using another apple id) and reinstall the Xcode 10 from the Appstore.
Now Xcode storyboard not showing any added UI elements colors or anything and I removed Xcode 10 and installed Xcode 9 again but problem remains same.
UI screen shot of storyboard.
I tried removing Xcode in this way:
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/Xcode
~/Library/Developer/Xcode
~/Library/Developer/CoreSimulator
Then I tried installing macOs Mojave and install XCode 10 again from the Appstore. Issue still remains. I tried cleaning derived data, xuserdata and everything.
Try cleaning your project using "Command + K"
and run your project again!
Hope it works!
I encountered the same issue that you are facing in my case i had xCode 10.0 installed and everything was working fine. As soon as I installed version 10.1 I faced the same issue that you're facing but the good thing was i had xCode 10.0 installed at the same time so I switched back and everything was working fine.
From my point of view my system(Mac-mini mid 2011) was lacking hardware specification that was required for xCode 10.1 also had very low graphic processor in my mac mini. If you install the same version in a MacBook or any other system having higher specification you'll face the issue. I hope that helps.
I was stuck on this all day. One of my coworkers suggested removing occurrences of IB_DESIGNABLE & #IBDesignable. This fixed the issue for me. It still lags sometimes but doesn’t go invisible anymore.
If you have multiple xib files then just try to switch between or Try moving to launchScreen storyboard and then switch to main storyboard. I think this is just loading issue.
Reinstall Xcode. That worked for me.
Click on library button(Circular Button) which is left to hamburger sign(Top Bar Right Side). Elements will be popup on your screen then you can choose elements.
try
xcrun simctl erase all
it helped me with the same problem

Xcode Changes Contraints Of Layout By Itself After Reopening The Project

I set the constraints of layout properly and also tested it on every device. But the next time I open the project, Xcode just ruined the constraints totally.
How did this happen?
May be the project has a problem and for some reason it is not saving the changes. I have indeed put this solution on my troubleshooting book about Xcode from Apress (shameless advertising... 😃). I have seen this before.
Backup your project and try this:
Quit Xcode
Using finder, right click on the .xcodeproj file of your project and select Show Package Contents.
delete everything from that except the file project.pbxproj.
open the project again fix the constraints and see if the changes are saved the next time you open Xcode.
You did not specify you Xcode version, but my own experiences with code, that is developed using Xcode 8 Beta 1 to Beta 6: The problem may be caused by bug in XCode.
The explanation, if you use Xcode 8 Beta, could be:
New Xcode offers new storyboard-display logic, that shows different difficulties still in Beta 6
After fixing both constraints and frames automatically / manually, warnings come back again after reopening project
This problem moves from Xcode Beta 2 to Beta 6 after my own researches
Let's give Apple a little more time to fix the issues and let's wait until Apple releases GM Seed. It's only beta though

Cannot change file in Xcode project

When I launch one of my Xcode projects, I am presented the storyboard of the project. I can edit the storyboard, I can run the project on my device and simulator. But on changing to any other file from the project navigator or any other way (like opening any file of my project from finder), I get stuck with a rolling rainbow cursor which keeps on rolling till infinity (I have waited for as long as an hour) and I have to force quit Xcode. My other projects appears to work fine.
I have tried the following fixes:
Restarting my Mac
Reinstalling Xcode
Resetting Xcode Settings from http://ioslau.blogspot.in/2013/08/resetting-xcode-settingspreferences.html
I have Xcode v6.3 and Yosemite v10.10.3.
I don't want to recreate my project as it will suck time.
Any help or advice is appreciated.
This may be a known issue with the latest release of Xcode:
apple dev forum
The accepted answer and the apple dev forum didn't help me.
I am using a swift project with no IB and no Storyboard.
What I did was, close Xcode, restart the mac, open the Xcode not from the app but form the .xcodeproject file. It worked.
For me, the solution was to make a copy of the files that were uneditable, delete the original files from the Xcode project and drag the duplicates in.

Xcode 5.1 Cordova iOS config.xml

I know there are several issues with the new version of xcode 5.1/cordova and it simply wont run apps on 64x bit devices / emu but I followed this tutorial and now it somehow works (even though it spits 14 warnings in my case)
But for some reasons config.xml is still being ignored. It's in red and you can't edit it.
Any suggestions?
You need to close your xcode. Build again using cordova build and open up again your xcode then you can run your app.

Failed to Attach to Process ID Xcode

Anyone has experienced this problem?
Yesterday I still can run my app in simulator but now I cannot run my app since Xcode prints this error in console:
error: failed to attach to process ID <ID number>
I have tried to reinstall, do this post and create new project but returns no luck.
Anyone can resolve this issue?
I use Xcode 4.5 Preview 2 and try to run iOS simulator 6
Resetting the content and settings in the simulator worked for me. This is available in the "iOS Simulator" menu.
go to the Product menu and find the Edit Scheme menu there.
While in Edit Scheme window, select the "Run" option on the left hand side of the screen and then on the right hand side, change the debugger from LLDB to GDB.
I experienced the same problem, and after a while I found out that it was due to the fact that my XCode project included a Folder Reference to a folder named Resources.
It seems that XCode doesn't like that name.
Just removing the folder reference or renaming the folder solved the issue.
TWO METHODS
Method 1 : Inside the folder Application Support -> iPhone Simulator -> In the each simulator version of iOS -> Applications -> Delete all the files present here.
Now go to Products -> Clean
Now run it on any simulator and it will work.
Method 2 :
Step1: ping
$ ping localhost
This should return something like
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.028 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.048 ms
...
If this works, this answer won't fix your problem, try something else.
If ping return something else for example: ping: cannot resolve localhost: Unknown host something is screwed up with your /etc/hosts file, go to Step 2
Step2: Check /etc/hosts
Check that the top of your /etc/hosts file looks like this
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
If it doesn't have these entries in the file, enter them at the top of the file, flush the dns cache using $ dscacheutil -flushcache and go back to Step 1, otherwise continue to Step 3.
Step3: Correct File Format: It should be unix or LF *
$ file /etc/hosts
This should return: /etc/hosts: ASCII English text
If it returns something like /etc/hosts: ASCII English text, with CR line terminators then the file is in the wrong format and is likely being ignored.
Change the file line endings to unix or LF using your favorite text editor.
In Sublime Text 2 this can be done throught the view menue: View > Line Endings > Unix
Flush the dns cache ($ dscacheutil -flushcache) and go back to step 1
Similar to fundtimer's answer, the local hosts file seems to have been the culprit.
I had to change my /etc/hosts permissions back to the default after an inadvertent change:
sudo chmod 644 /etc/hosts
After that, simulator/LLDB worked for me.
This is an old topic, but I believe things have changed a bit for the latest version of macOS.
I've stumbled on the issue while trying to run an UI test suite for an iOS app in the simulator on macOS Mojave Beta and Xcode 9.4.1.
Turns out, on macOS Mojave the codesign tool (which is a part of the OS itself and not a part of the Command Line Tools or Xcode) signs processes into a hardened runtime environment which includes runtime code signing enforcement, library validation, hard, kill, and debugging restrictions. This, together with the System Integrity Protection in macOS Mojave, prevents the lldb debugger from connecting to the running target.
To resolve this, you have to options:
An obvious one, probably, is just to use Xcode 10. It does seem to handle the connection gracefully.
Reboot the OS into the Recovery Mode and turn off the System Integrity Protection from the Terminal with csrutil disable. The debugger then connects happily.
I've spent quite an amount of time banging my head on this and was able to resolve it all after reading the following article: http://www.lapcatsoftware.com/articles/debugging-mojave.html
Just my two cents. Hope this helps someone.
I had somehow removed or deleted records from my /etc/hosts file and I got the same error.
You should check whether you have in your /etc/hosts file the line "127.0.0.1 localhost".
This helped me!
I know this is an old question, but it came up first for me when I did a google search for "failed to attach to process ID". I'm using Xcode 7. Happened after iOS9 was released and I had updated my swift app for swift 2.
Deleting my app in the simulator and doing a new build and run cleared it up.
I've had the same problem when debugging on the device. The app crashed on start but didn't appear as a running process.
My solution is to use some process viewer app (e.g. System Status or similar). Find your stale app and then find the parent process id which usually is debugserver.
Go on Xcode, Product -> Attach to Process -> By process id and attach to the debugserver process PID. Wait a second and then press the Stop button.
The stale debugserver and app processes disappear.
(When using the simulator, the equivalent would be to use the terminal, ps, and kill the App process. Haven't tried that, though).
I just removed the application from the simulator (just like you would on an actual device), and when I re-ran it everything worked fine.
I have also same problem and for me the solution is :-
Just delete the app from the Simulator and then clear and Run the project.
May it help also to someone else.
I fixed this problem by removing Xcode Derived data contents.
In finder press SHIFT+CMD+G and type below path and remove all data inside DerivedData:
~/Library/Developer/Xcode/DerivedData
Also reset simulator builds
~/Library/Application Support/iPhone Simulator/6.0/Applications
I just posted this on the Developer Forum. It was a simple solution and may help someone here:
I had exactly the same problem: when using any current version of Xcode 4.xx and the LLDB debugger, plus any version of the Simulator, XCode consistently crashed with 'failed to attach to process ...' My only resolution was to switch to the GDB debugger. This was disappointing since I really wanted to try the new, robust LLDB in XCode 4.6-DP.
And then I remembered; I had changed my network/server host file at ...etc/hosts some time ago to accomodate several Apache2 server virtual hosts, i.e., I removed the line:
127.0.0.1 locahost
That was it. Removing that line, XCode crashed on attaching to the Simulator with LLDB.
Restoring that line, XCode worked just fine with LLDB and the Simulator.
Anyway, this may not be your problem but it's worth exploring. As far as I'm concerned, it's a serious undocumented bug.
In my case the solution was different: the run mode was "Release". Changing to "Debug" fixed it. Xcode 4.5.x had no problem with it.
The issue for me was caused by a pretty stupid mistake: I created a new target for my project by duplicating an existing target and forgot to change the Bundle Identifier in the target's info.plist file.
Above answer really helped me.
https://stackoverflow.com/a/12819757/1752988
Because in my XCode I used story board and custom view controller. and in its warning list that I saw some of the nib files are missing. I was miss leaded by seeing that. However, I saw this answer,
and even though I didn't like to reset my App simulator content, I did it and it really worked for me.
And also Changing the Debugger from Product -> Scheme -> Edit Scheme (Run) from LLDB to GDB didn't work for me either.
P.s.:- Pardon me,I added this answer as a support comment to above, as I don't have 15 reputation upvote the above answer or 50 points of reputation to comment on above.
I solved this problem by quitting XCode and Simulator. Reopen the Project. Done.
The following worked for me on iOS 9.1 :
Just uninstall the app from the simulator
Quit the simulator (Cmd+Q)
Clean your Xcode project
Run on simulator
Note: No need to reset the simulator.
I am working on Ionic 2 application, I am new to this and even Xcode and simulator.
Initially my app was working on simulator but after some time it start generating error like-
xcode error: failed to attach to process id
I searched for, tried all above answers but my issue was not resolved.
Then I updated (Ionic, npm, cordova) my machine setup-
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68
******************************************************
After this I just run a command from my application home directory
ionic run -l
ionic build ios.
imported xcode changes to xcode.
Reset content and setting as-
clear product from xcode,
Run Xcode and now it is working on simulator.
Happy to see this!!!
So many answers to this and I didn't see what I believe is the correct one. It's an issue with authorization. Type this in the Terminal:
sudo DevToolsSecurity -enable
On Xcode 9+ do the following:
Go to the Xcode menu: Product-Scheme - Edit Scheme and under Run tab be sure that the Debug Executable checkbox is checked! That's it!
Just reset content and settings of iOS simulator and then clean code by pressing command+shift+k keys to clean code.This worked for me
As lame as it is, restarting my computer was the only solution that worked. I tried switching from LLDB to GDB, resetting the contents of the Simulator, and restarting Xcode. The only thing that worked was restarting my computer, reopening Xcode, and re-running the app.
I had the same problem. I did some combinations of answers given to make it work. :)
clean the Build Folder by clicking "Product" in the MenuBar. while pressing the Alt-key click on "Clean Build Folder". Now restart your xcode and simulator.
Now it should work. if not, also try changing bundle identifier and Simulator "Content Reset" and then restart xcode and simulator.
Ran across this today. I accidentally removed my Launch images from my Target Settings.
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
Do you have multiple users logged in to your machine? I have "personal" and "work" accounts on my laptop. I got this error when I was trying to debug from my personal account, but I had left the simulator running in my work account. Quitting the simulator in the other account fixed my problem.
and another one for the record: (none of the suggestions worked for me)
Mountain Lion: XCode 4.6.3
I moved the whole Application to Trash and deleted following other folders
/Users/[USERNAME]/Library/Developer
/Users/[USERNAME]/Library/Caches/com.apple.dt.XCode
/Users/[USERNAME]/Library/Application Support/iPhone Simulator
reboot System and reinstall XCode
Also had same problem today. i was using Xcode 4.6.3. i closed my project and open it in Xcode 5 and it is running perfect.
Strange but True

Resources