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
1.2k
Jul ’25
Broken autocomplete in Xcode 26
Xcode 16 and 26 changes in painful way how the Tab key works during autocomplete. Previously, pressing Tab would extend the typed text up to the word match. For example, we have two classes: NSViewController and NSViewCoordinator BEFORE, typing: "NSV" + Tab used to complete to NSViewCo Now, in Xcode 26, pressing Tab just use the first suggestion. Stupidly. Especially when you want DispatchQueue and it gaves you DispatchSemaphore… That is very inconvenient because very often I want just see all possible cases with some prefix...without need of typing all prefix manually. How to restore the previous behavior? How to do autocomplete word-by-word?
13
0
508
3h
Xcode 26.3 not rendering Unicode/Emoji in Simulator or Canvas
I'm based in Australia, and am having the following issue. After leaving this message I received another response from someone else who is also havign the same issue, I've pasted that too. I'm quite surprised to not see it mentioned, could be local to language settings or something. Here is the issue: Folk, I am having an issue where Xcode 26.3 with the new iOS26.2+26.3.1 Simulator update installed doesn’t render Unicode characters in the Canvas or in Simulator. They do render when running direct to a device. I’ve reset devices inside Simulator, cleared Derived Data, cleaned Build Folders etc but to no avail! Is anyone else seeing this, I can’t find a mention anywhere!! Thank you in advance. Yep. Same here. Can't see emojis on the emoji picker keyboard.
8
15
1.2k
5h
Apple watch Xcode pairing & connection issues
I’m blocked debugging a watchOS app on a physical Apple Watch. The iPhone connects to Xcode normally (wired), but the Watch either fails to connect with a tunnel timeout or disappears entirely from Xcode after I unpaired it inside Devices & Simulators. Environment Mac: macOS 26.x (Apple Silicon Mac) Xcode: 26.2 iPhone: iOS 26.1 Apple Watch Ultra: watchOS 26.2 (build 23S303) Connection: iPhone connected to Mac via USB (trusted). Watch paired to iPhone and working normally in the Watch app. Issue A (when Watch is visible in Xcode) In Xcode → Window → Devices and Simulators, the Watch shows up but is not usable and fails to connect. Error: “Previous preparation error: A connection to this device could not be established.” “Timed out while attempting to establish tunnel using negotiated network parameters.” In some attempts the Watch shows “Capacity: Unknown” / limited details, and then fails during preparation. Issue B (after unpairing Watch in Xcode only) I unpaired/removed the Watch in Xcode (Devices & Simulators). I did not unpair the Watch from the iPhone. Now: iPhone appears in Xcode and works normally for builds. Watch is still paired to the iPhone and works normally. Watch no longer appears anywhere in Xcode Devices & Simulators (no paired watch section, no watch run destination). What I’ve tried Reboots of Mac, iPhone, Watch (multiple times) Watch unlocked, awake; iPhone unlocked and close to Watch Verified Watch is paired and connected in iPhone Watch app Developer Mode enabled on iPhone and Watch Wi-Fi and Bluetooth ON (Mac/iPhone/Watch), tried toggling both Tried on home Wi-Fi and also with iPhone hotspot (same result) Resetting trust prompts / reconnecting iPhone via USB, re-trusting Mac Apple Watch: “Clear Trusted Computers” Xcode: removing/re-adding devices; clearing derived data; restarting Xcode Watch Developer networking test: Responsiveness = Medium (430 RPM) Questions 1. Is this a known issue/regression with Xcode 26.2 + watchOS 26.2 tunneling (CoreDevice / devicectl)? 2. Is there an Apple-supported way to force Xcode to re-discover a paired Watch after it was removed from Xcode Devices & Simulators (without unpairing the Watch from the iPhone)? 3. Any recommended logs or diagnostic steps I should collect (Console logs, sysdiagnose, specific Xcode/CoreDevice logs) to include in a Feedback report? If helpful, I can provide the full error text from Xcode’s Devices window and any logs you recommend. Thank you in advance,
15
8
1.4k
7h
Xcode 26 fails to load SPM packages
For me it looks like Xcode 26 has problems reading SPM packages from a locally hosted BitBucket git solution. While Xcode 16 work perfectly fine, Xcode 26 fails to load and gives "Server SSH Fingerprint Failed to Verify" as error description. Cleaning build data and DerivedData sometimes makes loading work. Any change in Package dependencies will break it again. Anyone having same problems? How do you handle it?
7
8
678
10h
iOS 26.2 Simulator is not available for download
I'm trying to download the iOS 26.2 simulator, but it fails both in Xcode and via the command line. When I run: xcodebuild -downloadPlatform iOS -buildVersion 26.2 -exportPath ~/Downloads It returns: iOS 26.2 is not available for download. I would like to know: Why iOS 26.2 simulator cannot be downloaded at the moment. Whether iOS 26.2 simulator is still available, or if it has been removed or replaced. How to properly get and install the iOS 26.2 simulator. Any official explanation or solution would be greatly appreciated. Thank you!
3
2
183
1d
ChatGPT in Xcode - Networking error
In the Coding Intelligence feature introduced in Xcode 26, when I send a message using ChatGPT in Xcode, the message “Your request couldn't be completed. Networking error.” appears and I’m unable to use the feature. I suspect the issue may be related to the VPN or network proxy connected to my Mac and am attempting to investigate. However, Xcode does not display any specific error details, nor does it provide a way to view them, which makes a detailed investigation difficult. Next to the error message, there is a feedback button rather than a stethoscope (🩺) button, and the feedback window does not provide access to the underlying error information. Is there a way to view the detailed network error logs generated by ChatGPT in Xcode? (I am using Xcode 26.0.1.)
3
0
183
1d
Xcode not omitting binary of static framework
I'm following the steps laid out in Creating a static framework which states: When a client links and embeds the framework, Xcode 15 or later omits the main binary from the embedded framework bundle because it’s already statically linked into the client. Specifically, I'm adding a new framework target to my project, and then changing the Mach-O type in its build settings to Static Library. What I'm observing when I build (debug or release) is that that the resulting framework folder inside of the app bundle still contains a binary. Furthermore, upon inspecting strings and symbols in both the main app executable and this library binary, it appears that my strings and symbols do end up in the main executable and not in the library binary. Does this mean that this binary is just a stub left behind? Is this intended? Can I safely delete this binary with a build phase script?
1
0
133
1d
Static library links on device but fails on iOS Simulator
I’m working on an iOS workspace with: a static library project: M800SDK a test app project: TestAppObj I was able to build M800SDK for iOS Simulator on Apple Silicon as a simulator static library, and I also verified the architectures in the produced .a file. However, when I link the app target against that simulator build and try to build TestAppObj for iOS Simulator, I get the following linker errors: Undefined symbols for architecture arm64: _OBJC_CLASS_$_TokenMngr clang++: error: linker command failed with exit code 1 Additional context: The library links and works correctly when building the app for a physical iPhone. And the public header TokenMngr.h is found correctly by the app target. The app target is compiled as Objective-C++ where needed. The library is linked in the app target under “Link Binary With Libraries”. Could you help me understand: Is it possible to run on iOS Simulator ? the recommended way to package and consume this library for iOS Simulator on Apple Silicon? Also I am aware i can also build the library for : Any iOS Simulator Device (arm64, x86_64) And specify that on Build Phases in Link : Link Binary With Libraries adding the .a Before i do that i ensure the .a is arm64, x86_64 using the command : lipo -info libM800SDK.a end it returns : Architectures in the fat file: libM800SDK.a are: x86_64 arm64 However, even after confirming those architectures and linking the library to the app target, the app still does not link correctly for iOS Simulator. In some cases, Xcode reports errors suggesting that the build is targeting iOS Simulator, but that one of the linked binaries was built for iPhoneOS instead. This is where I am confused: I understand that lipo -info only shows the CPU architectures present in the library, but not whether a given arm64 slice was built for iPhoneOS or for iOS Simulator
2
0
66
1d
iPhone 17 Pro on iOS 26.3 stays unavailable in xcrun devicectl list devices even with Xcode 26.4 beta 2
I am unable to use my iPhone 17 Pro as a run destination in Xcode. The device appears at a low level, but CoreDevice / devicectl keeps reporting it as unavailable. Environment • Mac mini (Apple Silicon) • macOS 26.3 (Build 25D125) • iPhone 17 Pro • iOS 26.3 • Xcode 26.3 (Build 17C529) • Xcode 26.4 beta 2 (Build 17E5170d) Symptoms • The iPhone appears in Finder • On the iPhone, I tapped “Trust This Computer” • Developer Mode is enabled • Apple ID is added in Xcode Accounts • Team is configured in Signing & Capabilities • iOS Platform Support is installed • The device still does not become available as a run destination • Devices and Simulators does not show it in a usable state • xcrun devicectl list devices still shows unavailable Output of xcrun devicectl list devices Failed to load provisioning paramter list due to error: Error Domain=com.apple.dt.CoreDeviceError Code=1002 "No provider was found." UserInfo={NSLocalizedDescription=No provider was found.}. devicectl manage create may support a reduced set of arguments. Name Hostname Identifier State Model CAC1B56A-C3B4-59FF-8F9D-659277C7C76C.coredevice.local CAC1B56A-C3B4-59FF-8F9D-659277C7C76C unavailable iPhone18,1 What I already tried • Apple cable • Different USB/Thunderbolt ports • Direct connection to rear ports • Restarted both Mac and iPhone • Restarted Xcode • Ran sudo killall usbmuxd • Ran sudo pkill -9 remoted • Upgraded Xcode from 26.2 to 26.3, then to 26.4 beta 2 • Ran sudo xcode-select -s /Applications/Xcode-beta.app • Ran sudo xcodebuild -runFirstLaunch • Reset “Location & Privacy” on the iPhone, then trusted the Mac again • Still remains unavailable Additional note ioreg shows the iPhone, so the physical USB connection seems to exist. However, at the CoreDevice / devicectl layer the device remains unavailable, and Xcode cannot use it for on-device build/run. Is this a known issue with macOS 26.3 / iOS 26.3 / Xcode 26.4 beta 2? Any workaround or additional debugging steps would be appreciated.
11
2
339
1d
Xcode 26 Warning: (arm64) empty dSYM file detected despite correct build settings
Hi Guys, Hope you're well! I am consistently encountering a build warning in Xcode 26 that prevents proper symbolication of crash logs. The warning states: "warning: (arm64) /Users/mickey/Library/Developer/Xcode/DerivedData/CalendarSync-bjuvwxojzofqzzcmzzpdozbujrge/Build/Products/Debug-iphoneos/CalendarSync.app/CalendarSync empty dSYM file detected, dSYM was created with an executable with no debug info." Steps to Reproduce: Open the project in Xcode 26. Build the project for a physical iOS device (arm64) or Archive the project. The warning appears during the "Generate dSYM" phase of the build process. Troubleshooting Steps Already Taken (Issue Persists): Set 'Enable Debug Dylib Support' to No. Verified 'Debug Information Format' is set to 'DWARF with dSYM File'. Verified 'Generate Debug Symbols' is set to Yes. Set 'Strip Debug Symbols During Copy' and 'Strip Linked Product' to No. Performed 'Clean Build Folder' and manually deleted the DerivedData folder. The issue persists regardless of these standard configuration fixes. Expected Result: Xcode should generate a populated dSYM file containing the debug symbols from the executable. Actual Result: An empty dSYM file is generated, making it impossible to symbolicate crash reports.
1
0
34
1d
Issue with getting my IPhone 13 Pro Max into developer mode???
hello and thank you for reading . I am having an issue with getting my phone -13 pro max - into developer mode I have tried all the basic ways and have tried some with help from Ai. But still haven’t gotten my phone into dev mode? Any tricks the for sure work or what should I do ? There is another option I have t tried but don’t have my laptop or access to a computer currently. would very much app help with this thank you in advance .
1
0
21
1d
Xcode 16 warning about missing symbols of static framework
I work on an SDK, and one of the ways we distribute it is as a pre-compiled static XCFramework. As far as I know, it’s the nature of a static framework to not contain symbols since the framework will be embedded in the final app binary, and the symbols should then be generated. However, when testing the "Validate" function of the Xcode 16 deployment process, our users are receiving a warning that says the framework does not contain symbols. Is my assumption about static frameworks and symbols incorrect? Could this be a bug in Xcode 16? Should we modify something in our framework to inform Xcode that symbols are not needed?
46
24
44k
2d
Red "X" showing up for Certificates, Identifiers, & Profiles in xcode
I've upgraded to a new Macbook recently, just when I was setting up my Xcode, I realized I there is a this red "X" showing up next to my development team as I was signing in to my account I have checked my permission on App Store Connect, everything seemed fine. I have also deleted my old Apple development certificate and requested for another one. Nothing worked.
3
0
109
2d
Swift compiler fails in Release (-O) when using generic ObservableObject with @Published on iOS < 26 in Xcode 26.3
When building a SwiftUI project in Xcode 26.3, Swift compilation fails in the Release configuration with Optimization Level set to -O, when the iOS deployment target is lower than iOS 26 (e.g. iOS 16, 17, or 18). The failure occurs when using a generic class conforming to ObservableObject that contains a @Published property. The same code: Compiles successfully in Xcode 16.3 (Release, -O) with iOS 16/17/18 Compiles successfully in Xcode 26.x when the deployment target is set to iOS 26 Compiles successfully in Xcode 26.x Debug configuration (-Onone) Compiles successfully in Xcode 26.x Release when optimization is disabled (-Onone) However, in Xcode 26.3, the build consistently fails in Release (-O) when targeting iOS 16, 17, or 18. This appears to be a Swift compiler optimization issue related to generics, ObservableObject, @Published, and back-deployment to iOS versions prior to iOS 26. STEPS TO REPRODUCE Create a new SwiftUI App project using Xcode 26.3. Leave all project settings at default (Swift version 5). Set the iOS Deployment Target to iOS 16, 17, or 18. Use the following minimal code: import SwiftUI internal import Combine @MainActor class CommonViewModel<Item>: ObservableObject { @Published var listArray = [Item]() } class ContentViewModel: CommonViewModel<String> { func reloadData() { self.listArray = ["1"] } } struct ContentView: View { @StateObject private var viewModel = ContentViewModel() var body: some View { Color.clear .onAppear { viewModel.reloadData() } } } Build and run the app using the Release configuration.
3
1
128
2d
Can I move Xcode files to an external SSD safely?
Hi everyone, I’m running out of space on my Mac and I need to use an external SSD to free up room, especially because Xcode is taking a lot of storage. I want to know if it’s safe to move some Xcode files—projects, derived data, or system-related files—to an external SSD. Which files can I move safely, and which should stay on the internal drive? I want to avoid breaking anything or causing issues with Xcode or macOS. Also, is it the same situation if I use an external HDD instead of an SSD? Are there additional risks or performance issues to consider?
3
0
88
2d
iOS 26.3.0 TextToSpeech EXC_BAD_ACCESS
Hello Apple Developer Community, I'm seeing a persistent crash in my iOS app reported via Firebase Crashlytics. The issue only started appearing on devices running iOS 26.3.0 and above (the crash does not occur on lower iOS versions, and it's unrelated to my app's version number). Key points: My app does NOT use any Text-to-Speech (TTS) features whatsoever. No AVSpeechSynthesizer, no Speech framework, no related APIs called from our code. My app is primarily written in Objective-C (with some Swift components possibly via dependencies). The crash stack is entirely within Apple's private TextToSpeech framework, specifically in ausdk::BufferAllocator::instance(). I suspect it might be indirectly triggered by a third-party ad SDK (e.g., Google Mobile Ads, AppLovin, etc.) that could be loading or interacting with accessibility features in the background — but this is just a hypothesis, as I have no direct evidence yet. Here is one representative crash log: Crashed: com.apple.root.user-initiated-qos.cooperative 0 TextToSpeech 0x6bb00 ausdk::BufferAllocator::instance() + 99800 1 TextToSpeech 0xf8c60 ausdk::BufferAllocator::instance() + 677688 2 TextToSpeech 0xf8c60 ausdk::BufferAllocator::instance() + 677688 3 TextToSpeech 0x1a0b9c ausdk::BufferAllocator::instance() + 1365620 4 libswift_Concurrency.dylib 0x628b4 swift::runJobInEstablishedExecutorContext(swift::Job*) + 288 5 libswift_Concurrency.dylib 0x63d28 swift_job_runImpl(swift::Job*, swift::SerialExecutorRef) + 156 6 libdispatch.dylib 0x13f48 _dispatch_root_queue_drain + 364 7 libdispatch.dylib 0x146fc _dispatch_worker_thread2 + 180 8 libsystem_pthread.dylib 0x137c _pthread_wqthread + 232 9 libsystem_pthread.dylib 0x8c0 start_wqthread + 8 The crash occurs on a background cooperative queue (Swift Concurrency). Questions: Has anyone else seen crashes inside ausdk::BufferAllocator::instance() in TextToSpeech on iOS 26.3.0+ even without using TTS in their app? Could a third-party ad SDK be causing the TextToSpeech framework to load unexpectedly (e.g., via accessibility preloading)? Is this a known bug in iOS 26's Spoken Content / Speak Selection features? Any workarounds or fixes from Apple? Any insights, similar reports (especially from Objective-C based apps), or advice would be greatly appreciated! Thanks!
2
3
136
2d
how to inhibit -fprofile-instr-generate passed to linker
I'm struggling to build a driver for iPadOS in a particular project configuration. If I put the driver code and dext target into the same Xcode project which contains the iPad app, all is well. This is the way the Xcode driver template does it. However, I'd like to build and debug the dext on macOS, while eventually deploying on iPadOS. So I put the dext into a different project, which has a macOS target, a minimal iPadOS target and a DriverKit target. I made a workspace which contains both projects. I dragged the macOS project into the iPadOS project so that I can refer to the products of the macOS project (specifically, its driver target) as a dependency of the iPadOS target. Note that the main iPad app target depends on the driver target. So the workspace organization looks like this: Workspace iPad project main iPad app target (depends on driver) test project reference test project test macOS/iPad app target DriverKit dext target When I build the iPadOS target, it builds the dependent driver target in the macOS project, but it fails to link because Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.profile_driverkit.a is not found. If I just build the driver target directly in Xcode, there is no such complaint. I looked closely at the build logs, and I see for the failed link, there are these two linker flags set which are not set in the successful case -debug_variant -fprofile-instr-generate I can't seem to control the generation of this flag. I tried turning off the Profile switch in the Scheme editor for the driver, but is makes no difference. When I directly build the driver target, no -fprofile-instr-generate is set and it compiles and links. When i build the driver as a dependency of another target, -fprofile-instr-generate is passed to the linker, which fails. The obvious workaround is to put the driver source code into a separate driver target in the iPadOS project, but I'd rather have just one DriverKit driver for both platforms, with a few settings (such as bundle ID) controlled by a configuration file. Has anyone else encountered this problem, and know of a workaround?
3
1
1.2k
2d
swift package with arm64e
I use spm manage swift package, now i want my macos app support arm64e,so i add arm64e in Build Srtting -> Architectures. but i got error Could not find module 'SwiftyJSON' for target 'arm64e-apple-macos'; found: arm64-apple-macos, x86_64-apple-macos Apparently, if no limit in Package.swift, SPM will only compile versions for x86 and ARM64 architectures by default. now, how should I configure SPM to compile the arm64e version? thanks
6
1
465
2d