Seemingly out of nowhere, my Xcode (10.2.1) became unable to build or even index any single project I try to Run, even an unchanged "Single View App" preset. And my Xcode 11.0 Beta 4 crashes any time I try to open a file inside of a project. What should I check and/or try doing?
macOS Catalina (10.15 Beta)
Just restart your computer, that is what helped in my case
Related
After my iPhone 13 updated to iOS 15.6, Xcode 13.4.1 no longer was able to debug apps on the device. Many posts and Xcode support recommend that I roll back to Xcode 13.3.1.
So I renamed Xcode to "Xcode 13.4.1", downloaded the xip for 13.3.1 and also confirmed that I am running the previous version, via the About menu.
Yet I still get the following error:
Failed to prepare device for development. This operation can fail if
the version of the OS on the device is incompatible with the installed
version of Xcode. You may also need to restart your mac and device in
order to correctly detect compatibility.
I have cleaned the build folder, I also downloaded the 15.5 image, renamed it to 15.6, and placed it in the DeviceSupport folder. But it nothing has worked.
I don't know if Xcode uses any config files that I need to clean, or anything else I can't think of. Has anyone been through this?
Xcode 13.4 (build 13F100) has a known issue preparing devices running iOS 15.6 beta and is not officially supported. The fix is to wait for a newer build of 13.4.x Xcode.
Anecdotally some have said it works after disconnecting the phone and restarting both the phone and the Mac.
There are two workarounds:
The official workaround from Apple is to install Xcode 13.3.1. You have tried this. The majority of the config files are inside the Xcode directory. You can download AppCleaner and have it show you everything it would delete if you allowed it to uninstall Xcode. For me that list was 11 GB and 39 files. I'd exam those files and possibly make copies of anything outside /Applications/Xcode.app before allowing it to remove.
Navigate to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ and duplicate the 15.5 folder with a new name of 15.6. If this works, it is much safer.
After installing Xcode 7 to play with Swift 2 in Playgrounds, I've got a weird problem:
when I open an existing Xcode 6.3 project with Xcode 6.3, it throws lots of errors about conversions to Swift 2.
This project was just cloned from the repository and hasn't been opened with Xcode 7 yet.
So my guess is that the Xcode 7 install messed up the Xcode 6.3 installed tools or something like that, but I have no idea how I could start to fix this.
I certainly don't want to open and upgrade this big project in Xcode 7 at the moment, but I do need to open it in Xcode 6.3 and Swift 1.2 to continue work on it.
Thanks to Leo's comment, I was able to clean the caches and derived data, and these errors went away.
But then Xcode refused to build the project's included frameworks (SQLite.swift and SwiftHTTP) even after cleaning everything and rebooting.
I had to uninstall them manually, clear the "build phase" and "target" fields where they appeared, then use CocoaPods to reinstall them.
After that, my app compiled again properly in Xcode 6.3.
Click on product in menubar
Click Clean
Then try reBuild project by click on play botton
it works for me
My unity project creates error while opens in Xcode.
The error is
clang: error: linker command failed with exit code 1
(use -v to see invocation)
So project not opens in xcode.
Xcode Version : xcode5.0
Unity Version : unity4.0
How can i escape from this issue?
I started getting a similar linking error after I had upgraded to Unity 4.2.2 (I've only ever used XCode 5 with Unity for iOS).
To fix it - I just wiped out my whole XCode project directory and re-did the build from Unity. Everything started working for me again.
So I suggest you just try wiping out your XCode directory and re-creating it from Unity.
If you've got custom code in your XCode project - maybe try generating a new XCode project in a different place just to see if it works.
Unity does not support Xcode 5 (last tested with Unity 4.2.1). I am guessing you also are encountering the following issue when you try to build and run your unity project:
UnityException: Launching iOS project via Xcode4 failed. Check editor log for details.
In order to resolve your issue, you will need to re-install Xcode 4. I recommend downloading XCode 4.6.3 by searching for it at https://developer.apple.com/downloads/. While it is possible to run multiple versions of Xcode side-by-side (i.e. 5 and 4.6.3), my experience is that Unity will always launch Xcode 5, and I wasn't able to able to find a way to change this behaviour even with renaming the 2 Xcode apps (perhaps someone else knows a way?). In my case, I had no other need for Xcode besides building Unity projects, so I just removed version 5.
I have a Mac version 10.7.5 with Xcode 4.6.3 installed. I have an application built in Xcode 5 and this project doesn't open in my older Xcode installation. It shows me an error saying
The document "Main.Storyboard" could not be opened.Could not read archive.Please use a newer version of Xcode. Consider changing the document's Development target to preserve compatibility.
Why am I not able to run this application using My Xcode.
In Xcode 5, select the storyboard and in the File Inspector, make sure the following option is selected:
You should then be able to open it in Xcode 4.6.3.
When I click on a project on Xcode it loads the old xcode, but I just installed the new XCode 4.3. How can I configure my Mac to load the new Xcode instead of the old Xcode?
I know that I had installed correctly the new Xcode 4.3 because I can still load it just by clicking on the icon of Xcode 4.3, but my old Xcode still somewhere of the hard drive causing it to boot when you click directly on any file of a project on Xcode.
It is very useful to load the Xcode directly from the projects itself vs. loading first the Xcode, then looking for the right project to open.
Thank you in advance.
Xcode 4.3 [is now fully self-contained][1] in the app bundle that is installed in the /Applications folder. The 4.2 installation in the /Developer folder is left intact. The first time you run Xcode 4.3, you'll be prompted to remove old tools.
You have to delete Xcode from /Developer/Applications, and drag the Xcode 4.3 app to /Applications. It should work fine after that.