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
518
Jul ’25
iOS26 Restoration Identifier NULL
Hi everyone - I'm seeing an issue specifically on iOS26 where we instantiate a few storyboard items programmatically and pull their restoration identifier. On iOS26, these identifiers are null and cause a crash, but the assignments are on the storyboard and there has been no change to that logic. On iOS 18, for example, there is no crash and the identifiers are pulled properly. Anybody else seeing this?
1
0
35
11s
Custom font doesn't appear on Storyboard custom font list
Hi everyone, (you can answer in french) I’m french-rookie in xcode, and I have a problem: I’m trying to choice my custom font to add it in my Main.storyboard button, but it not works. I have my « Font provided by application » line in my Info.plist, with the name of my font in [0] (See images below) When I’m on storyboard button, I chose « custom » in font selector, then display font list but my custom font doesn’t appear. I already tried to install the font in my mac, but still stucked, nothing change 😭 Could you help me please? Thanks a lot (I specify that I scrupulously followed the way of doing explained on the Apple official page: Adding a Custom Font to Your App )
8
3
3.5k
1h
Xcode trying to load a static library at run-time.
dyld[3198]: Library not loaded: @rpath/../Frameworks/freetype.framework/Versions/A/freetype Referenced from: <6BFD5FE8-3CE3-3AA9-8264-432DA092F1B1> /Users/danielmarcus/Desktop/SFML-2.6.2/lib/libsfml-graphics.2.6.2.dylib Reason: tried: '/Users/danielmarcus/Library/Developer/Xcode/DerivedData/github_demo-eotoolowecsaypbbvkfzcwzkyosw/Build/Products/Debug/freetype.framework/Versions/A/freetype' (no such file), '/Library/Frameworks/freetype.framework/Versions/A/freetype' (no such file), '/System/Library/Frameworks/freetype.framework/Versions/A/freetype' (no such file, not in dyld cache) Messa
4
0
73
5h
Failed to find a DDI
Hello! When launching/debugging on my iPad and iPhone I keep getting the following error: “Previous preparation error: Failed to find a DDI … Run ‘devicectl list preferredDDI’ …” I believe this was caused by a previously interrupted Xcode update around June due to low disk space, which may have left DeviceSupport/DDI/CoreDevice files incomplete. Even after finishing the update later, the error persists. I now use a new Mac with 4 TB of storage, but the issue still occurs. Since then I have unfortunately been blocked from testing or presenting my app on devices. It seems that only a new, fully completed Xcode update might resolve the problem. Tried so far: – Cleared caches (CoreDevice/Devices) – Reset trust on device and re-paired – Checked devicectl list preferredDDI I would really appreciate guidance, as at the moment I cannot present my app due to this blocking issue. Thank you very much for your support!
5
0
182
5h
"Bad URL" when signing in to XCode
The other day the XCode account had some error that I so that I decided to log out and in again. But when trying to log in to my apple account I get this "Bad URL" with the description "Try signing in again or contact Apple Developer Support to resolve account access". This only happens on the XCode on my work computer. I can log in to XCode on other computers with the same account. This happens only on this computer and with any account that I try to log in to. Obviously there is some cache file somewhere that I need to delete. But I am not finding it.
0
0
23
6h
ChatGPT in Xcode 26 not recognizing Plus subscription
Hi all, Has anyone else run into this issue in Xcode 26? I’m logged into my paid ChatGPT Plus account, but the Xcode integration doesn’t seem to recognize the subscription. After a short period of use, I get the following error: “Over daily limit. ChatGPT in Xcode will be unavailable for up to 24 hours. For higher limits, sign in with a paid ChatGPT account.” Since I’m already signed in with a paid account, this looks like either a bug or a limitation specific to Xcode. Is this expected behavior, or has anyone found a workaround to make Xcode properly recognize Plus accounts? Thanks in advance for any guidance.
10
3
284
6h
Integrated AI just destroys code?!
So I asked the integrated AI a question and the answer was just some hallucination. Now that's nothing new. But the AI then proceeded to apply those hallucinated changes to my code base. Luckily I had no uncommited changes and could use git to revert those multi file changes. But it could have easily been different. So what did I do wrong? Did I click something? Pressed the wrong key? Don't want to happen this again and possibly destroy work.
1
0
46
10h
Xcode26 doesn't install
I have Xcode 16.4 and want to upgrade to Xcode26 on a MacBookPro with Intel and macOS 26.0. However I keep getting the error message (in German), that the download of the App is not possible, Xcode could not be installed and I should try later. I tried to restart the Mac, close all Apps etc. I tried it meanwhile several times, but still no success. Any Idea what I could try or do to solve the problem? Thx in advance
1
0
64
10h
StoreKit2: Testing AppTransaction Receipt Verification?
I just boxed up AppTransaction API. In the debug environment it appears to always return a VerificationResult that is .verified Unlike Storekit1 calling AppTransaction.shared does not seem to cause a sandbox receipt to actually get written on the app bundle in Derived data. I was trying to purposefully mess with the receipt in order to get AppTransaction to fail so I can test how my app behaves when errors occur but there is no receipt to mess with. I tried using the old exit(173) API and it does cause a receipt to be fetched but that seems to be completely ignored by AppTransaction, it validates even if you trash or tamper with the receipt given by exit(173). Is there a good way to test receipt validation failure using the high level Storekit2 API?
2
1
143
17h
iOS 26 tabViewBottomAccessory doesn't work with tabViewSidebarBottomBar
The code is shown as follows. Once the tabViewBottomAccessory is enabled, the tabViewSidebarBottomBar disappears. TabView { Text("tab a") .tabItem { Image(systemName: "a.square") Text("Tab A") } .ignoresSafeArea(edges: [.all]) Text("tab b") .tabItem { Image(systemName: "b.square") Text("Tab B") } .ignoresSafeArea(edges: [.all]) } //.tabViewBottomAccessory { // Text("tabViewBottomAccessory") //} .tabBarMinimizeBehavior(.onScrollDown) .tabViewStyle(.sidebarAdaptable) .tabViewSidebarBottomBar { Text("tabViewSidebarBottomBar") }
0
0
35
18h
Xcode 26 on Tahoe crashing
I've instilled Tahoe and Xcode 26(17A324) and the combination is virtually unusable, particularly the latter I'm no longer able to build projects reliably. My workflow is completely disrupted by a spinning beach ball so just a warning that you might want to delay until taking the plunge as I should have done. Fortunately, I have a back sequoia machine I can use instead.
1
1
58
18h
Provisioning problem
Totally noob programmer here, forgive me if this is a basic user error. But there seems to be a mismatch between my apple id identifier and my team identifier. It has been automatically configured, and worked until today, but while trying to run a new app on my iphone i all of a sudden got "Failed to install embedded profile for com.kylland.formattingtest : 0xe800801a (This provisioning profile does not have a valid signature (or it has a valid, but untrusted signature).)". Now it does not work on any apps. Went through what chatgpt had to give me, trying to log in and out, made sure automatic signing is enabled and tried to delete the key from keychain. Still comes up with two different keys.
49
39
6.0k
18h
Xcode 26 RC unable to compile asset catalogs on CI
This started with Xcode 26 beta 7, however it has continued to occur with the release candidate. Whenever I try to compile our asset catalog + icon composer icon for our AppKit/SwiftUI-based macOS app, actool fails with the following exception: *** Terminating app due to uncaught exception 'IBPlatformToolFailureException', reason: 'The tool closed the connection (AssetCatalogAgent-AssetRuntime) Last command: _ON_QUEUE_sendMessage:toChannelReturningError:during: Backtrace of last command: 0 -[IBAbstractPlatformToolProxy _ON_QUEUE_sendMessage:toChannelReturningError:during:] (in IDEInterfaceBuilderKit) 1 __74-[IBAbstractPlatformToolProxy sendMessage:toChannelReturningError:during:]_block_invoke (in IDEInterfaceBuilderKit) 2 _dispatch_client_callout (in libdispatch.dylib) 3 _dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib) 4 DVTDispatchSync (in DVTFoundation) 5 -[IBAbstractPlatformToolProxy sendMessage:toChannelReturningError:during:] (in IDEInterfaceBuilderKit) 6 -[AssetCatalogRemoteAgentProxy compileItemsWithCatalogRelativeIdentifierPaths:tagSolutionSpace:andStickerPacksWithCatalogRelativeIdentifierPaths:options:] (in IDEInterfaceBuilderCocoaTouchIntegration) 7 -[IBICLARToolCARCompiler compileCARItems:tagSolutionSpace:options:queue:completionHandler:] (in AssetCatalogCocoaTouchKit) 8 -[IBICAbstractPlatformAdapter compileCARItems:tagSolutionSpace:options:queue:completionHandler:] (in AssetCatalogFoundation) 9 __84-[IBICAbstractPlatformAdapter compileSelectedItems:options:queue:completionHandler:]_block_invoke (in AssetCatalogFoundation) 10 __93-[IBICAbstractPlatformAdapter compileStandaloneCatalogItems:options:queue:completionHandler:]_block_invoke (in AssetCatalogFoundation) 11 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation) 12 __DVTDispatchAsync_block_invoke (in DVTFoundation) 13 _dispatch_call_block_and_release (in libdispatch.dylib) 14 _dispatch_client_callout (in libdispatch.dylib) 15 _dispatch_main_queue_drain.cold.5 (in libdispatch.dylib) 16 _dispatch_main_queue_drain (in libdispatch.dylib) 17 _dispatch_main_queue_callback_4CF (in libdispatch.dylib) 18 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation) 19 __CFRunLoopRun (in CoreFoundation) 20 CFRunLoopRunSpecific (in CoreFoundation) 21 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] (in Foundation) 22 -[NSRunLoop(DVTNSRunLoopAdditions) dvt_spinRunLoopInMode:whileQueue:executesAsynchronously:] (in DVTFoundation) 23 -[NSRunLoop(DVTNSRunLoopAdditions) dvt_spinRunLoopInMode:whileBlockExecutesConcurrently:] (in DVTFoundation) 24 -[NSRunLoop(DVTNSRunLoopAdditions) dvt_spinRunLoopInMode:waitingForSemaphore:] (in DVTFoundation) 25 -[IBCLIImageCatalogToolPersona compileCatalogCollection:withPlatformAdapter:arguments:outputDictionary:] (in ibtoold) 26 -[IBCLIImageCatalogToolPersona invokeArguments:outputDictionary:] (in ibtoold) 27 -[IBCLIImageCatalogToolPersona runSingleInvocation:outputtingToFileHandle:andVerifyingEnvironment:] (in ibtoold) 28 IBCLIServerRunSingleInvocation (in ibtoold) 29 __IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess_block_invoke_2 (in ibtoold) 30 __IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess_block_invoke (in ibtoold) 31 -[IBCLIErrorForwarder forwardErrorOutputToDescriptor:whileInvokingBlock:] (in ibtoold) 32 IBCLIServerRunSingleInvocationWithIODirectedAtPipesAndUnlinkOnSuccess (in ibtoold) 33 main (in ibtoold) 34 start (in dyld) I can't seem to get it to compile consistently — it works fine locally. I would ❤️ a workaround, otherwise I'm not sure that we'll be able to ship an update to our app for macOS 26. FB20183399
3
2
154
20h
Critical notifications crashing in Xcode 26 simulator
I am scheduling critical user notifications with a custom sound. This worked for years both on devices and in the simulator. Since Xcode 26 it crashes in simulator. Example let content = UNMutableNotificationContent() content.title = "Critical" content.body = "Example" content.sound = UNNotificationSound.criticalSoundNamed(UNNotificationSoundName("notification.aiff"), withAudioVolume: 0.5) content.interruptionLevel = .critical let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 10, repeats: false) let request = UNNotificationRequest(identifier: "exampleCriticalNotification", content: content, trigger: trigger) UNUserNotificationCenter.current().add(request) It seems that simpler variants such as just content.interuptionLevel = .critical or just content.sound = UNNotificationSound.defaultCritical also crash. I assume that critical notifications is a small niche use case but i still hope this gets fixed. This is filed as FB20272392 with a full crash log.
0
0
35
23h
Issues updating to Xcode 26 -- can no longer successfully build project
I recently updated to macOS sequoia 15.6 Afterward, I updated to Xcode 26 The project I've been running for the last couple years no longer compiles on existing simulators and doesn't build to a physical device. I'm getting an error I'm not familiar with and have no idea how to directly resolve it: The specific error is 'Command SwiftGeneratePch failed with a nonzero exit code' Looking up this issue via Google, there wasn't really a lot of information on this particular build failure. Most suggestions were to change the location of the Derived Data folder (Xcode -> File -> Project Settings -> update location of derived data from default to relative) This was one of the only actionable solutions I found online but this doesn't fully address the issue for me, it just creates a new issue: "Command PhaseScriptExecution failed with a nonzero exit code" I feel like with enough digging around I should be able to find a solution to the "PhaseScriptExecution" issue; there seems to be a decent amount of information online about that particular problem. I would prefer if I could solve the original 'SwiftGeneratePch" failure without needing to address other issues, though. Is this possible?
0
0
44
23h
editing Makefile in Xcode editor
I want to edit a Makefile using the Xcode editor (part of my project). I can create and edit the file, but Xcode seems to assume it’s a Swift file — it applies Swift syntax highlighting, and I get incorrect suggestions while editing. I tried changing the “Open As” option from “Source Code,” but there’s no “Plain Text” option available. I’m using Xcode 16.4. I’ve seen suggestions like: • Using an external editor (which works, but feels clunky), • Renaming the file to something like Makefile.txt (but that breaks standard CLI use, e.g. make expects Makefile). Not too happy with either workaround — did I overlook a proper way to just edit a Makefile in Xcode without confusion? Any suggestions appreciated! Thanks, Lourens
3
0
81
23h
Unable to install “My App” after installing iOS 26, macOS 26, Xcode 26.
Error: Unable to install “My App” Failed to install embedded profile for com.apple.myapp : 0xe800801a (This provisioning profile does not have a valid signature (or it has a valid, but untrusted signature).) I've tried almost everything, but I keep getting the same message on a Mac Mini M1 and several physical iPhones (11 and 16, both Pro). On a MacBook Air (Sequoia 15.7) with the same account, the same profiles work without any problems; and on simulators with iOS 26, it also works without any problems. This clearly tells us that the provisioning profile is not the problem, which is what the message mentions. It obviously has to do with the 26 update. P.S All of this worked fine before installing iOS, macOS, and Xcode 26.
2
2
152
23h
Unable to find a team with the given Content Provider ID With xcodebuild -authenticationKeyIssuerID command
Hi Developers, I use xcodebuild command with "-authenticationKeyIssuerID" params, but I got some error message. I'm sure my settings is right, so is there any advise. Unable to find a team with the given Content Provider ID '52f5e342-ae11-4fbb-b765-f19ae4bf80c7' to which you belong. Please contact Apple Developer Program Support. https://developer.apple.com/support
1
1
51
1d
Icon Composer: Any way to add icons to the app bundle for older macOS versions?
Several app developers are struggling with the inability to provide a separate app icons that looks nice on older macOS versions while at the same time provide Icon Composer icons that look great on macOS Tahoe 26. An ability to provide separate icons is super important to those who have app icons that follow the curvature of the default icon borders (as the corner rounding radius is different for Sequia and Tahoe). Take a look at this for example: https://github.com/ghostty-org/ghostty/issues/7564#issuecomment-3042061547 Question: Is there a definitive/recommended way to address this issue? How can a developer add a glass icon variant that looks good on Tahoe and provide a bitmap icon for older macOS versions? Some background info: Prior to Xcode 26 beta 4, one could add an App Icon to Assets to be used as app icon for legacy macOS versions (Sequia and older) and use a new Icon Composer icon (placed in the project root) for macOS Tahoe 26. Enabling "Include all app icon assets" under target settings ensured that older macOS versions would use the old app icons while Tahoe the new Icon Composer glass one. Since Xcode beta 4 this technique no longer works. Xcode instead insists on populating Assets.car with Icon Composer generated variants, disregarding the App Icon provided in Assets. Although the App Icon in Assets makes its way to a .incs file in the app bundle's Contents/Resources folder, but that is not used by macOS anymore and is there for some compatibility purposes. The Assets.car file (which matters) only contains the variants generated by Icon Composer and does not contain the png icons provided in the Assets.
9
12
721
1d