Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

App Store Connect Upload Fails with Icon Alpha Channel Error in Xcode 26 Beta 4
After updating to Xcode 26 Beta 4, I can no longer upload my app to App Store Connect due to a WatchKit icon validation error. The error states: Invalid Icon. The watch application 'YourApp.app/Watch/YourWatchApp.app' contains an icon file 'Icon Image-AppIcon-watch-1024x1024 @1x.png' with an alpha channel. Icons should not have an alpha channel. • This file name doesn’t exist in the asset catalog or project source. • All icon assets used in the Watch App’s AppIcon set, including the required 1024x1024 icon, were checked with sips -g hasAlpha and confirmed to not contain an alpha channel. • Project was cleaned, derived data cleared, and archive recreated multiple times. • This issue only began after updating to Xcode 26 Beta 4. In the previous versions, everything was ok. Is anyone else experiencing this after upgrading Xcode to Beta 4? Any idea/workaround on how to solve this would be appreciated.
7
2
192
Jul ’25
Xcode 16.2 not seeing iOS 18 devices
Ever since I updated to Xcode 16.2, no device running iOS 18 shows up in Xcode. I can see the devices in Finder and Apple Configurator, but not in Xcode. When I run xcrun devicectl list devices, I also do not see the devices, so I assume the issue is in CoreDevice somewhere. I've tried many things I've seen suggested in similar threads (toggling developer mode, reinstalling Xcode, using a different physical cable, etc) and so far nothing has helped. This same behavior is also happening for my entire development team, which has been as difficult as you might imagine. Any info on how to resolve this would be much appreciated.
7
3
6.6k
Feb ’25
Predictive Code Completion stopped working on new MacBook Pro
Happy to have a new MacBook Pro M4 now - the new machine was setup from time machine backup of my old MacBook Pro M1. Sadly Predictive Code Completion does not work on the new M4 (it was working great on the M1). Xcode shows as downloaded component: Predictive Code Completion Model [com.apple.fm.code.generate_small_v1.base: 500.1.81600.13.200772,0] [com.apple.fm.code.generate_safety_guardrail.base: 1.6.81619.13.200716,0] [com.apple.gm.safety_deny.input.code_intelligence.base: 32024010.20241007.171244.100.377,0] [com.apple.gm.safety_deny.output.code_intelligence.base: 32024010.20241007.171244.100.377,0] (Installed) Things I already tried: Removed and reinstalled Xcode 16 (also latest beta). Disabled/enabled Xcode Editor Settings for predictive code completion Many many reboots Removed Xcode cache Maybe the downloaded Model is somehow locked to the old machine? How can I remove, redownload or reinstall it again? Thank you very much. Tobias
7
5
1.7k
Dec ’24
I have a bone to pick with Xcode
Despite Xcode being the one and most used IDE for iOS, it is far from perfect. I have used many tools in my career and here are some features, that would make it much better or what I miss from other IDEs. I encourage others to chip in discussion and lets all hope, Apple starts to improve Xcode. Will put each issue in separate comment below. Slow debugger: not sure what bloat Xcode has or what it is doing, but sometimes it can take more than 10 seconds from breakpoint firing to actually see values. Moreover when debugging SwiftUI or something objC I have to drill down to see value of property or use po and p command and hope it works. SwiftUI views and states are a big pain to debug, to see what is changing a value I have to always use didSet trick or some other black magic. Is it too hard to make it easier? Breakpoints with condition can take up to 1 minute to load and I have M1 Max MBP. Just tried cursor IDE few days ago and breakpoints are much faster and without too much bloat in variable inspector.
7
0
296
Feb ’25
Xcode Canvas preview connected to iPhone error
"Can not preview in this file" Xcode 16.0 iPhone 14 Pro , iOS 18.0 When I choose to start Preview on my iPhone, the canvas screen keeps showing loading circle animation. The iPhone enters the Xcode Previews App but only displays the default screen (Xcode icon& 'Preview from Xcode') I uploaded the some of diagnostics files previews_diagnostics_summary.txt remote_injection.json
7
0
761
Oct ’24
UI Tests on Xcode Cloud fail due to Simulator randomly showing Apple logo
Hello everyone! When I run UI Tests on Xcode Cloud, I often encounter unexpected failures. Checking the screen recording, I found that the iOS Simulator could go into a black screen with a white Apple logo and a progress bar for a period after the test starts. This behavior of the Simulator causes my app's UI Tests to fail randomly, which greatly affects the practical use of UI Tests. I suspect this phenomenon is unrelated to my app and test cases, so I'm asking if anyone else has encountered a similar issue. 🤔
7
10
1.1k
Apr ’25
Can build my app but not Archive
Apologies that this is probably a simple problem. I've started from a sample code provided by Apple and changed it quite significantly. However, I'm not able to Archive the app. The original visionOS sample code has the same issue, so hopefully someone will be able to spot the problem: https://developer.apple.com/documentation/visionos/creating-stereoscopic-image-in-visionos The problems shown in the log are: Undefined symbol: _main Linker command failed with exit code 1 (use -v to see invocation) The first error seems to say that there's no "main" but there is indeed a @main in the EntryPoint.swift file. Any ideas? I have archived other apps (built from scratch) successfully, but clearly there's something different about this sample code. Many thanks!
7
1
559
Jan ’25
Swift Package Manager Stuck in Loading State in Xcode 16
I’m having an issue with Xcode 16 where the Swift Package Manager is stuck in the "Searching All Sources" state. It only shows Apple Swift packages and is not listing any of third-party packages. I’ve tried completely reinstalling Xcode, but the problem persists. Has anyone else encountered this issue? Any suggestions on how to resolve it?
7
2
1.7k
Sep ’24
Slow incremental build times with xcodebuild command
When I compile my Xcode project using the xcodebuild command, I observe long incremental build durations. For example, compiling a new, empty project in Xcode only takes around one second. The same project takes 7 seconds to compile using the xcodebuild command. I've noticed that xcodebuild hangs at the "GatherProvisioningInputs" phase. Steps to Reproduce: Create a new Xcode project (iOS app template) Build the project in Xcode with timing summary enabled Build the same project from the command line with the following command: time xcodebuild -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=latest' I would appreciate any insights or suggestions on how to improve the build times when using the xcodebuild command. Thank you in advance for your help!
7
7
4.7k
Oct ’24
tvOS icon missing layers
I have an AppleTV app which I released in 2016. I've updated it and released a new version every year without much hassle. This year, with tvOS 17.2, the layered app icon isn't working right. This is a two-layer image made with PNGs. When it's selected, it looks right and the layers move correctly: But when it's not selected, the background layer disappears: Screenshots are from the simulator but it also happens on the device. It's inconsistent; sometimes it's the front layer that disappears. Occasionally both layers work, but I can't tell why. I've spent a day trying everything. Very frustrated. The icon previews correctly in Xcode and in Parallax Viewer. The image sizes are correct: 400 x 240 for Small, 800 x 480 for Small@2x, 1280 x 768 for Large. The back layer is a non-transparent PNG. I tried adding a Large@2x set. Didn't help. Originally I had a three-layer image with no middle layer PNG. I deleted the empty middle layer, but that didn't help. All the PNG files are from GnuIMP. Same color space, even. I was using the filenames tvicon-back-s.png and tvicon-back-s@2x.png. I tried taking out the @ sign in case that was confusing Xcode. (It never has before, but I am flailing here.) Anybody have any clues? If it's an Apple bug and there's nothing I can do, I'm going to just push the release button and hope it fixes itself someday.
7
0
1.4k
Aug ’25
Xcode freezes/ hangs on startup and does not load any application
I recently updated my M1 mac to Monterey 12.5.1 and since my xcode fail to load my project. Xcode opens and hangs as seen in the picture. I have to force quit to close. The installed version of xcode is Version 13.4.1 Things I have tired: Completely removing and reinstalling xcode from the dev site Restarting device Suggestion from here https://stackoverflow.com/questions/11247008/xcode-freezes-on-startup-while-loading-project Even if I fully create a new project from the start screen, it still freezes on load Nothing seems to be working. Wondering if anyone can help Thanks
7
2
6.5k
Sep ’24
Xcode 16 Do not display comments correctly
Comments are not displayed correctly in Xcode 16. As you can see on the included screenshot, the first /// are displayed correctly but the remaining ////////////////////////// are super small. In a programming text editor, like Xcode, all characters MUST be monospaced. Otherwise it is impossible to code. Xcode is not supposed to be a word processor. There are no parameters to fix that. It was working fine for the past 15 years on Xcode. Please fix that so I can work again. And never do that ever again. Understood?
7
0
658
Apr ’25
SwiftData/ModelCoders.swift:1762: Fatal error: Passed nil for a non-optional keypath
I updated today at Xcode 16 beta 6, and my app using SwiftData on iOS 18 (beta 6) is getting now this new error when saving the model in the modelContext. I don't understand if it is a regression introduced in the beta 6 or if it is enforced something that previously wasn't. It seems to be always referred to the ID property, for example: SwiftData/ModelCoders.swift:1762: Fatal error: Passed nil for a non-optional keypath \MyModel.id In this case (and in most of the cases in my models) the ID is defined as following @Attribute(.unique) public var id: UUID I also tried to add the initialization inline, but didn't help @Attribute(.unique) public var id: UUID = .init() I also tried to remove the @Attribute(.unique), didn't help as well. Does any of you have the same issue?
7
3
1.6k
Nov ’24
Xcode Extension isn't show up in the Editor menu
https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension I created new MacOS project and added a Xcode Source Editor Extension target to the project. I run the extension in debug mode with extension target, but the extension is not show up in Editor menu debug mode Xcode. Xcode version is 15.3(released) MacOS version is 14.4.1 Sonoma
6
0
1.9k
Mar ’25
Xcode 26 beta 3 - Metal toolchain installed but not working
Under Xcode 26 beta 3 I'm trying to build a project which uses Metal. I've installed the Metal Toolchain 26.0 under Settings -> Components, but when I start a build it fails during the "Prepare build" step with the following error (repeated many times): stat(/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.1.5276.7.Pb9SLL/Metal.xctoolchain/usr/bin/clang): No such file or directory (2) I've confirmed that there is in fact no 'clang' binary in that directory. I've tried using xcode-select to set the Xcode 26 Beta app as the active developer directory, and xcodebuild -version shows: Xcode 26.0 Build version 17A5276g Any ideas on other things to try?
6
1
265
1w
Xcode 15 will not connect to ios17 device via network
I'm unable to debug on iPhone 12 running iOS 17 beta 3 via network. I'm running Xcode 15 beta 6 Device shows in devices and simulators and I can debug when connected with cable. However the "Connect Via Network" option is frayed out, oddly however the checkbox is ticked I'm developing a app using RoomPlan so network connectivity is a must for debugging Anyone else encountered this and know how to get around this problem Other devices running iOS 16 connect via network just fine
6
3
5.1k
Mar ’25