Xcode 4 Crashes frequently - ios

I just downloaded XCode 4 on my Mac Air running Snow Leopard. It crashes all the time! I believe I can recreate the issue most every time by following these steps:
Hold Option key and click on an Object/Method etc. to open documentation.
I am presented with a login screen to enter my Apple Dev Credentials but an error dialog appears.
Click 'Continue'
I get the documentation
Debug application
A dialog appears telling my XCode has crashed.. Game over
This is happening on my Mac i5 as well as my Mac Air. It crashes frequently enough that it is almost unusable. Is there a workaround that anyone has found?
Holy cow.. how did this ship? :)
Thanks!

I got it resolved! So as it turns out the documentation is not installed by default when doing a clean install of XCode4. So I installed it locally and my issues went away. Heres what I did:
Go to Xcode preferences
Click "Downloads"
Click the "Documentation" tab
Install the Documentation (I just installed it all)
Restart xcode (I noticed the documentation would not open till I did this)
Now when I visit the documentation I do not get directed to online documentation and the crashing is gone.

Related

Xcode 9.3 and update to High Sierra: Instruments can't open *.tracetemplate files even after full reinstall

With the last update of Xcode to 9.3 running on High Sierra, I realized that Instruments is not working any more.
When I try to open it from inside Xcode using Open Developer Tool > Instruments, I can see the template chooser dialog but as soon I pick one, a dialog appears:
The document "Allocations.tracetemplate" could not be opened. Instruments cannot open files of this type.
Allocations.tracetemplate could not be handled because Instruments cannot open files of this type.
This happens with all templates.
I already tried to reinstall Xcode completely. Before I deleted all files like described here: How to Completely Uninstall Xcode and Clear All Settings
I also tried to use
sudo chmod a+rwxt /Library/Caches/com.apple.dt.instruments
(Xcode 6.3.2: Instruments keep asking for trace template?)
but this file does not exist on my computer.
I also installed Xcode 9.4 beta 1 but that didn't solve the issue either.
I also can't find these template files like Allocations.tracetemplate anywhere on my computer.
Any help would be very appreciated ;-)
I still had some old Developer Tools on the HD. Removed following things and it worked again:
~/Library/Application Support/Instruments
everything I found in /Developer/ vaguely attached to Instruments
especially "3.0/Instruments/
and the old Instruments.app
also defaults delete com.apple.dt.Instruments in Terminal

Visual Studio 2015 / Xamarin, Debug not working: an error occurred while executing MTouch

I'm trying to get an answer on here before uninstalling this software and developing straight on Mac after spending 4 hours trying to figure this out. I just installed all these programs on both machines (VS15/Xamarin on Windows 10, Xcode/Xamarin on iMac, both on the same network). Mac Agent is connected, I have a Developer account on XCode, a device linked to my account, everything looks fine.
When I create a basic app (I don't even add a line of code, just a blank single view app) on XCode (iMac) and launch the simulator, it works just fine. I get the view of the device etc... When I do the same on my Windows machine, I can't debug. I get the error "The app could not be launched on 'iPhone SE iOS 10.2'. An error occurred while executing MTouch."
I looked all over the place searching for a solution. I removed the Entitlements.plist file, I also checked for updates on everything (as some suggested on StackOverflow). Nothing.
So I tried an Android app to see if that works and no issue there. I get the device I pick, shows a black screen because the app is empty, as expected.
If anyone can guide me before I uninstall this whole thing and code directly on a Mac, it would be greatly appreciated. Thank you!
Restarting Visual Studio and cleaning iOS project worked for me.

Xcode does not run the app on simulator. (App exited unexpectedly)

I'm developing for iPad (iOS 7), using Xcode 5.0.2.
Yesterday morning I was playing around with the app (my first app) and every time I ran it, it was displayed in the emulator perfectly. But after some 5/6 runs Xcode just stopped launching my app in the simulator. I started to receive this message:
MagazineManager exited unexpectedly - lost connection
Image:
I've been researching since yesterday morning for a solution with no luck. I even uninstalled and reinstalled Xcode, cleared the cache, delete folders... all that drama thinking it could be some sort of cache problem.
Then, going online I've tried lots of "solutions", none worked.
I've tried all listed here: Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.."
and here:https://discussions.apple.com/message/23431537#23431537
and in more places.
After all my "try this, try that" I'm stuck with the same problem. I can only see a black screen at the simulator (image below) and that message at Xcode!
In my extensive research I've read that people are still able to debug using their iPad's. The problem is that I got the new iPad air, that's only getting here dec, 20th!! So I don't have a place to test my app[s].
Thanks!
UPDATE
Just got this message in the debugger console:
013-12-09 20:23:25.902 sim[607:303] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin/sim: Did not find an executable file at the path: '/Users//Library/Developer/Xcode/DerivedData/MagMan-bvhhiijesvrvuteunbmpsxcqgsst/Build/Products/Debug-iphonesimulator/MagMan.app'
My problem was the debugger. Actually, it still is.
The way I solved, and have been doing for every new project, was to disable the debugger and then run the project. That way I'm able to use the app on the simulator but without the debugging functionality.
I don't know what the problem is, what is causing this debugger issue in my case, but for now that's the best I could come up with. Thanks to the friends that replied to my question and helped my research I was able to test it and disable it.
This is how I disabled the debugger:
Project > Edit scheme
Set Debugger to None
If anyone knows a solution for this, feel free to answer this question and I'll make sure to update the selected answer accordingly.
Again, thanks for all your time and patience, specially #Popeye and #HotLicks that spent a lot of their time trying to help me.
Sometimes the simulator can be a bit flaky and just needs resetting. In the navigation bar at the top of the screen when the simulator is visible try:
iOS Simulator --> Reset Content and Settings...
This should reset all the settings and remove the content so all data, images, apps etc will be removed, its like it has never run before.
UPDATE
The answer on XCode5 can't install app on iOS simulator indicates the following
I found a "Fix" for this. After trying everything and getting the same error on "My App", I opened and tried to run "My App 2". "My App 2" ran fine, so I went back to "My App", tried again and this time everything worked fine. Crazy
If that doesn't work leave a comment and I will have another look.
Delete the app and restart your iPad it will work

Xcode 4.6 hangs on "Attaching to..." when using LLDB debugger

As the title says, I'm having issues using LLDB. I've looked into this thread Xcode 4 hangs on attaching to (App name) when debugger is set to LLDB and followed the instructions given because I'm having exactly the same issue, and managed to debug by using GDB - it works flawlessly. Anyway, i'm working in a team and I'm the only one who's having this issue, so it's a bit annoying to switch back and forward from GDB to LLDB every time i commit changes so the workaround doesn't get synchronized in the remote repository.
I've checked the compiler, and it's set to LLVM 4.2. In fact, the app compiles perfectly and gets installed in the simulator (i can execute it once I kill and restart Xcode). I would try to reinstall Xcode, but it's a mess since it's a big-sized package and I have a limit on my internet usage, it would take a long while. Does anyone know what's happening here? Is it possible that LLGB is bundled outside XCode, even if I failed to locate it on the system?
Any insight would be appreciated. I can keep the workaround going, it's just that it's a bit annoying given my personal circumstances :-)
EDIT: More details about what I mean by 'hung'. I start with Xcode open, and simulator closed (it doesn't even appear on the Dock). I click 'Run', the simulator is launched successfully, and the application shows the Splash Screen. Then xcode shows the message: "Attaching to ". And now it's hung. You can close the simulator, and xcode is still attaching. Both the Run and Stop buttons stop working. You can try to exit the application by right-clicking on the dock, you get an alert message, and from this point you can't even type code: XCode is fully hung. The only choice here is to kill XCode by using Cmd+Alt+Esc.
This sounds like it could be the problem some folks were seeing in Why does the LLDB Debugger constantly fail to attach? where they'd modified their /etc/hosts file so when Xcode tried to connect to debugserver via "localhost", the connection was never set up.
When Xcode hangs, try switching to Simulator by clicking on its Dock icon. Don't use Cmd+Tab.
Upgrading to XCode 4.6.2 fixed this issue for me

ios Simulator Could Not Find The Application To Simulate

I'm having trouble with the iOS simulator. I'm currently on 10.7 and was using the simulator to test my website. During the testing, I switched the iOS version via the tool bar, and the application froze and quit. Upon restarting, I get the following error message, with a finder window, inviting me to choose an application:
"ios Simulator Could Not Find The Application To Simulate"
Here's what I've tried to fix the issue:
1: Attempt to identify the application it needs, but the only thing i could see to open was a printer app and the ios simulator app, which just results in a "only one iOS simulator can run at a time" error message.
2: Restart the Mac.
3: Download the new Xcode tools from the app store.
4: Restart again.
None of this has helped, and I'm really stuck without it at the moment. If anyone knows how to resolve the problem, I would be grateful to hear any suggestions. Thanks.
Give this a shot.
Open up a new shell, and shoot of this command: sudo <Xcode>/Library/uninstall-devtools --mode=all (assuming thats the location of the instal).
Then run the Xcode installer you got from the app store.
This removes all the plist files that were also installed with xcode, which aren't removed when you simply reinstall. This is as close as you can come to a complete xcode refresh without reinstalling your OS.
Here's an alternative solution that worked for me... the answer selected here did not. I created a blank, "hello world" project and simply ran it. When you run the app, it sends the app to the simulator and voila! iOS Simulator has an app to simulate. From that point forward, you should be able to open the iOS Simulator without a problem.
After a while longer trying various things, it seems like I may have fixed it.
When asking for an application to open, I opened Xcode, and (weirdly) that opened up and left the testing shell visible, with the tool bar intact. I then selected the current version from the device options and hit the home button, and suddenly everything appeared.
Weird thing to have suddenly happened, but there you go.
I still can't test in iOS 3, so that's a bit of a problem, but not a disaster either!

Resources