Questions tagged [xcode]

Xcode is Apple's integrated development environment (IDE). USAGE NOTE: Use this tag only for questions about the Xcode IDE itself, and not for general Mac or iOS programming topics. Use [cocoa] for Mac programming questions, and [cocoa-touch] or [iOS] or [Swift] for iOS programming questions.

Xcode is Apple's integrated development environment (IDE) tool, which runs on . It is used for creating apps for macOS (), iOS (), iPadOS (),watchOS () and tvOS () platforms.

This tag should be used only for questions about the Xcode tool itself, not for programming questions for which you happen be using Xcode - if your question would stay the same if you used and for writing your program, avoid adding this tag.

  • For macOS programming questions, use the or tag.

  • For iOS programming questions, use the or tags.

  • For Apple Watch programming questions, use the , or tags.

  • For questions about the Objective-C language and its features, use the tag.

  • For questions about the Swift language and its features, use the tag.

Latest Versions:

  • Current stable version is Xcode 14.2 released on December 13, 2022
  • Beta version is Xcode 14.3 RC released on March 21, 2023

Release notes:

SDKs in Xcode 14

  • iOS 16
  • iPadOS 16
  • tvOS 16
  • watchOS 9
  • macOS 13

This tag covers:

  • Project organization
  • Source code editing
  • Build system
  • Unit testing
  • Xcode Instruments
  • Interface Builder (prior to Xcode 4, Interface Builder was a separate app, in which case you would use the tag)

More information:

Related:

Related tags for specific versions:

158769 questions
3414
votes
38 answers

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 codebase in the command line on my MacBook Pro, typed…
dustbuster
  • 79,958
  • 7
  • 21
  • 41
1593
votes
29 answers

Transport security has blocked a cleartext HTTP

What setting do I need to put in my info.plist to enable HTTP mode as per the following error message? Transport security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your…
Jeef
  • 26,861
  • 21
  • 78
  • 156
1471
votes
10 answers

How can I "add existing frameworks" in Xcode 4?

I can't find the good old "Add existing frameworks" option. How do I do this? We're talking about Xcode 4 DP2 (in the context of iPhone development, as far as it matters...).
Ariel Malka
  • 15,697
  • 6
  • 31
  • 33
1371
votes
18 answers

How can I disable ARC for a single file in a project?

I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a little more fragile right now. I recall hearing that there was a way to disable ARC on a per-file…
casademora
  • 67,775
  • 17
  • 69
  • 78
1141
votes
36 answers

How can I change the name of an iOS app in Xcode?

I began an iPhone project the other day with a silly development code name, and now I want to change the name of the project since it's nearly finished. How can I do this?
Robert Gould
  • 68,773
  • 61
  • 187
  • 272
1001
votes
99 answers

Xcode 10 Error: Multiple commands produce

error: Multiple commands produce '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist': 1) Target 'OptimalLive' has copy command from…
make
  • 9,467
  • 3
  • 8
  • 14
980
votes
1 answer

How to download Xcode DMG or XIP file?

Where does the Mac App Store download the files to under Lion? I need the DMG file in order to repair something in my system, but how can I access that file?
Proud Member
  • 40,078
  • 47
  • 146
  • 231
975
votes
30 answers

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, but active developer directory…
tjmehta
  • 28,667
  • 4
  • 21
  • 18
957
votes
21 answers

Git ignore file for Xcode projects

Which files should I include in .gitignore when using Git in conjunction with Xcode?
Hagelin
  • 16,440
  • 5
  • 29
  • 37
907
votes
25 answers

Xcode error "Could not find Developer Disk Image"

When attempting to run a build on a connected iOS device in Xcode I get the error: Could not find Developer Disk Image I saw that there was a public beta for Xcode, so I installed it. One of the new features is that you don't need to have a…
Nathan Kramer
  • 9,180
  • 3
  • 11
  • 8
876
votes
65 answers

Xcode building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64'

I am trying to get a large (and working on Xcode 11!) project building in Xcode 12 (beta 5) to prepare for iOS 14. The codebase was previously in Objective-C, but now it contains both Objective-C and Swift, and uses pods that are Objective-C and/or…
btxios
  • 8,935
  • 3
  • 9
  • 7
869
votes
19 answers

#ifdef replacement in the Swift language

In C/C++/Objective C you can define a macro using compiler preprocessors. Moreover, you can include/exclude some parts of code using compiler preprocessors. #ifdef DEBUG // Debug-only code #endif Is there a similar solution in Swift?
mxg
  • 20,946
  • 12
  • 59
  • 80
857
votes
11 answers

Xcode 7 error: "Missing iOS Distribution signing identity for ..."

I tried to upload my App to iTunes Connect resp. AppStore and got the following error: Failed to locate or generate matching signing assets Xcode attempted to locate or generate matching signing assets and failed to do so because of the following…
Awsed
  • 9,094
  • 5
  • 26
  • 25
838
votes
41 answers

Get the length of a String

How do you get the length of a String? For example, I have a variable defined like: var test1: String = "Scott" However, I can't seem to find a length method on the string.
Scott Walter
  • 9,426
  • 4
  • 18
  • 23
792
votes
14 answers

Xcode process launch failed: Security

I have been developing an app for 1 or 2 weeks now and just yesterday I have updated my iPhone 5S to the iOS 8 GM. Everything worked fine and I could test on my device as well until I deleted the app from my phone and wanted to build again. The…
Tom Spee
  • 9,209
  • 5
  • 31
  • 49
1
2 3
99 100