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
763
votes
14 answers

Hide strange unwanted Xcode logs

When using the Xcode 8+ and creating a new blank project, the following logs appear when running the application: 2016-06-13 16:33:34.406093 TestiOS10[8209:100611] bundleid: com.appc.TestiOS10, enable_level: 0, persist_level: 0,…
Hans Knöchel
  • 11,422
  • 8
  • 28
  • 49
728
votes
18 answers

How do I see which version of Swift I'm using?

I just created a new Swift project within Xcode. I am wondering which version of Swift it's using. How can I see, in Xcode or the terminal, what version of Swift I am using inside my project?
David Snabel
  • 9,801
  • 6
  • 21
  • 29
710
votes
45 answers

This action could not be completed. Try Again (-22421)

I am trying to upload an Apple TV App to the App Store for testing purposes, but I got the issue: This Action could not be completed. Try Again (-22421) as in the below image: So what can I do?
Nimisha Ranipa
  • 8,304
  • 2
  • 14
  • 29
703
votes
7 answers

Version vs build in Xcode

I have an app that I developed with Xcode 3 and recently started editing with Xcode 4. In the target summary I have the iOS application target form with fields: identifier, version, build, devices, and deployment target. The version field is blank…
chris
  • 16,324
  • 9
  • 37
  • 40
682
votes
12 answers

How do I completely rename an Xcode project (i.e. inclusive of folders)?

I have a project named XXX. I want to rename this project to YYY. Note that XXX is an extremely common term (for e.g. "data", or simply "project"), and thus a simple RegEx search-and-replace is not possible, out of risk of corrupting the project…
Vatsal Manot
  • 17,695
  • 9
  • 44
  • 80
674
votes
8 answers

Xcode Product -> Archive disabled

I have been archiving for ad hoc distribution fine for many months and suddenly today I cannot do so as the Archive menu item is disabled. I have not changed anything. I went through the provisioning setup for the project and it looks ok. My Ad Hoc…
user278859
  • 10,379
  • 12
  • 51
  • 74
639
votes
52 answers

Xcode 6 Bug: Unknown class in Interface Builder file

I upgraded to Xcode 6 beta 4 and now my App continuously crashes with the message Unknown class X in Interface Builder file. It crashes because supposedly Xcode can't find my custom classes that I have linked in my Storyboard but it shows that…
Epic Byte
  • 33,840
  • 12
  • 45
  • 93
631
votes
19 answers

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 run on it. Or what should I have to create a…
MeIr
  • 7,236
  • 6
  • 47
  • 80
622
votes
21 answers

How can I indent multiple lines in Xcode?

When I select multiple lines of code and want to indent them as usual with TAB key, it just deletes them all. I come from Eclipse where I always did it that way. How's that done in Xcode? I hope not line by line ;)
Thanks
  • 40,109
  • 71
  • 208
  • 322
613
votes
21 answers

Giving UIView rounded corners

My login view has a subview which has a UIActivityView and a UILabel saying "Signing In…". This subview has corners which aren't rounded. How can I make them round? Is there any way to do it inside my xib?
itsaboutcode
  • 24,525
  • 45
  • 110
  • 156
607
votes
4 answers

Can I delete data from the iOS DeviceSupport directory?

After going through and cleaning my disk with old things that I didn't need anymore, I came across the iOS DeviceSupport folder in ~/Library/Developer/Xcode which was taking nearly 20 GB. A similar question has been asked before, but since then many…
3x14
  • 6,209
  • 3
  • 13
  • 25
587
votes
23 answers

How to remove CocoaPods from a project?

What's the right way of removing CocoaPods from a project? I want to remove the whole CocoaPod. Due to some limitations imposed by my client I can't use it. I need to have just one xcodeproj instead of an xcworkspace.
Andres
  • 11,439
  • 12
  • 48
  • 87
582
votes
21 answers

How to update Xcode from command line

I am trying to update Xcode from the command line. Initially I tried running: xcode-select --install which resulted in this message: xcode-select: error: command line tools are already installed, use "Software Update" to install updates So the…
psvj
  • 8,280
  • 8
  • 30
  • 44
562
votes
32 answers

‘ld: warning: directory not found for option’

When I'm building my Xcode 4 apps I'm getting this warning: ld: warning: directory not found for option '-L/Users/frenck/Downloads/apz/../../../Downloads/Google Analytics SDK/Library' ld: warning: directory not found for option…
Frenck
  • 6,514
  • 5
  • 22
  • 25
554
votes
6 answers

Where do I find the line number in the Xcode editor?

In Xcode 3, the line number of the current cursor location was displayed. I don't see this in Xcode 4. Is there a setting that will turn it on? Or a keypress that will give it to me?
William Jockusch
  • 26,513
  • 49
  • 182
  • 323