XCode 4.4 option to warn about deprecated functions reverts to "Yes".. why? Bug? - osx-mountain-lion

In XCode 4.4.1 on OS X 10.8.1, when I select in my project settings "No" for the option to warn about deprecated functions, it works if I build right away... but if I go and edit some code then come back to it, then the build settings will have reverted to "Yes" for that option. Why does it keep reverting back, instead of saving my preference? Seems like a bug.

Deleting the XCode caches in /Users/Library/Caches and /Library/Caches and restarting the computer after running Onyx and deleting other caches fixed this problem.

Related

xcode product clear not clearing the issue viewer

On XCode I do a build and it adds issues in the issue viewer, with warnings and error(s).
In the past I did Product | Clean and my issues list was cleared (made empty). But now it shows a message "Clean succeeded" and the warnings are still there!
Is this a bug, or is there some setting?
I'm using XCode Version: 9.4.0 according to the help/XCode-help.
OK. It was a list of problems with the current versions of the build, after upgrading the XCODE which now works only with more advanced versions of Android.
I followed the recommendations (and ruined my project which cannot be built) but that cleared all the issues. I then returned with an old batch, ignore all the warnings and build happily ever after.

Xcode Error: "An internal error occured. Editing functionality may be limited" For all projects

I'm getting the following error:
An internal error occured. Editing functionality may be limited
for all my projects I open with xcode. I've tried the solutions that I've read on here, the only thing I haven't done is restart my Mac, as I am working with macincloud. The error is there for all my old projects. How can I fix this when I'm using macincloud?
This happened to me when I had two versions of Xcode running on the same machine.
The Xcode-select value could be pointing to the wrong version. (For example, if you're running Xcode 9, but it's pointing to an Xcode 8 version that's also installed on your machine, you might run into this)
If this is your issue, then try changing the value to the right directory by using something like this:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
This also, however, happens if files have incorrect permissions or a library/developer file has been manually deleted.
If you have only one version of Xcode installed, try deleting the derived data of the project and force-closing + restarting Xcode, or even reinstalling the IDE. More on deleting derived data here.
Let me know if any of this was helpful!
I recommend shutting down the app and then restarting. If this doesn't work, then it could be that you have to update XCode. You could also use an alternative to MacinCloud, like XCodeClub.com
Hope this helps!
I had this similar issue in my Mac and the issue has been resolved by my self. I had tried all the answers and also some from other links.
At last what I did is, I checked the storyboard that I have been working as, source code. Then removed the last view controller (Scene) that I had created and been working on from that storyboard file. Then cleaned and removed derived data. Restarted Xcode. And then it was looking fyn. I think there were some issues with the constraints on a storyboard that had around 8 scenes, so that Xcode LLVM couldn't load it correctly. Thanks for the response.

Unable to do refactoring on my Swift file in Xcode 9

I am using Xcode 9 and I am trying to do Refactoring on my Swift based file but every time I am getting below error:
Refactoring engine ranges didn't match initial ranges
Why isn't it matching the initial range?
Workaround: Restart Xcode.
This has not been resolved yet as of January 2018 (Xcode 9.2).
Build your project (Command ⌘ + B) and it will fix the error. After doing it, I could rename my file successfully.
I have Xcode's project created using Xcode8 long time ago. For some reason I have to upgrade to Xcode9 (9.4.1 exactly). Then I experienced that error only on that old project, not the new one created using Xcode9.
So i think that error related to project issue. So I decided to compare the settings between old and new one. There are some differences, and after several tries, by changing Optimization Level for Debug solved refactor issue.
In project editor, select your Target, Build Settings
Set Optimization Level (Debug) = No optimization [-Onone]
Delete DerivedData folder related to your project in /Users/YourMacUsername/Library/Developer/Xcode/DerivedData
Clean project shiftcommandk.
Build project commandb.
Update For some reason, it's not happening for me anymore. I noticed also whenever I don't let indexing finishes before trying to start doing a refactor or tap on refactor many times, still see the error, but not permanent anymore.
I asked an engineer at WWDC 2018 about this issue. This issue was happening for me in only one project in my workspace. Other projects in the same workspace works fine. At the moment, there's no solution to this issue. If you want to help Apple to fix this, you can close your Xcode and run following command in terminal:
SOURCEKIT_SERVICE_LOG=3 /Applications/Xcode.app/Contents/MacOS/Xcode 2>&1 | tee /tmp/sk-log.txt
And then try to reproduce the issue and send them the log file (/tmp/sk-log.txt) so they can narrow it down and hopefully fix it in future Xcode versions.
Notice This is project related issue and won't be fixed with OS updates, Xcode updates, or any number of restarting applications, at least the one that I'm having.
I have the same issue in Xcode 10.3.
Refactoring didn't work when I right clicked → refactor → rename on the class name in the class definition. However it did work when I did the same somewhere in code where I use that class.
Product -> Clean Build Folder -> Quit Xcode -> Reopen Project -> Build
I update to Xcode 10 and finally refactoring now it works again after a year without refactoring
I am on Mac M1 and using Xcode Version 12.5 beta 3.
I was facing the same issue when trying to rename ViewController.
Before renaming it, I moved it to a new group, and my code was in a running state. Not sure if that was the reason for the issue.
But I restarted the Xcode and the issue was resolved for me.
I was experiencing the exact same issue. It turned out that I had my build configuration set to Release mode. Changing it to Debug, cleaning build folder and recompiling fixed the issue for me.
Remove DerivedData
This worked for me for this error and other kind of refactoring errors.
Close Xcode
Remove DerivedData:
rm -rf ~/Library/Developer/Xcode/DerivedData
I experienced this on a Mac M1, using Xcode Version 14.1 (14B47b).
This helped:
Clean project: shift-command-k.
Build project: command-b.

Xcode 6.4 crashes in Swift breakpoint

In one project I'm using I can't set breakpoints in Swift code, Xcode always crashes when reaching one of them, doesn't matter if it's a "manual" or an exception breakpoint.
In other projects everything works as expected, only for one project Xcode 6.4 (6E35b) always crashes.
I tried cleaning, deleting derived data, resetting simulator, restarting Xcode/Mac - nothing helped at all.
Anyone else experiencing this problem and hopefully knows what helps?
EDIT
Seems only to be the case on one machine (Xcode 6.4, 10.10.5), but not on the other (Xcode 6.4, El Capitan). But as I mentioned in the comments, reinstalling Xcode didn't help, are there some other preferences I could reset/delete?
EDIT2
Here's the Xcode crash log file:
https://dl.dropboxusercontent.com/u/119600/Xcode_2015-08-12-074655_Stefans-iMac.crash
I would try uninstalling and reinstalling Xcode to see if it helps... I've heard of successes with this technique for similar issues.
Just delete the entire Xcode.app from /Applications, and reinstall from the .dmg. If you're not certain of the binaries and have time / bandwidth, consider re-downloading the .dmg.
If that doesn't work, try the following source control tricks (substitute "your favorite revision control" for "git"):
Try purging all objects not in source code control
Another approach: Check out the app again into a fresh repository (this will get even the files that may have been committed but ignored later).
If not under source code control, grab a .gitignore from here and add it to git, then check out into another directory (this will leave everything but source, interface builder, project files and resources/assets behind).
I'd suggest moving the breakpoint code to another location (such as making a function call and breaking either before or inside the function). However, if all Swift code has this problem, that may not work.
Finally, after making an interim commit (to roll back to), try it in Xcode 7 beta. Bit of a hassle because you have to upgrade to Swift 2.0, but if you keep the deployment target the same no iOS target changes are needed.
If this really is a burden and/or it's a small project, you could try creating a new project and migrating the files and storyboard over, but likely this is too much effort.
Either way, since you note it's pretty much all breakpoints in Swift code, file a bug with Apple's bug reporter. They really need to hear about issues such as this, since you don't seem to be alone in having this issue.
EDIT: Where are others seeing this issue?
Maybe we can see commonality -- since this is only reported in Swift projects (so far). A colleague has seen this problem with breakpoints (as well as stepping through code) in Xcode 6.4 on 10.10.4. (I've seen Xcode 6.4 crashes in the past as well).
I see OS version 10.10.5 mentioned as a target where this happens (#swalkner); is this a beta? If OS 10.10.4/5 is the only place we see this, it might be significant. If it's a project/OS interaction, it might be tricky to reproduce / fix, but I'd encourage everyone to submit detailed bug reports to Apple (maybe even link this post).
Some points to note if you're seeing this:
Operating System Version
Hardware
Target: Simulator vs. Hardware; iOS vs WatchKit app.
Target SDK version(s)
Swift only? Or on an Objective-C only project? Mixed?
Only one project, or several?
It's a longshot, but let me know if it's working:
uncheck the "Always show Dissasembly" check
Debug > Debug Workflow > Always Show Disassembly
In older versions of Xcode (<6.1):
Product > Debug Workflow > Show Disassembly When Debugging
I've just spent the past few hours trying to solve exactly the same issue.
I thought at first, it had started due to installing Xcode 7 on the same machine as Xcode 6.4. The problem certainly coincided.
However, due to having version control, I could look and see what files had changed since opening the project with Xcode 7.
The images.xcassets file had changed. Reverting this file back has stopped Xcode from crashing each time it hit a breakpoint.
I'm not sure whether this helps at all, but definitely look at images.xcassets and if needs be, delete it, recreate it and ensure it's setup 100%. It certainly fixed my issue.

Xcode 4.6 Strange issues with Debugger."po" command does not work

I just recently upgraded to xcode 4.6 and strange things are happening to the debugger. "po" command ceases to work some times. Also step by step debugging sometimes does not work. Is anybody else having the same issues
I have found the issue with this. I checked the Optimization Level for your Apple LLVM Compiler code compilation in target settings, changed it to None and now the debugging works as it should
Just try to clean up everything from Project menu, delete derived data folder from organizer. Exit and restart XCode. It may clean up some garbage memory and set things up. I have experienced that it improves po a bit.

Resources