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
54
votes
6 answers

Xcode 5 app submission issue

Some days ago I installed Xcode 5. Today I'm trying to submit an app, but during validation I'm getting this issue: "The network connection was lost". I've never had any problem with Xcode 4. My network is OK and I'm not using any proxy. What is…
Enrico
  • 571
  • 1
  • 4
  • 4
54
votes
9 answers

UIWebView didFinishLoading fires multiple times

I have some code that needs to run after the a UIWebView finishes loading a document. For that I've set the UIWebView's delegate to my controller, and implemented the webViewDidFinishLoading method. This gets called multiple times, depending on the…
Ben Scheirman
  • 40,531
  • 21
  • 102
  • 137
54
votes
8 answers

Xcode: Not on any development teams

I'm developing and selling apps on the Mac App Store and today, when I wanted to refresh and add new provisioning profile in Xcode (Organiser), this error showed up: (Not on any development teams. The indicated user is not on any development…
tamasgal
  • 24,826
  • 18
  • 96
  • 135
54
votes
21 answers

Fixing file 'project.pch' has been modified since the precompiled header was built error in Xcode

I was recently working on my application messing around in the info.plist section, and since that my application will not run on my test device: file 'project.pch' has been modified since the precompiled header was built Something to note is that…
user1542348
  • 583
  • 1
  • 4
  • 6
54
votes
37 answers

Xcode Cannot Run on the Selected Destination

I was running my app this morning and now all of a sudden I am getting the following error when I try to run on the iPhone 5.1 simulator. Cannot run on the selected destination The destination does not support the architecture for which the…
azamsharp
  • 19,710
  • 36
  • 144
  • 222
53
votes
3 answers

What is "UserInterfaceState.xcuserstate" file in Xcode project?

I use svnX. When importing project, I check "no ignore" option. (for importing libOAuth.a, ...) But one file is causing a small problem. UserInterfaceState.xcuserstate What is this file? Can I ignore this file? Is it important? Should I commit…
ChangUZ
  • 5,380
  • 10
  • 46
  • 64
53
votes
8 answers

Xcode 4 shortcut for swapping focus between editor and assistant editor

In Xcode, I am big fan of the assitant editor that shows me the corresponding .h or .m for the file that I am editing. Is there a shortcut that allows me to swap focus between this two windows? I frequently switch between the two and using the mouse…
Alec Gorge
  • 17,110
  • 10
  • 59
  • 71
53
votes
16 answers

How to dismiss number pad keyboard by tapping anywhere

I'd like to know the simplest code to dismiss the number pad keyboard when tapping anywhere outside the number pad. It's a simple application to input a number inside a text field and then a user can dismiss the keyboard after the user finishes…
jsanmtosj
  • 563
  • 1
  • 7
  • 12
53
votes
1 answer

How to check for NaN value in Objective-C (iOS)

Possible Duplicates: Objective-C - float checking for nan Determine if NSNumber is NaN I have a problem with NaN values in CGFloat, how can I check if the number is valid? the only way so far that works is: if ([[NSString stringWithFormat:@"%f",…
Ondrej Rafaj
  • 4,342
  • 8
  • 42
  • 65
53
votes
9 answers

Center View horizontally in SwiftUI

How can I center horizontally a View (Image) in an HStack? I want a button to be left aligned and the image to be centered horizontally the view. Currently I have this structure: VStack { HStack { Button(action: { …
SwiftiSwift
  • 7,528
  • 9
  • 56
  • 96
53
votes
3 answers

UIWorkIntervalTiming workIntervalStart

Getting console log while scrolling ScrollView. Is there way to remove this? 2019-03-27 12:33:34.109573+0530 MyApp[10465:46241] [UIWorkIntervalTiming] workIntervalStart: startTimestamp > targetTimestamp; rolling forward by 1.116667
SPatel
  • 4,768
  • 4
  • 32
  • 51
53
votes
1 answer

Xcode4 - Build for Archiving greyed out

Possible Duplicate: Xcode 4 - “Archive” is greyed out? I want to submit my iOS App via Xcode 4. The problem is that I cant do the Build for Archiving. Its Inactive and Gray (the Menu Item Product->Build For->Build For Archiving) and i dont know…
Hernd DerBeld
  • 563
  • 1
  • 5
  • 7
53
votes
4 answers

How to Remove Warning: "-pie being ignored. it is only used when linking a main executable"

Since updating to Xcode10 and Swift 4.2, I always get this build time warnings in my pod. what do I have to do to remove these warnings? I have tried to delete derived data, clean and build project, but it doesn't work :( I find someone asks the…
sarah
  • 3,819
  • 4
  • 38
  • 80
53
votes
1 answer

Multiple commands produced error xcode 10

I am working on an iOS app. It is working fine in Xcode 9.4.1, but when I build it in Xcode 10 it gives me following error: :-1: Multiple commands produce…
Akshay Sunderwani
  • 12,428
  • 8
  • 29
  • 52
53
votes
4 answers

Core Data primary key ID for a row in the database

Suppose I have a list of books stored in Core Data. I want to search for a book by it's primary key ID. I know the sqlite file created by Core Data has an ID column in each table, but this doesn't seem to be exposed to me in anyway. Does anyone have…
WoodenKitty
  • 6,521
  • 8
  • 53
  • 73