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
3 answers

How can I preview a device in landscape mode in SwiftUI?

How can I preview a device in landscape mode in SwiftUI? I just have a simple preview like this: struct ContentView_Previews : PreviewProvider { static var previews: some View { ContentView() } }
Felipe Peña
  • 2,712
  • 4
  • 22
  • 41
49
votes
5 answers

Xcode build error - Multiple commands produce .o, Target 'ProjectCoreData' has compile command for Swift source files listed twice

I am running xCode Version 10.1 (10B61), Mojave 10.14 (18A391) Searching shows similar issue in Xcode 10 greater than a year ago, but no issues since then. The solution from last year seemed to be switching to legacy mode, but that doesn't work now.…
Joe
  • 1,014
  • 1
  • 13
  • 28
49
votes
16 answers

Swift - Unable to open file in target Xcode 10

I am trying to run Aplication which I have downloaded from GitHub. When I run get error unable to open file in target, I have Xcode 10. I already searched for solution and get this one. I had the same problem, but in Xcode 6.1.1 - what fixed it for…
whatlOol
  • 611
  • 1
  • 5
  • 7
49
votes
7 answers

iOS: popViewController unexpected behavior

I've been searching the internet for a solution. There's nothing I could find. So: I'm using a UINavigationController. I am pushing two UIViewControllers onto it. In the second pushed ViewController i am executing this code: -…
Christoph
  • 491
  • 1
  • 4
  • 3
49
votes
11 answers

iOS app testing. App installation failed. No code signature found

I've tried to install my app on several iOS devices. But this thing didn't let me to. I want to know, what the problem is and how should I solve it.
Robert Khaireev
  • 739
  • 1
  • 7
  • 13
49
votes
5 answers

How to create managedObjectContext using Swift 3 in Xcode 8?

Facing issue "Value of type 'AppDelegate' has no member 'managedObjectContext' In new Xcode 8 (using Swift 3, iOS 10) when trying to create new context in View Controller let context = (UIApplication.shared().delegate as!…
Adelmaer
  • 2,209
  • 3
  • 22
  • 45
49
votes
9 answers

storyboard positioning text below image inside a button

I am able to set the image and text for button. But it is aligned horizontally. I want the image and text to be aligned vertically inside the button. i.e., text below the image How to make these changes using storyboard? What I want is this: What I…
Ahalya Hegde
  • 1,571
  • 2
  • 18
  • 41
49
votes
8 answers

Taking screenshots in Xcode

I am currently trying to take screenshots of my app in order to publish it to the App Store. The problem is when I take a screenshot on the iPhone 6S simulator (4,7 inch) and upload it to the iTunes Connect it says the dimensions are too small…
Tsvetilin Boynovski
  • 626
  • 1
  • 5
  • 10
49
votes
10 answers

xcodebuild -exportArchive: exportOptionsPlist error for key 'method': expected one of {}

I'm using command line xcodebuild tool to export ad-hoc distribution ipa file out of my archive like this: xcodebuild -exportArchive -archivePath /path/Archive.xcarchive -exportPath /path -exportOptionsPlist /path/options.plist However, this…
Vladimir Grigorov
  • 10,903
  • 8
  • 60
  • 70
49
votes
8 answers

You are not authorized to make purchases of this InApp in Sandbox at this time

I'm trying to make in-app (non-consumable) in my app. I'm trying to buy the package but I can't... Of course, I've looked here for answer, but I have one actual account everywhere - at developer.apple.com - also I've created provisioning profiles,…
DiDinko
  • 523
  • 1
  • 4
  • 11
49
votes
12 answers

UINavigationBar background color not the exact UIColor I set it to

Please look at the screenshot below. I set all the tint colors from the same UIColor object for the UINavigationBar, search bar and toolbar at the bottom. But for some reason the navigationbar color is slightly different. What could be the reason…
ozg
  • 17,532
  • 5
  • 19
  • 21
49
votes
26 answers

Receive message "A signed resource has been added, modified, or deleted" when trying to debug an App on iPhone

While attempting to debug a build created using the 3.2 SDK on an iPhone device I receive the message "A signed resource has been added, modified, or deleted.". I can clean, rebuild, then install with no error, but if I try to install without…
jessecurry
  • 22,068
  • 8
  • 52
  • 44
49
votes
3 answers

How to collapse all issues in the Xcode issue navigator

I am porting a huge C++ project to OS X. After my initial compile with Xcode I have multiple errors in many files I want to investigate. Problem is that the issue navigator shows all files non collapsed after each compile: So I have to collapse all…
Alexander Theißen
  • 3,799
  • 4
  • 28
  • 35
49
votes
4 answers

Apple Mach-O Linker Warning Directory not found

I have spent my last five hours looking for this weird situation a reasonable explanation. Here is the warning: ld: warning: directory not found for option '-L/Users/oasis_weng/Desktop/My Life/Life For…
donkey
  • 4,285
  • 7
  • 42
  • 68
49
votes
16 answers

duplicate symbols for architecture armv7

Getting following error when try to use Layar SDK in my existing app. How can I solve this? Ld /Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaqisdfliwbzxbixsaifljcl/Build/Products/Debug-iphoneos/hub.app/hub normal armv7 cd…
Paresh
  • 993
  • 1
  • 7
  • 15