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
313
votes
48 answers

ld: framework not found Pods

I'm trying to add a framework to my IOS project but when I build I always got the same message : ld: framework not found Pods clang: error: linker command failed with exit code 1 (use -v to see invocation) I tried to remove my Pods directory and…
Kaëris
  • 3,304
  • 2
  • 14
  • 17
311
votes
12 answers

Array from dictionary keys in swift

Trying to fill an array with strings from the keys in a dictionary in swift. var componentArray: [String] let dict = NSDictionary(contentsOfFile: NSBundle.mainBundle().pathForResource("Components", ofType: "plist")!) componentArray =…
Kyle Goslan
  • 10,748
  • 7
  • 26
  • 41
310
votes
15 answers

How to enable NSZombie in Xcode?

I have an app that is crashing with no error tracing. I can see part of what is going on if I debug, but can't figure out which object is "zombie-ing". Does anybody know how to enable NSZombie in Xcode 4?
jason
  • 5,391
  • 6
  • 23
  • 26
309
votes
11 answers

How to delete Swift Package Dependency in Xcode 11?

I have a project in Xcode 11 that I added Swift Package Manager dependencies to. I now realized that I no longer need one of the package dependencies I previously added to my project. As you can see below, there are no options under File > Swift…
Charlie Fish
  • 18,491
  • 19
  • 86
  • 179
304
votes
5 answers

Xcode - But... Where are our archives?

I've submitted three versions of my app onto the App Store using the Build and Archive commands. But... Where are those archives? I've just learnt that I just need them to be able to read crashlogs. My ~/Library/Developer/Xcode/Archives folder is…
Oliver
  • 23,072
  • 33
  • 138
  • 230
304
votes
7 answers

Animating a constraint in Swift

I have a UITextField that I want to enlarge its width when tapped on. I set up the constraints and made sure the constraint on the left has the lower priority then the one that I am trying to animate on the right side. Here is the code that I am…
icekomo
  • 9,328
  • 7
  • 31
  • 59
303
votes
7 answers

How do I print a list of "Build Settings" in Xcode project?

Alternate Titles List of Xcode build variables Print a list of Xcode Build Settings Clang Environment Variables Canonical list of Xcode Environment Variables Is there a Canonical list of Xcode Environment Variables that can be used in Build Rules…
Richard Stelling
  • 25,607
  • 27
  • 108
  • 188
303
votes
13 answers

xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

I'm having xcode issues when I try to use brew and git: xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for…
devB78
  • 11,894
  • 3
  • 14
  • 14
303
votes
35 answers

Reading in a JSON File Using Swift

I'm really struggling with trying to read a JSON file into Swift so I can play around with it. I've spent the best part of 2 days re-searching and trying different methods but no luck as of yet so I have signed up to StackOverFlow to see if anyone…
Krivvenz
  • 3,911
  • 3
  • 22
  • 32
302
votes
33 answers

iPhone is not available. Please reconnect the device

I'm on iOS 13.5 and using Xcode 11.4 to build on to it. I'm getting this error message: The KBlackberry is my iPhone device name. I tried restarting the device and reconnecting of course and various other things but nothing seems to fix it. My next…
C0D3
  • 6,440
  • 8
  • 43
  • 67
298
votes
21 answers

How do I change the font size of a UILabel in Swift?

label.font.pointSize is read-only, so I'm not sure how to change it.
Jay
  • 9,314
  • 7
  • 33
  • 40
297
votes
9 answers

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 and for ruby gems (that have native…
Athir Nuaimi
  • 3,214
  • 2
  • 14
  • 17
297
votes
47 answers

An App ID with Identifier '' is not available. Please enter a different string

I am trying to add a new APP ID to prepare for App Store submission and got the following error under the bundle ID I provided. An App ID with Identifier 'com.domainName.AppName' is not available. Please enter a different string. What does this…
user2265763
294
votes
21 answers

How can I programmatically determine if my app is running in the iphone simulator?

As the question states, I would mainly like to know whether or not my code is running in the simulator, but would also be interested in knowing the specific iphone version that is running or being simulated. EDIT: I added the word 'programmatically'…
Jeffrey Meyer
  • 5,410
  • 7
  • 30
  • 27
292
votes
6 answers

What is the significance of #pragma marks? Why do we need #pragma marks?

What is the purpose of #pragma marks in Xcode? Does their location in .m files matter? Should some #pragma come before all others? Do they have to be present? Can new marks be added? Why would they be? What causes it? Is there any harm in having a…
James Raitsev
  • 92,517
  • 154
  • 335
  • 470