All Questions
8,639
questions
3482
votes
41
answers
1.5m
views
Git is not working after macOS update ("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools")
I updated to the latest OS, and/or restarted my computer (this happens on every major update, but this time all I did was restart my computer on 2022-09-13).
This morning I navigated to my work's ...
1030
votes
30
answers
663k
views
xcode-select active developer directory error
Saw the following error when running an npm install which required node-gyp... but could be triggered by anything which requires xcode-select.
xcode-select: error: tool 'xcodebuild' requires Xcode, ...
962
votes
21
answers
344k
views
Git ignore file for Xcode projects
Which files should I include in .gitignore when using Git in conjunction with Xcode?
629
votes
19
answers
111k
views
Do Swift-based applications work on OS X 10.9/iOS 7 and lower?
Will Swift-based applications work on OS X 10.9 (Mavericks)/iOS 7 and lower?
For example, I have a machine running OS X 10.8 (Mountain Lion), and I am wondering if an application I write in Swift will ...
556
votes
16
answers
798k
views
How to install Xcode Command Line Tools
How do I get the command-line build tools installed with the current Xcode/Mac OS X v10.8 (Mountain Lion) or later?
Unlike Xcode there is no installer, it's just a bundle.
It looks like all the ...
529
votes
7
answers
215k
views
Is it okay to delete the macOS Xcode CoreSimulator devices folder?
My ~/Library/Developer/CoreSimulator/Devices folder is 26 GB.
Is it safe to just delete all the content? Will those files be automatically regenerated?
338
votes
89
answers
241k
views
Hidden Features of Xcode
With a huge influx of newbies to Xcode, I'm sure there are lots of Xcode tips and tricks to be shared.
What are yours?
298
votes
9
answers
441k
views
How to use/install gcc on Mac OS X 10.8 / Xcode 4.4
I have install Mountain Lion (Mac OS X 10.8) and now gcc doesn't seem to be available anymore. I've also installed Xcode 4.4 so there is no more /Developer directory.
I need gcc both for mac ports ...
293
votes
16
answers
812k
views
How do you update Xcode on OSX to the latest version?
What is the easiest way to update Xcode on OSX?
I see this in the terminal:
$ brew install xxxxxxx
Warning: Your Xcode (4.3.3) is outdated
Please install Xcode 4.6.
But when I go to open up Xcode &...
292
votes
17
answers
218k
views
Xcode is not currently available from the Software Update server
I have problems with my macport after update to OS X 10.9.
I try to follow this manual https://trac.macports.org/wiki/Migration to fix them.
But when I install Command Line Tools:
xcode-select --...
285
votes
7
answers
197k
views
Installing Apple's Network Link Conditioner Tool
I have installed xcode 4.3.1 on my machine running Lion.
I can't find the Network Link Conditioner tool anywhere.
I have checked the utilities folder, also the xcode/contents/developer/* ...
252
votes
11
answers
65k
views
MobileDevice.pkg untrusted, cannot open Xcode after OS X update
After an automatic update of macOS v10.15 (Catalina), I am unable to open Xcode. Xcode prompts me to install additional components but the installation fails because of MobileDevice.pkg (Applications/...
246
votes
14
answers
100k
views
error while build iOS app in Xcode : Sandbox: rsync.samba (13105) deny(1) file-write-create, Flutter failed to write to a file
while building iOS app on Xcode I got these 2 errors, I tried to build the iOS on visual studio code and I got the same errors. the operating system macOS 14.0 beta. processor M1 Pro
Could ...
244
votes
25
answers
110k
views
Cannot install Lxml on Mac OS X 10.9
I want to install Lxml so I can then install Scrapy.
When I updated my Mac today it wouldn't let me reinstall lxml, I get the following error:
In file included from src/lxml/lxml.etree.c:314:
/private/...
215
votes
12
answers
433k
views
How can I find out if I have Xcode commandline tools installed?
I need to use gdb.
ps-MacBook-Air:AcoustoExport pi$ gdb
-bash: gdb: command not found
ps-MacBook-Air:AcoustoExport pi$ sudo find / -iname "*gdb*"
Password:
/usr/local/share/gdb
/usr/local/Cellar/isl/...
212
votes
29
answers
536k
views
Xcode build failure "Undefined symbols for architecture x86_64"
An Xcode beginner's question:
It is my first experience with Xcode 4.6.3.
I am trying to write a very simple console program, that searches for paired BT devices and prints them to an NSLog.
It ...
191
votes
12
answers
123k
views
Can I have multiple Xcode versions installed?
Is it possible to have more than one version of Xcode installed at the same time?
If so, please post any tip, tricks, or potential issues to watch out for.
EDIT:
The reason I want to install ...
189
votes
32
answers
140k
views
Xcode on Mac App Store can't install, show disk space not enough
I'm using macOS to install Xcode 10.1.
I have 18.43 GB free disk space on my Mac, but when I click the install button next to Xcode in the App Store, it always shows the "Not enough storage disk ...
183
votes
40
answers
75k
views
Cannot generate iOS App archive in xcode
I have a problem generating a iOS App archive from an application. The application compiles just fine and even works in the simulator. Now I wanted to make som ad hoc testing and cannot generate the ...
181
votes
12
answers
68k
views
Moving Files into a Real Folder in Xcode
When I started my project I was happy to use Groups in Xcode rather than literal folders: Since I'm using the browser in Xcode to access everything, stuff was nicely organized and I was happy.
...
175
votes
7
answers
243k
views
How to Completely Uninstall Xcode and Clear All Settings
I have an issue that I can only assume is with Xcode, where my apps take forever to run and crash the phone/restart about 75% of the time. I tried using older versions of the code that I'd saved ...
163
votes
2
answers
43k
views
How can I limit a "Run Script" build phase to my release configuration?
I have a shell script that I would like to run at the end of my target's build phase. However, I would like this script to only run when I build with the release configuration. How can this be done? ...
160
votes
14
answers
237k
views
How to check if XCode command line tools are installed?
I have a macbook pro with OS X 10.8.2. XCode is installed. I know this as it appears in the Applications directory. There are also the xcodebuild and xcode-select files in /usr/bin. I need to know if ...
155
votes
7
answers
147k
views
How to get a user's time zone?
Does anyone know of a way to get a users time zone in Swift?
I'm getting a specific time something is on t.v. out of a database and then need to subtract/add from where they are located to show them ...
150
votes
21
answers
81k
views
Xcode 5: Code signing entitlement errors
I've build a new application which is going to support IOS 7. I got the new XCode 5 GM and tried to sign my apps using my fresh provisioning profile and distribution certificate, but i'm having ...
146
votes
10
answers
79k
views
Suppressing deprecated warnings in Xcode
With all the SDKs floating around, it's handy to be able to build for multiple SDKs and platforms. However, bouncing from 3.2 to 3.0 and even occasionally 2.x, I frequently get deprecated warnings ...
143
votes
18
answers
127k
views
How to manually create icns files using iconutil?
When I'm validating my app I get this error:
the application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image.
I use to make the icns icons with ...
128
votes
7
answers
55k
views
Should I git ignore xcodeproject/project.pbxproj file?
in a XCode project, I offen got xcodeproject/project.pbxproj file changed, but useless info for me, it for compile.
Should I git ignore this file and xcodeproject/projectxworkspace/username....
127
votes
8
answers
195k
views
Compiling simple Hello World program on OS X via command line
I've got a simple hello world example that I'm trying to compile on OS X, named hw.cpp:
#include <iostream>
#include <string>
using namespace std;
int main() {
cout << "Hello ...
124
votes
8
answers
62k
views
Qt Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild
I just installed Qt 5.5 and am using Qt Creator for the first time on OS X. When I first installed Qt, it gave me an error message 'Xcode 5 not installed' which I thought was strange, (I have the ...
124
votes
2
answers
60k
views
Remove autolayout (constraints) in Interface Builder
I'm trying to make my project compatible with Snow Leopard and I am not able to remove the autolayout in the nibs using Interface builder (XCode 4.3 on Lion).
Is it possible to remove the constraints ...
124
votes
2
answers
69k
views
Convert NSURL to local file path
I have an NSURL that looks like this:
file://localhost/Users/myuser/myfile.txt
Is there a standard function to convert it to a local file path looking like this:
/Users/myuser/myfile.txt
118
votes
1
answer
152k
views
Xcode stops working after set "xcode-select -switch"
OMG, what I've done?
Couple of days ago, I tried using macport to install something, because I'm using Xcode 4.3 and the command-line tool hadn't been installed by the time, macport wouldn't work. ...
115
votes
6
answers
131k
views
How to set Xcode version as default in my Mac?
Right now I have Xcode 6.0 (Beta) as a default version of my Xcode, but today I installed Xcode 6 from App Store and so I want to set Xcode 6 as
a default version.
How can I set it?
114
votes
10
answers
54k
views
Change templates in Xcode
How would I change the initial templates created by Xcode when creating a new Cocoa Class.
I am referring to the comments and class name created when using Xcode's new class wizard.
113
votes
7
answers
138k
views
How do I create a release build in Xcode?
Why is it that when I build an application, Xcode creates a debug build? I want to create a release build. How can I do this?
113
votes
10
answers
115k
views
Authorize a non-admin developer in Xcode / Mac OS
I use a standard user account for my daily tasks on Mac OS. Since upgrading to Snow Leopard I am asked to do the following when a program is run from within Xcode:
"Type the name and password of a ...
109
votes
5
answers
69k
views
Xcode - free to clear devices folder?
I am deleting some folders and files to make more space on my drive. I know that in path:
~/Library/Developer/CoreSimulator/Devices/
There are folders for each simulator and each version. This ...
108
votes
12
answers
99k
views
GDB missing in OS X v10.9 (Mavericks)
I went to use GDB in OS X v10.9 (Mavericks), and it's not there. Where has it gone?
# /usr/lib/gdb
-bash: /usr/bin/gdb: No such file or directory
# gdb
-bash: gdb: command not found
I also launched ...
107
votes
3
answers
44k
views
The resulting API analysis is too large when upload app to mac store
I am going to upload my first mac app to Apple Store
And fixed all validation bugs of icon,category...
But after then I passed validation with warning :
The resulting API analysis file is too ...
106
votes
5
answers
49k
views
Switching branch on Xcode 9
I am having trouble finding the menu item to switch branch using Xcode 9. The working copies menu seems to have disappeared. Any ideas?
Xcode 9
Xcode 8
104
votes
16
answers
77k
views
Can't compile a C program on a Mac after upgrading to Catalina 10.15
There's a previous question Can't compile C program on a Mac after upgrade to Mojave, and the answers to that have covered most of the variations on what goes wrong.
Now — as of Monday 2019-10-07 — ...
102
votes
3
answers
29k
views
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
I am using Xcode command line tools instead of XCode app in my MAC.
When i use swift --version
I get Apple Swift version 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51)
I cloned a project with
git ...
102
votes
9
answers
35k
views
Xcode linker error: file too small for architecture x86_64
I'm developing an application in Xcode.
When I try to build, this error comes up:
ld: in /Users/theodore/Library/Developer/Xcode/DerivedData/Tower-bkpdifuqssebjdgurzmtirbxejnn/Build/Intermediates/...
101
votes
4
answers
55k
views
How can I resolve "Error: No developer directory found at /Developer"?
I just upgraded XCode to 4.3.1.
I'm using a script to build (and then deploy through Testflight) my app.
But I now receive this error:
Error: No developer directory found at /Developer. Run /usr/...
96
votes
12
answers
69k
views
WKWebView in Interface Builder
It seems that the IB object templates in XCode 6 beta are still creating old-style objects (UIWebView for iOS and WebView for OSX). Hopefully Apple will update them for the modern WebKit, but until ...
93
votes
9
answers
41k
views
Unable to use xcodebuild on Mavericks with Command Line Tools installed
I have installed the Command Line Tools:
$ xcode-select --print-path
/Library/Developer/CommandLineTools
However, when anything tries to use xcodebuild, I get the following error:
$ /usr/bin/...
91
votes
6
answers
20k
views
Cannot install Xcode 10 Network Link Conditioner in macOS Mojave
I'm using the final version of Xcode 10 on macOS Mojave beta 11. I downloaded the Additional Tools for Xcode 10 package from Apple's website.
When I try to install the Network Link Conditioner ...
91
votes
7
answers
77k
views
How can I set the icon for a Mac Application in Xcode?
I have been learning a lot about writing Objective-C code and designing in Interface Builder and I wanted to set icons for my simple programs.
I added the same JPG to all the size fields in Icon ...
89
votes
11
answers
47k
views
Invalid active developer path on MAC OS X after installing Ruby
I get this error:
xcrun: error: invalid active developer path (/Applications/Xcode.app), missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun
This solution works, but the error occurs again after ...