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
49
votes
5 answers

Problem running iPhone application on iPhone from Xcode (and in Instruments)

I have a problem running one application on the iPhone from Xcode (or Instruments). When I try to run the app I get the error message Failed to upload XXX.app in the bottom left corner of Xcode. The strange thing is it actually uploaded the app to…
Ben
  • 1,922
  • 3
  • 23
  • 37
49
votes
5 answers

How do you debug an issue with a release mode build in iOS?

I am working on an iOS app and I have noticed a bug that is only reproducible when the app is built in release mode. The only way I have found to run a release mode app that I have built is by building an archive, signing it with my debug profile,…
lehn0058
  • 19,977
  • 15
  • 69
  • 109
49
votes
8 answers

How to append values in xcconfig variables?

I'm using Xcode and .xcconfig files. I'm trying to append some values in the preprocessor definitions, but I simply can't make it work. I tried the following (as well as many variations of this), but no luck so far: GCC_PREPROCESSOR_DEFINITIONS =…
Martin Cote
  • 28,864
  • 15
  • 75
  • 99
49
votes
4 answers

getting merge conflicts with inferredMetricsTieBreakers in Storyboard file

Whenever I get a conflict in a storyboard file, I can usually resolve it. However, I have an issue that has now come up twice in two weeks. At the very bottom of my Storyboard file, I see block named "inferredMetricsTieBreakers", with bunch of…
Dan Morrow
  • 4,433
  • 2
  • 31
  • 45
49
votes
21 answers

Could not load the "" image referenced from a nib

I have no images called "" (nothing). I've gone through the .xib file of the screen where this pops up and can't find anything that would cause this. Anybody who have had the same issue? Here is the full warning: Could not load the "" image…
BlueVoodoo
  • 3,626
  • 5
  • 29
  • 37
48
votes
3 answers

Copy target file to another location in a post build step in CMake

I have a dynamic library that gets a different name depending on configuration, specified in the CMake scripts by: set_target_properties(${name} PROPERTIES OUTPUT_NAME ${outputName}64) set_target_properties(${name} PROPERTIES DEBUG_OUTPUT_NAME…
villintehaspam
  • 8,540
  • 6
  • 45
  • 76
48
votes
5 answers

xcode-select -switch path when using cli toolkit

With the release of Apple's Command Line Toolkit for Xcode, I am trying to avoid needing to install Xcode proper. In order to do this, I need to set the path to xcode for specific make files that depend on the xcode-select path (which is currently…
Lukas
  • 3,175
  • 2
  • 25
  • 34
48
votes
30 answers

NSLocalizedString only retrieves the key, not the value in Localizable.strings (IOS)

I've made a strings file named "Localizable.strings" and added two languages to it, like so: "CONNECTIONERROR" = "Check that you have a working internet connection."; "CONNECTIONERRORTITLE" = "Network error"; I have also converted the files to…
Smiden
  • 645
  • 1
  • 6
  • 11
48
votes
2 answers

Steps to create and edit a plist file in Xcode

I want to add key pair values in plist. I dont know how to add the .plist file in XCode. Simply i want to add these details in .plist file named as "Mobile.plist". Apple - iPhone,iPod,iPad Samsung - Galaxy Y, Galaxy R, Galaxy Z Nokia - Lumina LG -…
Gopinath
  • 5,392
  • 21
  • 64
  • 97
48
votes
3 answers

Interface type cannot be statically allocated?

I tried to put this in the header file of my view object: @property (nonatomic) UIColor color; to store the color that lines should be drawn with in this view. Xcode gives me an error on this line: Interface type cannot be statically…
William Sham
  • 12,849
  • 11
  • 50
  • 67
48
votes
2 answers

How can I change the Apple ID that Xcode 4 uses to download components?

I am running Xcode 4.2 on OS X 10.6.8. Due to corporate policy, I have two Apple ID's. me@bigcorp.com is my "work" ID, and that's the ID that is connected to my iOS Developer Program membership. I also have me@personalmail.com, my "personal" ID,…
Dalbergia
  • 1,699
  • 1
  • 17
  • 26
48
votes
4 answers

pod init cause RuntimeError - [Xcodeproj] Unknown object version

When I run pod init, I got the following error. RuntimeError - [Xcodeproj] Unknown object version. /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.19.0/lib/xcodeproj/project.rb:227:in…
Elye
  • 53,639
  • 54
  • 212
  • 474
48
votes
5 answers

Anyone find that UIDatePicker is broken under iOS 14?

Under iOS 14, the date/time pickers in my app are broken. Nothing changed in the project. They're defined in a storyboard and worked fine until I updated a few days ago. Now they're not spinners; they're large grey boxes with static text in…
Oscar
  • 2,039
  • 2
  • 29
  • 39
48
votes
8 answers

Xcode not supported for iOS 11.3 by Xcode 9.2 needed 9.3

Apparently, with the latest IOS update, my version of Xcode could not build due to the following error. Could not locate device support files. This iPhone 7 Plus (Model 1661, 1784, 1785, 1786) is running iOS 11.3 (15E216), which may not be…
alphapilgrim
  • 3,761
  • 8
  • 29
  • 58
48
votes
14 answers

Unable to do refactoring on my Swift file in Xcode 9

I am using Xcode 9 and I am trying to do Refactoring on my Swift based file but every time I am getting below error: Refactoring engine ranges didn't match initial ranges Why isn't it matching the initial range?
CodeChanger
  • 7,953
  • 5
  • 49
  • 80