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
532
Jul ’25
Does Xcode 26 Still Support Pull Requests?
Does Xcode 26 still support creating pull requests and/or viewing comments from GitHub pull requests associated with the current branch? This used to be possible, but I cannot get it to work with the current version of Xcode (26.0.1). The "Create Pull Request" menu item takes me to github.com directly, instead of presenting a nice UI menu; hence I'm wondering.
0
0
11
2h
Xcode 26 is insanely slow
Hey there Just updated to Xcode 26 on mac OS Sequoia (MBP M1 Max 32GB, 2021, so you know, still pretty decent and capable). Xcode is super slow on building, but also on editing. There is a lag between what I type and what is displayed. Am I the only one experiencing this? Is there something I should look into?
0
0
8
2h
macOS WeatherKit "A server with the specified hostname could not be found"
My code was running with with the version before Xcode 26 RC. I recompiled one last time. Now I'm getting the error: A server with the specified hostname could not be found let now = Calendar.current.date(byAdding: .hour, value: 1, to: Date())! let nextWeek = Calendar.current.date(byAdding: .day, value: 14, to: Date())! do { let (dailyForecast, hourlyForecast, currentWeather, alertWeather) = try await weatherService.weather(for: thisLocation, including: .daily, .hourly(startDate: now, endDate: nextWeek), .current, .alerts) Suggestions?
3
0
66
3h
Extract Subview option missing in Xcode 26
Hi everyone, I recently updated to Xcode 26.0 and noticed that the “Extract Subview” refactoring option seems to be missing. Now, in Xcode 26, the only options I see under Editor -> Refactor -> are: Extract to Selection File Extract to Method Extract to Variable Extract All Occurrences But there’s no Extract Subview as there was before. Was Extract Subview intentionally removed in Xcode 26? Or is it hidden behind a new menu location or renamed?
2
1
57
4h
MacOs Tahoe inspector view crash
My app hangs and I get this error when using an inspector view on macos tahoe. Changing to a different type of view resolves the issue. The window has been marked as needing another Update Constraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window. <SwiftUI.AppKitWindow: 0x8897e0000> 0xb4d8 (46296) {{1004, 182}, {1254, 948}} en Future marking as needing Update Constraints in Window might be ignored. FAULT: NSGenericException: The window has been marked as needing another Update Constraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window. <SwiftUI.AppKitWindow: 0x8897e0000> 0xb4d8 (46296) {{1004, 182}, {1254, 948}} en; (user info absent)
0
0
2
4h
XCode 26: is it possible to remove the preinstalled iOS Platform via xcodebuild?
Hi, as described by the subject, I'm trying to find a way to remove the preinstalled iOS support via command line tool. I need to do that because I need to use the universal architectureVariant in order to build on old Intel-based iOS Simulators, but on iOS 26. As described in this page, I can use this command to download the architecture I need xcodebuild -downloadPlatform iOS -architectureVariant universal however, launching this command I receive this error iOS is already downloaded as arm64Only. To replace with universal, first delete the existing one. Is there any way to remove the current installed iOS platform via command line? In particular I'm serching for a way to do what the button "Delete" in the attached screen does. Thank you
0
0
24
5h
Using ARKit Replay hangs forever on "Attaching to App"...
Hello, I'm trying to use Xcode's ARKit Session replay functionality. I have a capture I made using Reality Composer and when trying to use it with Xcode's replay functionality the installation and debugging process seems stalled forever. I've gotten it to work once so I know the capture file is functional but I have never gotten it to work a second time, even though I didn't change any settings. No amount of restarting Xcode, the Mac, or the iPhone seem to work. I have also tried cleaning build folders, reinstalling the app, and clearing DerivedData. I can confirm from the Xcode logs that the app installs correctly but the app never launches. If I unselect the checkbox for "ARKit Replay Data", the app launches and debugs nearly instantly. I have tried letting it "attach" for up to 10 minutes to no avail.
3
0
306
5h
Xcode 26 beta 3 Extremely Sluggish Run on Device
After updating from Xcode 16 to the new Xcode 26 beta 3, running my iOS app becomes slow to the point of unusable. It builds and installs fine, but when running with the console, it lags about 20-50x compared to building and running with Xcode 16. I wanted to try our Xcode 26 to preview my new app icon made in icon composer but now I don't think it's worth the hassle. When running via simulator, the same performance issues. Anybody also struggling with slow on-device testing speed? I am on Sequoia 15.5.
3
2
288
6h
Matter Media Playback Cluster
Hello, I am currently working on personal project based on Matter. I need to create a Basic Video Player as specified in Matter's standard embedding the Media Playback Cluster. I went through the reading of how Apple now supports Matter as a standard : linkText My understanding of the following schematic, is alongside : HomeKit Accessory Protocol (HAP) Framework API Related HAP accessories underneath the homeKit framework. Developpers also find under the Homekit framework : CHIP (Connected Home IP) Framework API Related Matter accessories this time Both types of accessories/devices can be commissioned in the HomeKit ecosystem seemlessly. Each framework has it's documentation : HAP : https://developer.apple.com/documentation/homekit/hmhomemanager CHIP : https://developer.apple.com/documentation/matter I want through the process of installing XCode and the HomeKit Accessory Simulator. In the list of HomeKit Accessories I did not see any Media related devices : The list of currently supported devices is limited as I read here and will be enriched with time : https://support.apple.com/en-us/102135#:~:text=The%20Home%20app%20currently%20supports,%2C%20temperature%2C%20and%20humidity). In the meantime, as I read the matter documentation, I read several references made to the Media Playback : https://developer.apple.com/documentation/matter/mtrclustermediaplayback https://developer.apple.com/documentation/matter/mtrbaseclustermediaplayback https://developer.apple.com/documentation/matter/clusters#Interacting-with-the-Media-Playback-cluster My questions are : Are Matter Basic Video Players, (Media Playback) supported in HomeKit ? Why aren't they listed in HomeKit Accessory Simulator ? How can I add a Basic Video Player in HomeKit and display it's Media Playback controls once I have added the device to HomeKit ? Thank you for your Answer. Regards David
0
0
7
6h
Xcode 26 Crashes on Launching App After macOS + Xcode Update (M3 Mac)
Hi everyone, After updating my Mac and Xcode to 26, I’m running into a consistent crash whenever I try to launch an app from Xcode. Environment: Mac: Apple Silicon M3 macOS: 26.0 (25A354) Xcode: 26.0.1 (17A400) Issue: When I press Run on any project (including new, empty projects), Xcode immediately crashes. This started only after updating to the latest macOS and Xcode. Crash details: The crash log shows: Application Specific Signatures: ___localError Thread 0 crashed inside -[IDEScheme _executionOperationForSchemeOperationParameters:...] from IDEFoundation/IDEKit. I also noticed background threads calling DVTPortal (developer portal requests) right before the crash. What I’ve tried so far: Cleared DerivedData, ModuleCache.noindex, and Xcode caches. Signed out/in of my Apple ID in Xcode. Recreated project schemes. Verified provisioning profiles. Reinstalled Xcode 26. Unfortunately, the crash still happens. Question: Is this a known issue with Xcode 26 on Apple Silicon (M3)? Has anyone seen a workaround? Any guidance would be greatly appreciated — I can’t currently launch apps in Xcode at all. Thanks!
5
2
114
6h
tvOS 26 - AVPlayer.preventsDisplaySleepDuringVideoPlayback not working
Hi guys, after updating to tvOS 26 it is not possible to disable screensaver using AVPlayer.preventsDisplaySleepDuringVideoPlayback. We are streaming TV programs continuously and when player is in full creen we disable screensaver by setting preventsDisplaySleepDuringVideoPlayback = true When leaving player screen and navigating to Home or EPG where player continues to play in the background we set preventsDisplaySleepDuringVideoPlayback = false to enable screen saver in which case after set time screensaver activates. Disabling screensaver appears to be working only when starting the app for the first time, but when making the first transition out of the player and calling preventsDisplaySleepDuringVideoPlayback = false for the first time, then any subsequent change of preventsDisplaySleepDuringVideoPlayback to true has no effect. Result is that player is playing in full screen, but after set period (e.g. 2 minutes) screen saver activates, which is very bad user experience making TV app unusable. I tried using Xcode 26 and targetting tvOS 17 and higher. I installed Xcode 16.4 and rebuilt the app, but I see the same problem with screensaver. Xcode 16.4 and tvOS 17 target worked before. It appears to be related to tvOS 26 not to SDK itself. Is there perhaps a new API to disable screensaver? Is preventsDisplaySleepDuringVideoPlayback obsolete or could it be intention to disallow developers disabling screensaver? Do we need to notify all users to set screensaver time to higher value or Never if they want to watch TV for all day without touching remote? Not sure if it is a bug in tvOS 26 or purposely changed behavior. Does anybody know? Thanks.
2
0
50
7h
Xcode 26.1 freezes
When I try to build my project with Xcode 26.1 beta (17B5025f) it freezes a lot. The steps are as follows: Open my project with the aforementioned Xcode Start a build of one of my schemes Open a browser or any other app above the Xcode window Try to present the Xcode window on the foreground Result: Xcode freezes I cleared the Derived Data and it still happens
0
1
57
10h
Mergeable Libraries & Image assets
We are unable to access images from an Asset catalog that is part of a dynamic framework that is mergeable, on Debug configuration, when running on an actual device under certain circumstances when using Xcode 16.4 and targeting iOS. If anywhere in the app we call the Bundle(identifier:) initializer for whatever ID, subsequent calls to UIImage(named:in:with:) for images in the framework's bundle return nil. We have verified that the bundle (path) and the name of image & assets target memberships are correct, and that Assets.car has the images. Additionally the only way to make UIImage(named:in:with:) work is to use Bundle(for:) where BundleFinder is part of the mergeable library, non private NSObject class. Anything else and the re-exported bundle is returned which has no assets.
1
0
127
17h
Apple Watch stuck on "Copying shared cache symbols" – blocks real-time testing via Xcode
Hi everyone, I’m a student developer currently building a watchOS app that uses HealthKit and HKWorkoutSession to estimate core body temperature from real-time heart rate data. The app runs well in the simulator, but testing on a physical Apple Watch has been extremely difficult. Each time I try to run the app from Xcode (Version 16.3), the build gets stuck on: “Copying shared cache symbols from MyWatchName (0% completed)” Sometimes it just stops stating connection failure. However, more often no errors are shown, but the sync never finishes. I’ve tried the following without success: Restarting the watch, iPhone, and Xcode Switching networks (Wi-Fi and hotspot) USB wired pairing Resetting developer settings and trust prompts Deleting derived data Rebuilding the project This is especially limiting for a real-time health tracking app where I need to monitor HKLiveWorkoutBuilder data while the screen sleeps — which can’t be tested effectively in the simulator.
2
1
162
17h
Xcode 26.0.1 + Unity 6.0+ AR project fails with linker assertion (dylibToOrdinal)
Hi, I’m facing an issue when trying to build a Unity AR project for iOS using Xcode 26.0.1 (Build 17A400) on macOS Tahoe. The build always fails with the following error: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5196. Details: Unity versions tested: 6.0.0 (6000.0.57f1), 6.2.5, and 6.3 beta Xcode: 26.0.1 (latest) macOS: Tahoe Even a fresh Unity AR template project fails (no external plugins or modifications) Deleting derived data, reinstalling Xcode, and re-exporting from Unity doesn’t resolve it Notes: Downgrading Xcode is not possible because macOS Tahoe requires the latest version. Android builds work fine; the issue only happens on iOS. Question: Has anyone else encountered this linker assertion in Xcode 26 with Unity builds? Is this a known bug in the new Xcode linker, or is there a recommended workaround until Unity or Apple updates their toolchain? Thanks in advance for any guidance!
0
0
54
21h
LLDB RPC Server crashing
Hi I am seeing an LLDB crash in the RPC server. I have tried to update and restart everything but I am still seeing this problem. I have break points setup around code that is invoked when a WKWebView based code is being loaded. There does not seem to be a specific state the debugger crashes in and it is hard to isolate any changes in the code base. A collegue also managed to reproduce the crash. Ever so often it will be successful on then to crash on a subsequent run. This has happened on Device and simulator. We suspect that maybe a library change may of caused debug symbols to be missing or something like that. What options to I have to debug the root cause of this crash?
2
0
54
21h
Liquid Glass Effects in iOS 26 Simulators vs Real iPhones
We are seeing some unexpected differences in the appearance of our App when run on a real iPhone (iOS 26 final release) compared to iOS 26 simulators in Xcode 26. Our App run in the iOS 26 simulators (for any iPhone model we try) shows more Liquid Glass effects / artifacts than when run on real devices: In Light Mode buttons in the top Navigation Bar have a surrounding bubble on the simulators. (See attached screen shots.) A SwiftUI Picker element shows more elaborate Liquid Glass transition effects. Also: some UI elements are positioned differently on the simulators compared to a real device. (See the search field under the header on the attached screen shots.) The simulators have in the past been very faithful to the real devices. Is there a setting that controls this behaviour? For the simulator I have: macOS 26.0 Xcode Version 26.0 (17A324) Simulator is iPhone 15 / iOS 26.0 (23A343) Real device is: iPhone 16e iOS 26.0 (23A341)
1
0
48
1d