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
52
votes
4 answers

Swift 3: Expression implicitly coerced from 'UIView?' to Any

Someone else must have received this message while (or after) converting an iOS project to Swift 3, yet when I do a Google search, I get no relevant results. Anyway, after converting to Swift 3, I have about 30 warnings that say: Expression…
RyJ
  • 3,995
  • 6
  • 34
  • 54
52
votes
8 answers

'filenames are used to distinguish private declarations of the same name' error

I am getting this error on generating an NSManagedObject in Xcode 8.1 in Swift. :0: error: filename "DemoOne+CoreDataClass.swift" used twice: '/Users/Swasidhant/Desktop/demo again/DemoOne+CoreDataClass.swift' and…
Swasidhant
  • 1,231
  • 1
  • 12
  • 13
52
votes
3 answers

Is there a way to turn off Xcode 8's autocomplete for image names?

Xcode 8 has this new feature that is supposed to suggest image file names when you use UIImage(named:) In my case it suggests image names even when it doesn't make any sense. Example: There is nothing in preferences. I wonder if there is some…
Vojtech Vrbka
  • 5,342
  • 6
  • 44
  • 63
52
votes
6 answers

How can I access a user-defined Xcode build setting?

If I added a user-defined setting in my build configuration, how can I read that setting in my Objective-C code? I have two files in my project, debug.plist and release.plist. I want my MainApp.m file to read one of these files based on which build…
The Lazy Hiker
  • 1,553
  • 2
  • 11
  • 8
52
votes
5 answers

Xcode 8 source control does not show conflicts

After Xcode has updated to version 8.0 (8A218a), I have a problem pulling changes from git repository from Xcode only when some files are conflicted. We are all working on the same branch. As long as there are no conflicts, everything works…
Despotovic
  • 1,807
  • 2
  • 20
  • 24
52
votes
16 answers

xcode8 list of simulators not showing

I have been only recently working with Xcode 8 beta 4 but it has been working fine up until now. The list of simulators is not showing for any of my projects. I already tried Creating a new Scheme and it did not work. How do I fix this?
Ryan Cocuzzo
  • 3,109
  • 7
  • 35
  • 64
52
votes
9 answers

Can I set the default simulator for new projects in Xcode 7.1 or latest?

I've been making a ton of new projects as I'm learning Swift. My development is all on my laptop, so I hate using the default 6s Plus simulator, since the window is too big to easily see. Is there a way to change the default simulator to be a…
Evan Pon
  • 1,496
  • 1
  • 13
  • 22
52
votes
7 answers

Detect shake gesture IOS Swift

I'm developing a app with a gesture system, basically if I turn the iPhone to left my app will do a function, if I turn the iPhone to Right, other function, with others gestures. I don't have idea how to work with that, i'm trying search in google…
FelipeRsN
  • 887
  • 1
  • 9
  • 19
52
votes
2 answers

What is Generic iOS Device in Xcode 7.1 run destinations list?

I found a strange option in my simulators list in Xcode I've never seen before. Generic iOS Device in Build Only Device Interesting, but when I try to build for this device - I get error: A build only device cannot be used to run this target. Please…
ShurupuS
  • 2,923
  • 2
  • 24
  • 44
52
votes
8 answers

Xcode 7.1 Swift 2 Unknown class in Interface Builder file

I've created new Cocoa Touch File. Named it SwipingViewController. Then try to add Custom Class to ViewController. And when I run the app I receive an error 2015-10-09 10:53:25.054 ParseStarterProject[5369:389307] Unknown class…
Alex Belke
  • 2,143
  • 5
  • 17
  • 24
52
votes
3 answers

Symbol hiding in static libraries built with Xcode

I'm trying to figure out whether I can build a static library that hides all of its internal objects and functions, etc, except for the interfaces I want to export. I'm experimenting with Xcode (gcc 4.2). I've used the…
Ben Zotto
  • 70,108
  • 23
  • 141
  • 204
52
votes
4 answers

Fabric release Xcode 6.3 codesign xcode-select

I'm trying to upload a release to Fabric & I'm getting errors as follows. I'm using the Xcode 6.3 (recently updated). Xcode: 6.3 Fabric: 1.1.3 OSX: 10.10.3 What should I do to resolve above error & continue uploading the release via fabric…
sagarkothari
  • 24,520
  • 50
  • 165
  • 235
52
votes
3 answers

If not let - in Swift

is there is a way to negate the "if let" in swift? This looks silly to me: if let type = json.type { } else { XCTFail("There is no type in the root element") } I can't use XCTAssertNotNil, because json.type is a enum. enum…
Peter Shaw
  • 1,867
  • 1
  • 19
  • 32
52
votes
6 answers

How do we manually fix "ResourceRules.plist: cannot read resources" error after xcode 6.1 upgrade?

We are having the same issue found here, here, here and here Basically we upgraded to xcode 6.1 and our build are getting the "ResourceRules.plist: cannot read resources" error. We have a Jenkins server that does our ios builds for us. We are using…
Tim
  • 1,191
  • 1
  • 11
  • 11
52
votes
5 answers

Xcode throws an exception in Main() in iOS 8 with 'all exceptions' breakpoint

I am using Xcode 6 (GM, I didn't download betas), and I am developing apps for iOS 7+. For all my projects, I just opened the same projects I used to work on in Xcode 5. In the Breakpoint navigator, I have the All Exceptions breakpoint on. It is set…
invalidArgument
  • 2,289
  • 4
  • 24
  • 35