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
388
votes
18 answers

How can I delete derived data in Xcode 8?

The projects page seems to be disappeared from Xcode 8. I used this page for deleting the derived data. Any idea how can I delete derived data from within Xcode 8?
Antoine
  • 23,526
  • 11
  • 88
  • 94
388
votes
19 answers

How to create a delay in Swift?

I want to pause my app at a certain in point. In other words, I want my app to execute the code, but then at a certain point, pause for 4 seconds, and then continue on with the rest of the code. How can I do this? I am using Swift.
Schuey999
  • 4,706
  • 7
  • 21
  • 36
376
votes
4 answers

How to format code in Xcode?

I wonder how can I format my code to align it neatly? Does it have a feature similar to Eclipse's ctrlshiftf?
James Raitsev
  • 92,517
  • 154
  • 335
  • 470
372
votes
31 answers

Error when testing on iOS simulator: Couldn't register with the bootstrap server

I was testing my app on the simulator when it crashed on clicking a button of a UIAlertView. I stopped debugging there, made some changes to the code and built the app again. Now when I run the application, I get this error in the console Couldn't…
lostInTransit
  • 70,519
  • 61
  • 198
  • 274
371
votes
22 answers

How to increase font size in the Xcode editor?

To increase font-size in Xcode is a pain.
Dev
  • 6,207
  • 4
  • 27
  • 32
367
votes
10 answers

Invalid Bundle Error - "requires launch storyboard"

I keep getting this error when I try to submit my app to the store using Xcode: ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch storyboard in bundle 'com.companyname.appname.'" Anyone know what this error really means?
matthias_b_nz
  • 3,815
  • 2
  • 15
  • 12
365
votes
14 answers

Can't ignore UserInterfaceState.xcuserstate

I'm using Git for Xcode 4 project version control. I've explicitly added ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate to .gitignore, but Git it won't ignore it. Any ideas why this is…
GarlicFries
  • 8,095
  • 5
  • 36
  • 53
364
votes
15 answers

How to localise a string inside the iOS info.plist file?

As you might know the iOS 8 requires NSLocationWhenInUseUsageDescription key for using user's location. I have added this key and some general information into my info plist. How can I use translation string inside the plist file ? -- Update -- I…
Soheil
  • 5,054
  • 3
  • 24
  • 43
360
votes
10 answers

How to pass prepareForSegue: an object

I have many annotations in a mapview (with rightCalloutAccessory buttons). The button will perform a segue from this mapview to a tableview. I want to pass the tableview a different object (that holds data) depending on which callout button was…
chizzle
  • 4,142
  • 5
  • 18
  • 18
356
votes
12 answers

How do I fix the xcrun unable to find simctl error?

I have Xcode 6.2 Beta. Attempting xcrun simctl in terminal yields xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
alexander.sivak
  • 4,352
  • 3
  • 18
  • 27
354
votes
15 answers

After upgrading to Xcode 11.2 from Xcode 11.1, app crashes due to _UITextLayoutView

After upgrading to Xcode 11.2 from Xcode 11.1 my app crashes: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named…
Sudhakar Tharigoppula
  • 2,857
  • 3
  • 16
  • 17
353
votes
7 answers

Is there a [Go to file...]?

In modern IDEs, there is a keyboard shortcut to open a file by typing its name without putting your hand on the mouse. For example: Eclipse: Cmd|Ctrl + Shift + R -> Open Resource IntelliJ: Cmd|Ctrl + Shift + N -> Open File Is there a Go to file…
Mike
  • 8,853
  • 3
  • 35
  • 44
352
votes
48 answers

Xcode error: Failed to prepare device for development

I have updated to Xcode 12.3 beta. device version is 14.2, but Xcode complaining: Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window. Failed to prepare device for development iPhone…
Hashem Aboonajmi
  • 13,077
  • 8
  • 66
  • 75
350
votes
22 answers

Safe (bounds-checked) array lookup in Swift, through optional bindings?

If I have an array in Swift, and try to access an index that is out of bounds, there is an unsurprising runtime error: var str = ["Apple", "Banana", "Coconut"] str[0] // "Apple" str[3] // EXC_BAD_INSTRUCTION However, I would have thought with all…
Craig Otis
  • 31,257
  • 32
  • 136
  • 234
348
votes
29 answers

The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1

I'm getting this below warning message in my Xcode 10.1. The iOS Simulator deployment targets are set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.1. My simulator os in 12.1 Xcode 10.1 And I updated…
Naresh
  • 16,698
  • 6
  • 112
  • 113