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
51
votes
14 answers

Xcode 11 SPM authentication failed because no credentials provided

I started using Swift package manager and when I add repository with https (https://github.com/Alamofire/Alamofire.git) address authentication always fails when I try to login with my github account Xcode authentication fail But if I'm using…
Simonas Daniliauskas
  • 2,276
  • 2
  • 10
  • 15
51
votes
6 answers

Flutter: Could not find the built application bundle at build/ios/iphonesimulator/Runner.app

I am trying to run my application in debug mode from VSCode. However, every time, regardless if I am running on a simulator or a real device, the debug console outputs Could not find the built application bundle at…
Cuiboy
  • 693
  • 1
  • 5
  • 6
51
votes
12 answers

How to read current app version in Xcode 11 with script

Until Xcode 11, I used a script that reads the current app version (for the AppStore) and help me change the LaunchScreen since we can't use swift for…
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278
51
votes
5 answers

How to upload to App Store from command line with Xcode 11?

Previously, with Xcode 10, we were using altool to upload to App Store: ALTOOL="/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool" "$ALTOOL" --upload-app --file…
Cœur
  • 37,241
  • 25
  • 195
  • 267
51
votes
8 answers

iOS Simulator would like to access microphone every time

Since the update to macOS Mojave, I get this alert every time I run on the simulator: "" would like to access the microphone. It is stopping the simulator from running! How can I stop it?
Udi Levy
  • 611
  • 1
  • 6
  • 7
51
votes
11 answers

How can I find and replace inside a selection in Xcode?

In Xcode < 4, you could hold the "option" key, and the "Replace All" button would change to "Replace in Selection". As of Xcode 4, this does nothing. Anyone know if there's a new way to do it, or is it bug filing time?
DougW
  • 28,776
  • 18
  • 79
  • 107
51
votes
6 answers

Find/Replace in Xcode using Regular Expression

I have the following function calls at several places in my class. [myClass doOperationOne]; [myClass doOperationTwo]; [myClass doOperationThree]; In those lines, I want to search for the following, [myClass doOperationOne [myClass…
EmptyStack
  • 51,274
  • 23
  • 147
  • 178
51
votes
12 answers

Xcode 9 - failed to emit precompiled header

I have a project in Objective-C as well as in swift by taking MyProjectName-Bridging-Header.h and i also configured the Objective-C Bridging Header. Also i have added 'MyprojectName-Swift.h' in .pch file. This works fine on xcode 8.2 but when i…
Shubham
  • 1,230
  • 2
  • 12
  • 26
51
votes
2 answers

Xcode scheme pre-action script not running

Hit build and nothing gets printed in build log. What gives? Xcode Version 8.2.1 (8C1002)
user1951992
51
votes
11 answers

Why "add Push notification feature to your app id" warning even after push-notification showing enabled in App ID?

I am using Xcode8, swift 3, iOS 10 In Targets -> capabilities showing "add the Push notification feature to your app id". I check my APP ID and it is showing pushnotfication enabled in both development and distribution. With same APP IS and…
New iOS Dev
  • 1,937
  • 7
  • 33
  • 67
51
votes
9 answers

How to get Duration from AVPlayer (Not AVAudioPlayer)?

I would like to make a UISlider(scrubber) for my AVPlayer. But since this is not an AVAudioPlayer, it doesn't have a built in duration. Any suggestion on how to create the Slider for fast forward, rewind and progress of the playback? I read the doc…
slowman21
  • 2,505
  • 3
  • 20
  • 20
51
votes
5 answers

How to add Emoji in code?

In Xcode, I've previously gone to Editor > Emoji & Symbols, found some Emoji, double clicked it and had it appear in my code where the cursor is. I'm trying to do that now and nothing is happening. I can't find any way to get the Emoji into Xcode. …
4thSpace
  • 43,672
  • 97
  • 296
  • 475
51
votes
3 answers

Conflicting return type in implementation of 'supportedInterfaceOrientations': - Warning

After upgrading to Xcode 7.0 I get a warning in the UIViewControllerRotation method: - (NSUInteger)supportedInterfaceOrientations: Conflicting return type in implementation of 'supportedInterfaceOrientations': 'UIInterfaceOrientationMask' (aka …
turingtested
  • 6,356
  • 7
  • 32
  • 47
51
votes
2 answers

Setting the Minimum iOS version in Xcode

I'm fairly new to Xcode as I use CocoonJS to build my HTML5 iPhone game but I want to know how to correctly set the minimum iOS version. I've set my deployment target to 8.0 and did a clean and then a build but when I submit to the app store it says…
JamesR
  • 950
  • 1
  • 7
  • 17
51
votes
13 answers

How can I allow background music to continue playing while my app still plays its sounds while using Swift

I created an app and I am attempting to allow the user to continue to listen to their music while playing my game, but whenever they hit "play" and the ingame sounds occur it will stop the background music. I am developing on iOS using Swift. Here…
Nathan Harper
  • 513
  • 1
  • 4
  • 4