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
414
Jul ’25
Xcode GPU capture missing initial buffer data
I'm using the WebGPU abstraction library wgpu to build an app using compute shaders that compiles to Metal (on macOS), and in certain patterns where it uses a staging buffer for initial data, the data is just total missing from the capture, breaking other workflows such as shader debugging or seeing the completed results in the final buffer. I wrote up details including a repro project and screen shots of the issue at https://github.com/gfx-rs/wgpu/issues/8111 . Seems like an Xcode bug. Any ideas? I'm happy to help investigate further if I can.
0
0
33
11h
Install HelpBook in application
The Apple documentation is from the 10.6 era and appears to be not correct for the modern OS. I have the help book prepared as a html document. What needs to be done to take this html document (html text and in the same directory a directory with all the image files. In Firefox the html document displays correctly. What modifications are necessary for the html document? And where do I lace this in the application bundle?
1
0
26
15h
XCODE16.4 UNABLE TO DOWNLOAD iOS 18.6 RUNTIME ON MAC 15.5
I'm experiencing an issue here on my Xcode 16.4, where i can't download the supported iOS 18.6 runtime because it stays stuck on the 'preparing' state. I have also tried getting it manually from the dev site but they only have 18.2. The only runtime that would download easily via Xcode was 17.5 but I can't build my project with that. I have tried using curl to even get a download url, nothing worked. All my terminal approach didn't work also. Any help or guidance to sort this out? Thank you.
0
0
42
1d
How do I use IOUserSCSIPeripheralDeviceType00?
I am having similar problems to this guy on Stack Overflow over a year ago: https://stackoverflow.com/questions/77627852/functions-of-iouserscsiperipheraldevicetype00-class-in-scsiperipheralsdriverkit There are also a few questions on this forum about this object, none of which have answers. I can get my driver to match and instantiate, but nobody calls my UserDetermineDeviceCharacteristics (which does nothing, just returns kIOReturnSuccess) I can attempt to call UserSuspendServices(), UserResumeServices() or UserReportMediumBlockSize() and all of them return kIOReturnUnsupported. It doesn't matter if I've unmounted the disk or not. Is the custom driver supposed to be instantiated beside the kernel's IOSCSIPeripheralDeviceType00, or should it replace it? What should its IOProviderClass be? What should its IOClass be - IOUserService, or something else? see FB19678139 and FB19677920
0
0
71
1d
Xcode 16.4 Can't Attach to iPhone app for debugging
Xcode will transfer the app to the iPhone, and I can run it on the iPhone, but the Xcode debugger fails to attach. I am using iPhone 14 Pro with iOS 18.6. I've tried connecting via cable, also via network - same issue both ways. The message raised by Xcode says: Could not attach to pid: "6303" Ensure “<a\AppName>” is not already running, and has permission to debug it. I don't know how to determine if I have permission. I assume I do; I am the owner of the account, with admin role.
0
0
57
1d
Question about Xcode
I was working on an app I'm trying to create. It includes an Apple Watch paired with an iPhone. I am creating an Info.plist file, but every time I do it, I get either two errors: One saying that multiple commands are creating an Info.plist file. To fix this command, I turned off "Generate Info.plist file" in Build Settings. After I do that, I get a new error: One saying that no command creates an Info.plist file. To fix that, I made sure the target for the Info.plist file is set to my watch. I am going in circles, and I keep getting errors. Can anyone help?
3
0
74
2d
Side-by-side comparison in source code changes view
I am trying to move over from AppCode/Intellij to Xcode. I am however having a hard time with the version control tools. I know that you can choose side-by-side when you activate "code review" and select single files. However, if you go into changes and view the list of files that have changed, i can only get inline-view to work. This is really frustrating to me, is there any way to get side-by-side also when you select a file from the changes list? Cheers
0
0
54
2d
iOS 26 Beta 6 in Simulator
Is iOS 26 Beta 6 available in the iOS Simulator? I saw that the latest betas launched earlier this week. I updated my dev machine to macOS 26 Beta 6, however this release had no corresponding Xcode 26 Beta 6. So I am still running Xcode Beta 5 and when I go into Settings -> Components within Xcode there is no option to install iOS 26 Beta 6. It's still running Beta 5 for macOS and iOS. Is that correct? My current assumption is that iOS Beta 6 is for physical devices only?
1
0
72
3d
Firebase dependencies on Xcode
Hi everybody! I am pretty new to app development. I started by creating an app and linking it to Firebase as DB. I had added them directly on Xcode (File>Add Package Dependencies>...). Then I needed one specific package that was not there, so I started using cocoapods (all from the terminal), but it didn't work. When I deleted the ones from cocoapods (I am not 100% sure I deleted everything I had to), I started using the packages in the first way, but now it doesn't even build with the packages I have. I checked many times and I actually have those packages, but it does not work at all. Any suggestions on how to solve it or who I could contact? Thanks.
1
0
27
3d
iOS Simulator APNs Device Token is not received when running in a Mac VM
Starting Xcode 14, iOS Simulator is able to communicate with APNs in order to register for notification in the sandbox environment. I created a sample test for this. A dumb iOS application that registers for notifications. It has UITests to automatize the tap on the consent popup (it is not possible to ask for the permission via CLI sadly). Once the application registers, the AppDelegate method didRegisterForRemoteNotificationsWithDeviceToken is called and the device token is sent to a local server application (node.js). The test itself creates an iOS 18.6 Simulator with xcrun simctl, builds such app and run the tests through through CLI with xcodebuild. Running this on my personal Macbook Pro M1 2021 goes well every time, so I wanted to bring it on Github Actions (arm64 macOS machines), in order to test the works on a open source library I'm building (hapns). Contacting Github support led me to test this on a macOS image running inside a VM inside a Veertu Anka container on my personal Macbook Pro, due to an VM architectural limit suspicion. The results were the same: iOS simulator isn't able to receive the device token. Not even didFailToRegisterForRemoteNotificationsWithError is called (tested through some network probes-requests that communicate to the server which checkpoints the process reached). So, as asked, I've setup a repro-case to be run in the VM and I've collected VM diagnostics ready to be tested and attached. Does anyone know if there is some unspecified (or specified but buried in the documentation) limit for this? Thanks. Github discussion link for further details, repro-case and so on: https://github.com/actions/runner-images/issues/12747
5
2
80
3d
Tab bar controller drag and drop order of items not working
Hi I'm using Xcode 16.4 on a Mac mini m4 so please let's not get in the weeds about latest this or that for software, etc... I'm trying to move one of the tab bar items in the controller, the home item, the the far left and I can grab it and drag it but it won't drop anywhere except where it exists. the other items won't move either. I've googled this and not finding anything stating you have to do a key combo, etc... which I've tried the command, option and control keys each with the dragging. Also the ability to actually select and item to drag it is extremely inconsistent, sometimes it grabs it and most of the time it doesn't. do I need to just delete the connectors and add them back in the proper order? is that really the solution here?
2
0
69
4d
Problems compiling xcframeworks using Carthage with the latest Xcode beta
I use Carthage to build a set of dependencies. I generate .xcframework files with code for both macOS and iOS. This works through Xcode 26 beta 4. With Xcode 26 beta 5, the resulting .xcframework files seem to have code only for iOS, not macOS. Each framework has a ios-arm64 directory and a ios-arm64_x86_64-simulator directory, but no macos-arm64_x86_64 directory. This is affecting 3 of my 7 cross-platform dependencies that I compile with Carthage. What those 3 seem to have in common is that each has one target and scheme for the shared library – instead of one for iOS and another for macOS. I may have to create a second scheme and target in each of these dependencies, or move to SPM. But I am wondering if anyone has another suggestion. Thank you. John
5
0
63
4d
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.
0
1
33
4d
Future configuration options and support for custom MCP servers in Xcode
I’m exploring the new AI-assisted development features in Xcode 26, particularly the integration with MCP (Model Context Protocol) servers. I have two related questions about future capabilities: 1. Configuration flexibility – Will future versions of Xcode provide more granular configuration options? For example, being able to adjust model parameters, set custom request headers? 2. Custom MCP servers – Will it be possible to connect Xcode to a custom MCP servers? It would be great to know if these capabilities are on the roadmap, and if so, what the expected level of customization might be. Thank you.
0
0
34
4d
Xcode 26 beta 5 xcodebuild crash
Good day! When your project have total 887 or more SPM local targets and then you try to build it, xcodebuild will be crash. Crash log: SWBBuildService-2025-08-11-151103.ips Thread 2 Crashed:: Dispatch queue: com.apple.root.default-qos.cooperative 0 libxpc.dylib 0x197c4826c _availability_version_check + 8 1 libswiftCore.dylib 0x1a9b44428 __isPlatformVersionAtLeast + 92 2 libswiftCore.dylib 0x1a9a6e054 _swift_allocObject_ + 1100 3 SWBMacro 0x104a9c408 specialized _ArrayBuffer._consumeAndCreateNew(bufferIsUnique:minimumCapacity:growForAppend:) + 116 4 SWBMacro 0x104a97b58 specialized Array.append<A>(contentsOf:) + 116 5 SWBMacro 0x104a954e8 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 160 6 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 7 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 8 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 9 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 10 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 But if you try to build Package.swift via swift build command, it works. Here you can open sample project: Just Package.swift with SPM 900 targets Open Package.swift via Xcode 26 any beta and try to build Xcode workspace with SPM 900 targets Open MyApp.xcworkspace and try to build You can also make by self the Package.swift (also make required directories for SPM): // swift-tools-version: 5.9 import PackageDescription // let count = 800 // no crash let count = 900 // crash let targetsNames = (1...count).map { "Pkg1Target\($0)" } let targets = targetsNames.map { Target.target(name: $0) } let package = Package( name: "Pkg1TargetLibrary", platforms: [.iOS(.v16)], products: [ .library(name: "Pkg1TargetLibrary", targets: targets.map(\.name)), ], targets: targets )
2
0
116
5d
SwiftUI preview failed, help!!!!!
When I update the macOS from 15.5 to 15.6, Preview error. 1、I try remove simulator cache, sdk 2、remove Xcode build cache 3、reinstall Xcode 4、try with this method https://byby.dev/uninstall-xcode#:%7E:text=Delete%20old%20simulators%20and%20devices,moving%20them%20to%20the%20Trash but all failed swiftui log.txt
3
0
105
5d