Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
dustbuster's user avatar
  • 81.7k
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, ...
tjmehta's user avatar
  • 30.2k
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?
Hagelin's user avatar
  • 16.6k
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 ...
MeIr's user avatar
  • 7,276
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 ...
Scott Wisniewski's user avatar
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?
Franck's user avatar
  • 9,139
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 ...
Athir Nuaimi's user avatar
  • 3,234
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 &...
Evan R.'s user avatar
  • 3,367
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 --...
klm123's user avatar
  • 12.7k
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/* ...
humanaut's user avatar
  • 3,045
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/...
eja08's user avatar
  • 4,800
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 ...
Gamal A's user avatar
  • 2,473
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/...
David O'Regan's user avatar
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/...
P i's user avatar
  • 30.1k
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 ...
RisingSun's user avatar
  • 2,447
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 ...
TWA's user avatar
  • 12.8k
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 ...
dickfala's user avatar
  • 3,276
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 ...
Filip Majernik's user avatar
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. ...
Matthew Frederick's user avatar
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 ...
robestrong's user avatar
  • 1,835
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? ...
Reed Olsen's user avatar
  • 9,129
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 ...
Vivek Nandavanam's user avatar
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 ...
Keith's user avatar
  • 1,989
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 ...
Benjamin de Bos's user avatar
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 ...
Ben Gottlieb's user avatar
  • 85.5k
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 ...
Blue's user avatar
  • 2,350
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....
qichunren's user avatar
  • 4,455
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 ...
erikvold's user avatar
  • 16.3k
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 ...
123's user avatar
  • 8,871
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 ...
Olof's user avatar
  • 5,338
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
sashoalm's user avatar
  • 78k
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. ...
Chris Chen's user avatar
  • 5,367
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?
user1954352's user avatar
  • 1,617
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.
Misha M's user avatar
  • 11.2k
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?
cyclingIsBetter's user avatar
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 ...
Andrew Cain's user avatar
  • 1,203
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 ...
Libor Zapletal's user avatar
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 ...
l'L'l's user avatar
  • 46.4k
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 ...
arasa's user avatar
  • 1,225
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
Alexander MacLeod's user avatar
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 — ...
Jonathan Leffler's user avatar
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 ...
Sayan Sen's user avatar
  • 1,774
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/...
tbodt's user avatar
  • 16.9k
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/...
Giordano Scalzo's user avatar
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 ...
Adam Fox's user avatar
  • 3,448
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/...
user avatar
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 ...
Tamás Sengel's user avatar
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 ...
kmikael's user avatar
  • 5,002
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 ...
David Lambl's user avatar
  • 1,633

1
2 3 4 5
173