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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Xcode Bug Installed Platforms
Hello, I’m using the latest version of Xcode, 26.6. I’m unable to permanently delete old installed iOS platform versions. I remove them from Xcode settings, and the deletion appears to complete successfully, but after rebooting my Mac they appear again, as if nothing had changed. Do you have any suggestions for how to remove them correctly and permanently?
3
0
48
3h
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible Background This is a follow up to my November 2024 thread "Keychain issues after installing backup on new Mac" which was closed because I had a temporary workaround. That workaround using my wife's MacBook Air for signing is not sustainable. I used AI assistance to determine the root cause. My DTS case 102877839447 is open but has not yet been forwarded to a DTS engineer. Environment Mac Mini M4, macOS 15.4.1 (Build 25E253) Xcode 26.4.1 (17E202) Team ID: Q23726668V (Computerade Products) Working comparison machine: MacBook Air, macOS 15.3 Precise Bug — Reproducible Every Time Every time Xcode generates a new certificate and key pair on my Mac Mini: Certificate: Apple Development: Michael Birch (9KD5TCGGHG) ✅ Private key: Apple Development: Michael Birch (Computerade Products) ❌ The key uses the organization name instead of the certificate identifier. They never pair as a valid codesigning identity. security find-identity -v -p codesigning always returns 0 valid identities. Cryptographic Evidence The internal application labels confirm the keys are cryptographically unrelated to their certificates: Key internal application label: 53C26EB056997276B5E938258D00665ACABD1F0F Certificate public key hash: 57cd1af4a9162f26b1a6d750e05a63a2166b75ff These do not match ❌ Confirmed Eliminated As Causes Keychain search list corruption — found and fixed Partition list — set correctly Access control — set to allow all applications Full Disk Access — granted to Xcode Xcode caches and preferences — completely cleared Login keychain — completely reset Orphaned certificates and keys — all removed SIP enabled, system fully up to date Valid P12 Import Also Fails A p12 exported from the working MacBook Air and cryptographically verified as a matched pair also fails on the Mac Mini: security import returns MAC verification failed Keychain Access import returns OSStatus -2 Importing certificate and key separately as PEM files succeeds but they are not recognized as a valid identity pair despite matching application labels A3F3F193B7896DA9055353F59AB450778CB09AE7 Question Is there a known issue with M4 Mac Mini keychain infrastructure where private keys are generated with incorrect internal application labels? Is there a lower level diagnostic or fix beyond what the security command provides? The problem is specific to my Mac Mini M4 and persisted thru more than a year of Mac OS and xCode updates.
8
0
436
4h
xCode crashes after update to 26.5
After updating to Xcode 26.5 Xcode crashes when I try to open my project. Directly before update everything was fine... Not using Beta-Software.. only stable versions What can I do? Will there be an update fixing this bug? `Application Specific Information: abort() called Application Specific Signatures: NSInternalInconsistencyException Application Specific Backtrace 0: 0 CoreFoundation 0x0000000186e711c0 __exceptionPreprocess + 176 1 DVTFoundation 0x000000010578a20c DVTFailureHintExceptionPreprocessor + 388 2 libobjc.A.dylib 0x00000001868fa91c objc_exception_throw + 88 3 Foundation 0x000000018868f498 -[NSFileWrapper regularFileContents] + 436 4 IDEStoreKitCore 0x000000030e002b20 $s15IDEStoreKitCore0aB13ConfigurationC4FileV17configurationData10Foundation0G0Vvg + 440 5 IDEStoreKitCore 0x000000030e001da0 $s15IDEStoreKitCore0aB13ConfigurationC13configuration3forACSo13NSFileWrapperC_tKFZ + 304 6 IDEStoreKitCore 0x000000030e003b0c $s15IDEStoreKitCore0aB13ConfigurationC13configuration2atAC10Foundation3URLV_tKFZ + 148 7 IDEStoreKitEditor 0x000000030e792ecc $s17IDEStoreKitEditor0aB20TextFragmentProviderC12generateSeed3for17completionHandlerySo11DVTFilePathC_ySo07IDETextefH0_pSg_s5Error_pSgtctFZ06$sSo27nefh28_pSgSo7NSErrorCSgIeyByy_ABs5o2_pR8Ieggg_TRAJSo0T0CSgIeyByy_Tf1ncn_nTf4ndg_n + 152 8 IDEStoreKitEditor 0x000000030e7922fc $s17IDEStoreKitEditor0aB20TextFragmentProviderC12generateSeed3for17completionHandlerySo11DVTFilePathC_ySo07IDETextefH0_pSg_s5Error_pSgtctFZTo + 52 9 IDEFoundation 0x000000010c922318 __113+[IDETextFragmentIndex runProvider:forFilePath:explicitFileDataType:initialTimestamp:priority:completionHandler:]_block_invoke + 204 10 DVTFoundation 0x00000001058a0638 __51-[DVTThrottledConcurrentQueue processQueueIfNeeded]_block_invoke + 80 11 DVTFoundation 0x0000000105892bd0 DVT_CALLING_CLIENT_BLOCK + 16 12 DVTFoundation 0x0000000105893548 __DVTDispatchAsync_block_invoke + 152 13 libdispatch.dylib 0x0000000186b8aa28 _dispatch_call_block_and_release + 32 14 libdispatch.dylib 0x0000000186ba44b0 _dispatch_client_callout + 16 15 libdispatch.dylib 0x0000000186b8f1c8 _dispatch_continuation_pop + 596 16 libdispatch.dylib 0x0000000186b8e844 _dispatch_async_redirect_invoke + 580 17 libdispatch.dylib 0x0000000186b9c980 _dispatch_root_queue_drain + 360 18 libdispatch.dylib 0x0000000186b9d120 _dispatch_worker_thread2 + 184 19 libsystem_pthread.dylib 0x0000000186d41e84 _pthread_wqthread + 232 20 libsystem_pthread.dylib 0x0000000186d40c10 start_wqthread + 8`
3
0
75
5h
XCode - Apple Watch Connectivity
Hi Devs, I'm working with WatchOS for the first time and am having a frustrating time with Xcode to Watch, to say the least. I have a Series 9 dev watch and Xcode does not reliably connect to it. Spending 15-20 min per build/run attempt just trying to get xcode to find and connect to the watch. It WILL sometimes recognize and allow a build to run, the issue is I can't tell any reliable way to establish the connection. It drops after every build and leaves me at square zero. Current solution is some amount of force quitting, reconnecting iPhone to USBC, disconnecting watch to wifi and back on. Devices Window usually reads: Previous preparation error: A connection to this device could not be established.; Timed out while attempting to establish tunnel using negotiated network parameters - swapping to some attempting to connect state that never (reliably resolves). Is this why no one builds for WatchOS? Hoping someone has pro tips on this.
2
1
84
6h
Unable to enter text in TextField - SwiftUI preview
I'm trying out Xcode 12 (beta) and encountered an issue with TextField when viewing it in a live Preview. Although the view is interactive (scrolling vertically seems to be OK) and a cursor appears in the TextField view when it is clicked on, keyboard input is ignored. The same code works as expected in Xcode 11.5. Simulator in both 11.5 and 12 exhibits expected behaviour. Is this a bug? I know there is an issue with interactivity in Preview with multiple views inside PreviewProvider but I'd assumed this is if you'd added multiple Views to the same body of this struct.
28
3
15k
9h
Please provide the power of autocompletion similar to VSCode and alike editors
AI agentic coding is great, but it drifts away from the good practices and good code. Sometimes I am writing code while thinking what exactly to write, exploring the architecture solution, the data flow, not the technology, so making a prompt is not the best use case. I am doing iOS development in VSCode since preview version of Copilot launched, the auto-completions that AI provides IS the greatest tool a developer can have Please 🙏 prioritize the unimaginable good auto-completion that only Apple can provide, so that we can auto-complete function implementation, class implementation, multiple lines of comments in a fraction of a second
0
0
15
9h
Xcode 27's Device Hub doesn't allow you to drag and drop enterprise security certificates.
I know Xcode 27 is in beta but it appears that in Device Hub you can no longer drag and drop enterprise security certificates onto the simulators like you could in Xcode 26 (and earlier) simulators. I did put in a feedback request in (FB23369006) but I was wondering if anyone found a workaround. This hampers testing for enterprise users who don't have a physical device to test on.
1
1
102
10h
Xcode 27 How to specify the bundle Identifier
Xcode 27 creates a placeholder for the bundle identifier of a new project. devplaceholder.$(PROJECT_UNIQUE_VALUE:identifier).$(PRODUCT_NAME:identifier) I have two questions. Is it enough to change the bundle id from the Signing & Capabilities panel or do we need to change it somewhere else? What are Apple recommendations? Should we only replace the devplaceholder value and keep the unique value and product name, provide our won id but keep the product name, or replace everything with our own bundle ID? Thanks
1
0
40
10h
Fixing long build times caused by dependencies to swift-syntax
After adding the Mockable package to a project that already used swift-dependencies and updating to Xcode 26.6, my release/archive builds got ~2 min slower because swift-syntax was being recompiled from source every time. Thorougly investigating and fixing this took about 3 hours and I thought I'd share my findings for the next person encountering such an issue: Findings: I confirmed the prebuilt swift-syntax is used for swift-syntax 603.0.2 in Xcode 26.6 when building a package separately (I suspect dependencies to older versions might cause issues, but didn't fully investigate this) It can be checked if the prebuilt version of swift-syntax is used via the build log. If working correctly/using the prebuild version, swift-syntax isn't mentioned at all. One package resolved to swift-syntax 600.x, this would trigger a build of swift-syntax. After updating the dependencies it worked fine. Even if the version in the xcodeproj resolves to a confirmed-working version of swift-syntax, it seems other packages might trigger the swift-syntax build under the hood. Opened the packages individually and built separately with Build for » Profiling to investigate. In my case, another issue was triggering the problem: The swift-snapshot-testing open source package declared a swift-syntax dependency although it didn't actually use it. That caused swift-syntax being built (not sure why, maybe Xcode thinks it's a non-macro usage of swift-syntax?) Creating a fork of the package and removing the dependency fixed the issue. After both fixes, in the full project, a Product → Clean Build Folder + restart Xcode was required before swift-syntax stopped being rebuilt. See also: Xcode 26 Release Notes — Swift Macros Build Performance:
0
0
31
11h
Unable to boot iOS 26.5 Simulator — launchd_sim fails to bind session on macOS 26.5.1 + Xcode 26.6
Environment: macOS 26.5.1 (Build 25F80) Xcode 26.6 (Build 17F113) iOS 26.5 Simulator Runtime (Build 23F77) Device: Apple Silicon (arm64) Summary: The iOS 26.5 simulator fails to boot with NSPOSIXErrorDomain Code 4 (Interrupted system call). The underlying error indicates launchd_sim cannot bind to its session, suggesting the CoreSimulator session management is broken in this macOS + Xcode + runtime combination. Steps to Reproduce: Install macOS 26.5.1 and Xcode 26.6 Open Simulator.app or run xcrun simctl boot Attempt to boot any iOS 26.5 simulator device Expected Result: Simulator boots successfully and reaches the Booted state. Actual Result: Unable to boot the Simulator. Domain: NSPOSIXErrorDomain Code: 4 Failure Reason: Interrupted system call Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding Domain: com.apple.SimLaunchHostService.RequestError Code: 4 Workaround: Installing an older stable iOS simulator runtime (iOS 17.x or 18.x) and targeting that instead allows simulators to boot normally. Additional Notes: Issue persists after full Mac restart xcrun simctl erase all and xcrun simctl delete all do not resolve it The iOS 26.5 Simulator volume mounts correctly at /Library/Developer/CoreSimulator/Volumes/iOS_23F77 launchd_sim binary is present and properly code-signed
0
0
29
1d
Xcode RAM Usage Problem
👋🏻 Hello Apple Developer Community, I’ve recently got the problem with the current Xcode Beta Version and the Preview Feature. Because when I try to load the Preview, the RAM Usage spikes and it’s nearly at the limit on my MacBook (16GB RAM). (Note: This is happening while loading up the Preview) But when I haven’t loaded the Preview Window, the overall RAM Usage of my system is ver low (Note: This is when Xcode has is not loading the Preview) (Note: This is after quitting Xcode for cancelling the load of the Preview) All Pictures are in German, sorry for that ☹️. What are possible problems or solutions against this problem? Have a nice day / evening 😁
1
0
47
1d
Apple supported way to create xcodeproject without using XCode IDE or with minimal use of XCode IDE
We need help to structure our project to start using apple standard way to create Xcode project. let me first express how currently we are creating Xcode project. As of today, we are using CMake to generate our xcode project which we can open in XCODE IDE and build/debug/run/etc. XCode IDE can open those project but we notice that some build setting does not seem to have correct value while looking into XCODE IDE but it somehow builds. There are some other issues also. Along with those issues, we also could not share this xcodeproject generated via CMake to AppleDTS support team as Apple does not support project created via some third party tool (like CMake or others). Let me also express why we decided to use CMake at first place to generate Xcode projects. Our project is layered architecture project where in upper layers uses lower layer artifacts. Each layer has its own set of build targets . And each layer can have both C++ and Swift files. And each layer would have most of the compiler flag common, but we could also have compiler flag specific to each layer also. To achieve all these, we have developed our own tool, which basically creates CMakeLists.txt (for project model- all targets, dependency, etc) and CMakePresets.json (for all compiler and linker flags). Now this tool scans through repos/source folders on each layer and then creates these files (CMakeLists.txt and CMakePresets.json). This tool uses inputs to decide compiler/linker/other properties from one centralized location. Which means every developer would use these same input files and thus they all can have same compiler/linker/other properties set consistent. This makes generated build system consistent on all developer machine and it allows confidence of saying if build works on one developer's machine would also work on other developer’s machine and if build does NOT work on one developer's machine, it would NOT work on other developer’s machine also. So, it’s consistent. That was the main reason to use CMake to generate xcode project. So, our internal tools creates meta data for CMake (which is CMakeLists and CMakePresets) and then CMake generates Xcode build system using XCode generator. Now we want to move to xcode native way to create projects but at the same time we also want this consistency that each of my developer would use exact same compiler/linker/other properties. If we ask developer to use XCode IDE to create xcode project, we cannot guarantee that they all will use same compiler/linker/etc flags and thus we would end up having inconsistent behaviour on different developer machines. We need your help to figure out how we can achive this ? We read some ways that we can create some template project and then we can create some .xcconfig files and use them to set target properties but honestly, we are able to stich them together. So please help us directionally on this , how should we proceed ? Basically we need to know how can we have all my developer use same xcodeproject. I was also thinking how would I be setting my CI for apple builds if I have to use XCode IDE to create xcode project and since CI environments are non interactive and it can happen n number of times in day (if I have setup to run sanity for all Pull Requests). Any help/direction on this is highly appreciated.
6
1
184
1d
StoreKit testing not working on iOS26.5 simulator
Hi, I'm trying to run our StoreKit unit tests with Xcode26.5 on an iOS26.5 simulator. Host computer has macOS26.5. All tests are failing and in the console I see logs such as [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error deleting all transactions: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error clearing overrides: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for jp.unext.mediaplayer: Error Domain=SKInternalErrorDomain Code=3 "(null)" And the simulator asks me to provide my AppleID. Tests have been broken since at least 26.4 The release notes claims that it has been fixed but not for me. https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes#StoreKit-Testing-in-Xcode Does anyone else have the same issue? Reported FB22774836 just in case.
7
9
672
1d
can not create iOS 27 Simulator
Apple M1 Pro, 26.5.1 (25F80) XCode 27.0 Beta (27A5194q) Command Line tools for Xcode 27 are installed. Device Hub Version 27.0 (235.4.2) Within device hub I can not create iOS 27 simulators. Only the 26.5 simulators are listed there. I installed the iOS 27.0 SDK. Also deleted and reinstalled it. The computer was restarted. No change. I am unable to create the proper iOS 27 Simulators. Any idea why this is not working? Thanks for the help upfront.
12
1
621
2d
Xcode 26.6 and 27 Gemini Authentication with Configuration Files
I’m attempting to set up Gemini agentic support in Xcode 26.6 RC (and I'm assuming the process is the same in 27), but since I need to use Gemini with a corporate account, I have a Google Cloud Project ID, not an API key, so it seems like the configuration file route is the right path? After consulting Gemini and filling out the .env file and settings.json files, Xcode is complaining about needing to be authenticated, and I can’t seem to see how to trigger the auth, like one might do in Gemini CLI. I'd appreciate any suggestions or advice at this point. Thanks in advance!
3
0
186
2d
iOS Simulator downloads a lot of data
iOS simulator downloads loads of data even over personal hotspots that should be low data - 10s of GBs which exhausts cellular plans. I.e. I'm connecting the phone over USB (charging and it automatically shares the cellular connection and faster deploy and debugging). I see that /Library/Developer/CoreSimulator/Volumes/iOS_23F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.5.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/nsurlsessiond downloads 10s of GBs probably in /Library/Developer/Xcode/UserData/Previews/Simulator Devices/<UUID>/data/private/var/MobileAsset/AssetsV2 over time. Most plans are not that infinite. Has anyone seen such thing? The phone is connected over USB and automatically used as network device and also has the low data mode toggle on.
0
0
35
2d
Problems using Anthropic Agent in Xcode 27 beta 2
I signed in to Xcode using my Anthropic credentials. When I attempt to start a new conversation the text box is not enabled and I see a message related to Codex..
Replies
0
Boosts
0
Views
5
Activity
1h
Xcode Bug Installed Platforms
Hello, I’m using the latest version of Xcode, 26.6. I’m unable to permanently delete old installed iOS platform versions. I remove them from Xcode settings, and the deletion appears to complete successfully, but after rebooting my Mac they appear again, as if nothing had changed. Do you have any suggestions for how to remove them correctly and permanently?
Replies
3
Boosts
0
Views
48
Activity
3h
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible Background This is a follow up to my November 2024 thread "Keychain issues after installing backup on new Mac" which was closed because I had a temporary workaround. That workaround using my wife's MacBook Air for signing is not sustainable. I used AI assistance to determine the root cause. My DTS case 102877839447 is open but has not yet been forwarded to a DTS engineer. Environment Mac Mini M4, macOS 15.4.1 (Build 25E253) Xcode 26.4.1 (17E202) Team ID: Q23726668V (Computerade Products) Working comparison machine: MacBook Air, macOS 15.3 Precise Bug — Reproducible Every Time Every time Xcode generates a new certificate and key pair on my Mac Mini: Certificate: Apple Development: Michael Birch (9KD5TCGGHG) ✅ Private key: Apple Development: Michael Birch (Computerade Products) ❌ The key uses the organization name instead of the certificate identifier. They never pair as a valid codesigning identity. security find-identity -v -p codesigning always returns 0 valid identities. Cryptographic Evidence The internal application labels confirm the keys are cryptographically unrelated to their certificates: Key internal application label: 53C26EB056997276B5E938258D00665ACABD1F0F Certificate public key hash: 57cd1af4a9162f26b1a6d750e05a63a2166b75ff These do not match ❌ Confirmed Eliminated As Causes Keychain search list corruption — found and fixed Partition list — set correctly Access control — set to allow all applications Full Disk Access — granted to Xcode Xcode caches and preferences — completely cleared Login keychain — completely reset Orphaned certificates and keys — all removed SIP enabled, system fully up to date Valid P12 Import Also Fails A p12 exported from the working MacBook Air and cryptographically verified as a matched pair also fails on the Mac Mini: security import returns MAC verification failed Keychain Access import returns OSStatus -2 Importing certificate and key separately as PEM files succeeds but they are not recognized as a valid identity pair despite matching application labels A3F3F193B7896DA9055353F59AB450778CB09AE7 Question Is there a known issue with M4 Mac Mini keychain infrastructure where private keys are generated with incorrect internal application labels? Is there a lower level diagnostic or fix beyond what the security command provides? The problem is specific to my Mac Mini M4 and persisted thru more than a year of Mac OS and xCode updates.
Replies
8
Boosts
0
Views
436
Activity
4h
xCode crashes after update to 26.5
After updating to Xcode 26.5 Xcode crashes when I try to open my project. Directly before update everything was fine... Not using Beta-Software.. only stable versions What can I do? Will there be an update fixing this bug? `Application Specific Information: abort() called Application Specific Signatures: NSInternalInconsistencyException Application Specific Backtrace 0: 0 CoreFoundation 0x0000000186e711c0 __exceptionPreprocess + 176 1 DVTFoundation 0x000000010578a20c DVTFailureHintExceptionPreprocessor + 388 2 libobjc.A.dylib 0x00000001868fa91c objc_exception_throw + 88 3 Foundation 0x000000018868f498 -[NSFileWrapper regularFileContents] + 436 4 IDEStoreKitCore 0x000000030e002b20 $s15IDEStoreKitCore0aB13ConfigurationC4FileV17configurationData10Foundation0G0Vvg + 440 5 IDEStoreKitCore 0x000000030e001da0 $s15IDEStoreKitCore0aB13ConfigurationC13configuration3forACSo13NSFileWrapperC_tKFZ + 304 6 IDEStoreKitCore 0x000000030e003b0c $s15IDEStoreKitCore0aB13ConfigurationC13configuration2atAC10Foundation3URLV_tKFZ + 148 7 IDEStoreKitEditor 0x000000030e792ecc $s17IDEStoreKitEditor0aB20TextFragmentProviderC12generateSeed3for17completionHandlerySo11DVTFilePathC_ySo07IDETextefH0_pSg_s5Error_pSgtctFZ06$sSo27nefh28_pSgSo7NSErrorCSgIeyByy_ABs5o2_pR8Ieggg_TRAJSo0T0CSgIeyByy_Tf1ncn_nTf4ndg_n + 152 8 IDEStoreKitEditor 0x000000030e7922fc $s17IDEStoreKitEditor0aB20TextFragmentProviderC12generateSeed3for17completionHandlerySo11DVTFilePathC_ySo07IDETextefH0_pSg_s5Error_pSgtctFZTo + 52 9 IDEFoundation 0x000000010c922318 __113+[IDETextFragmentIndex runProvider:forFilePath:explicitFileDataType:initialTimestamp:priority:completionHandler:]_block_invoke + 204 10 DVTFoundation 0x00000001058a0638 __51-[DVTThrottledConcurrentQueue processQueueIfNeeded]_block_invoke + 80 11 DVTFoundation 0x0000000105892bd0 DVT_CALLING_CLIENT_BLOCK + 16 12 DVTFoundation 0x0000000105893548 __DVTDispatchAsync_block_invoke + 152 13 libdispatch.dylib 0x0000000186b8aa28 _dispatch_call_block_and_release + 32 14 libdispatch.dylib 0x0000000186ba44b0 _dispatch_client_callout + 16 15 libdispatch.dylib 0x0000000186b8f1c8 _dispatch_continuation_pop + 596 16 libdispatch.dylib 0x0000000186b8e844 _dispatch_async_redirect_invoke + 580 17 libdispatch.dylib 0x0000000186b9c980 _dispatch_root_queue_drain + 360 18 libdispatch.dylib 0x0000000186b9d120 _dispatch_worker_thread2 + 184 19 libsystem_pthread.dylib 0x0000000186d41e84 _pthread_wqthread + 232 20 libsystem_pthread.dylib 0x0000000186d40c10 start_wqthread + 8`
Replies
3
Boosts
0
Views
75
Activity
5h
XCode - Apple Watch Connectivity
Hi Devs, I'm working with WatchOS for the first time and am having a frustrating time with Xcode to Watch, to say the least. I have a Series 9 dev watch and Xcode does not reliably connect to it. Spending 15-20 min per build/run attempt just trying to get xcode to find and connect to the watch. It WILL sometimes recognize and allow a build to run, the issue is I can't tell any reliable way to establish the connection. It drops after every build and leaves me at square zero. Current solution is some amount of force quitting, reconnecting iPhone to USBC, disconnecting watch to wifi and back on. Devices Window usually reads: Previous preparation error: A connection to this device could not be established.; Timed out while attempting to establish tunnel using negotiated network parameters - swapping to some attempting to connect state that never (reliably resolves). Is this why no one builds for WatchOS? Hoping someone has pro tips on this.
Replies
2
Boosts
1
Views
84
Activity
6h
Unable to enter text in TextField - SwiftUI preview
I'm trying out Xcode 12 (beta) and encountered an issue with TextField when viewing it in a live Preview. Although the view is interactive (scrolling vertically seems to be OK) and a cursor appears in the TextField view when it is clicked on, keyboard input is ignored. The same code works as expected in Xcode 11.5. Simulator in both 11.5 and 12 exhibits expected behaviour. Is this a bug? I know there is an issue with interactivity in Preview with multiple views inside PreviewProvider but I'd assumed this is if you'd added multiple Views to the same body of this struct.
Replies
28
Boosts
3
Views
15k
Activity
9h
Please provide the power of autocompletion similar to VSCode and alike editors
AI agentic coding is great, but it drifts away from the good practices and good code. Sometimes I am writing code while thinking what exactly to write, exploring the architecture solution, the data flow, not the technology, so making a prompt is not the best use case. I am doing iOS development in VSCode since preview version of Copilot launched, the auto-completions that AI provides IS the greatest tool a developer can have Please 🙏 prioritize the unimaginable good auto-completion that only Apple can provide, so that we can auto-complete function implementation, class implementation, multiple lines of comments in a fraction of a second
Replies
0
Boosts
0
Views
15
Activity
9h
Xcode 27's Device Hub doesn't allow you to drag and drop enterprise security certificates.
I know Xcode 27 is in beta but it appears that in Device Hub you can no longer drag and drop enterprise security certificates onto the simulators like you could in Xcode 26 (and earlier) simulators. I did put in a feedback request in (FB23369006) but I was wondering if anyone found a workaround. This hampers testing for enterprise users who don't have a physical device to test on.
Replies
1
Boosts
1
Views
102
Activity
10h
Xcode 27 How to specify the bundle Identifier
Xcode 27 creates a placeholder for the bundle identifier of a new project. devplaceholder.$(PROJECT_UNIQUE_VALUE:identifier).$(PRODUCT_NAME:identifier) I have two questions. Is it enough to change the bundle id from the Signing & Capabilities panel or do we need to change it somewhere else? What are Apple recommendations? Should we only replace the devplaceholder value and keep the unique value and product name, provide our won id but keep the product name, or replace everything with our own bundle ID? Thanks
Replies
1
Boosts
0
Views
40
Activity
10h
Fixing long build times caused by dependencies to swift-syntax
After adding the Mockable package to a project that already used swift-dependencies and updating to Xcode 26.6, my release/archive builds got ~2 min slower because swift-syntax was being recompiled from source every time. Thorougly investigating and fixing this took about 3 hours and I thought I'd share my findings for the next person encountering such an issue: Findings: I confirmed the prebuilt swift-syntax is used for swift-syntax 603.0.2 in Xcode 26.6 when building a package separately (I suspect dependencies to older versions might cause issues, but didn't fully investigate this) It can be checked if the prebuilt version of swift-syntax is used via the build log. If working correctly/using the prebuild version, swift-syntax isn't mentioned at all. One package resolved to swift-syntax 600.x, this would trigger a build of swift-syntax. After updating the dependencies it worked fine. Even if the version in the xcodeproj resolves to a confirmed-working version of swift-syntax, it seems other packages might trigger the swift-syntax build under the hood. Opened the packages individually and built separately with Build for » Profiling to investigate. In my case, another issue was triggering the problem: The swift-snapshot-testing open source package declared a swift-syntax dependency although it didn't actually use it. That caused swift-syntax being built (not sure why, maybe Xcode thinks it's a non-macro usage of swift-syntax?) Creating a fork of the package and removing the dependency fixed the issue. After both fixes, in the full project, a Product → Clean Build Folder + restart Xcode was required before swift-syntax stopped being rebuilt. See also: Xcode 26 Release Notes — Swift Macros Build Performance:
Replies
0
Boosts
0
Views
31
Activity
11h
Unable to boot iOS 26.5 Simulator — launchd_sim fails to bind session on macOS 26.5.1 + Xcode 26.6
Environment: macOS 26.5.1 (Build 25F80) Xcode 26.6 (Build 17F113) iOS 26.5 Simulator Runtime (Build 23F77) Device: Apple Silicon (arm64) Summary: The iOS 26.5 simulator fails to boot with NSPOSIXErrorDomain Code 4 (Interrupted system call). The underlying error indicates launchd_sim cannot bind to its session, suggesting the CoreSimulator session management is broken in this macOS + Xcode + runtime combination. Steps to Reproduce: Install macOS 26.5.1 and Xcode 26.6 Open Simulator.app or run xcrun simctl boot Attempt to boot any iOS 26.5 simulator device Expected Result: Simulator boots successfully and reaches the Booted state. Actual Result: Unable to boot the Simulator. Domain: NSPOSIXErrorDomain Code: 4 Failure Reason: Interrupted system call Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding Domain: com.apple.SimLaunchHostService.RequestError Code: 4 Workaround: Installing an older stable iOS simulator runtime (iOS 17.x or 18.x) and targeting that instead allows simulators to boot normally. Additional Notes: Issue persists after full Mac restart xcrun simctl erase all and xcrun simctl delete all do not resolve it The iOS 26.5 Simulator volume mounts correctly at /Library/Developer/CoreSimulator/Volumes/iOS_23F77 launchd_sim binary is present and properly code-signed
Replies
0
Boosts
0
Views
29
Activity
1d
Xcode RAM Usage Problem
👋🏻 Hello Apple Developer Community, I’ve recently got the problem with the current Xcode Beta Version and the Preview Feature. Because when I try to load the Preview, the RAM Usage spikes and it’s nearly at the limit on my MacBook (16GB RAM). (Note: This is happening while loading up the Preview) But when I haven’t loaded the Preview Window, the overall RAM Usage of my system is ver low (Note: This is when Xcode has is not loading the Preview) (Note: This is after quitting Xcode for cancelling the load of the Preview) All Pictures are in German, sorry for that ☹️. What are possible problems or solutions against this problem? Have a nice day / evening 😁
Replies
1
Boosts
0
Views
47
Activity
1d
Apple supported way to create xcodeproject without using XCode IDE or with minimal use of XCode IDE
We need help to structure our project to start using apple standard way to create Xcode project. let me first express how currently we are creating Xcode project. As of today, we are using CMake to generate our xcode project which we can open in XCODE IDE and build/debug/run/etc. XCode IDE can open those project but we notice that some build setting does not seem to have correct value while looking into XCODE IDE but it somehow builds. There are some other issues also. Along with those issues, we also could not share this xcodeproject generated via CMake to AppleDTS support team as Apple does not support project created via some third party tool (like CMake or others). Let me also express why we decided to use CMake at first place to generate Xcode projects. Our project is layered architecture project where in upper layers uses lower layer artifacts. Each layer has its own set of build targets . And each layer can have both C++ and Swift files. And each layer would have most of the compiler flag common, but we could also have compiler flag specific to each layer also. To achieve all these, we have developed our own tool, which basically creates CMakeLists.txt (for project model- all targets, dependency, etc) and CMakePresets.json (for all compiler and linker flags). Now this tool scans through repos/source folders on each layer and then creates these files (CMakeLists.txt and CMakePresets.json). This tool uses inputs to decide compiler/linker/other properties from one centralized location. Which means every developer would use these same input files and thus they all can have same compiler/linker/other properties set consistent. This makes generated build system consistent on all developer machine and it allows confidence of saying if build works on one developer's machine would also work on other developer’s machine and if build does NOT work on one developer's machine, it would NOT work on other developer’s machine also. So, it’s consistent. That was the main reason to use CMake to generate xcode project. So, our internal tools creates meta data for CMake (which is CMakeLists and CMakePresets) and then CMake generates Xcode build system using XCode generator. Now we want to move to xcode native way to create projects but at the same time we also want this consistency that each of my developer would use exact same compiler/linker/other properties. If we ask developer to use XCode IDE to create xcode project, we cannot guarantee that they all will use same compiler/linker/etc flags and thus we would end up having inconsistent behaviour on different developer machines. We need your help to figure out how we can achive this ? We read some ways that we can create some template project and then we can create some .xcconfig files and use them to set target properties but honestly, we are able to stich them together. So please help us directionally on this , how should we proceed ? Basically we need to know how can we have all my developer use same xcodeproject. I was also thinking how would I be setting my CI for apple builds if I have to use XCode IDE to create xcode project and since CI environments are non interactive and it can happen n number of times in day (if I have setup to run sanity for all Pull Requests). Any help/direction on this is highly appreciated.
Replies
6
Boosts
1
Views
184
Activity
1d
Gemini coding assistant no reply
I set up Gemini in Xcode 27 beta in Settings using an API key from Google AI studio. When I select "New Conversation" and "Gemini" and type "hi" it just spins forever (many minutes) - no reply or error message. Is there any way to figure out what's wrong?
Replies
3
Boosts
1
Views
194
Activity
1d
StoreKit testing not working on iOS26.5 simulator
Hi, I'm trying to run our StoreKit unit tests with Xcode26.5 on an iOS26.5 simulator. Host computer has macOS26.5. All tests are failing and in the console I see logs such as [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error deleting all transactions: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error clearing overrides: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for jp.unext.mediaplayer: Error Domain=SKInternalErrorDomain Code=3 "(null)" And the simulator asks me to provide my AppleID. Tests have been broken since at least 26.4 The release notes claims that it has been fixed but not for me. https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes#StoreKit-Testing-in-Xcode Does anyone else have the same issue? Reported FB22774836 just in case.
Replies
7
Boosts
9
Views
672
Activity
1d
can not create iOS 27 Simulator
Apple M1 Pro, 26.5.1 (25F80) XCode 27.0 Beta (27A5194q) Command Line tools for Xcode 27 are installed. Device Hub Version 27.0 (235.4.2) Within device hub I can not create iOS 27 simulators. Only the 26.5 simulators are listed there. I installed the iOS 27.0 SDK. Also deleted and reinstalled it. The computer was restarted. No change. I am unable to create the proper iOS 27 Simulators. Any idea why this is not working? Thanks for the help upfront.
Replies
12
Boosts
1
Views
621
Activity
2d
Xcode 26.6 and 27 Gemini Authentication with Configuration Files
I’m attempting to set up Gemini agentic support in Xcode 26.6 RC (and I'm assuming the process is the same in 27), but since I need to use Gemini with a corporate account, I have a Google Cloud Project ID, not an API key, so it seems like the configuration file route is the right path? After consulting Gemini and filling out the .env file and settings.json files, Xcode is complaining about needing to be authenticated, and I can’t seem to see how to trigger the auth, like one might do in Gemini CLI. I'd appreciate any suggestions or advice at this point. Thanks in advance!
Replies
3
Boosts
0
Views
186
Activity
2d
Agents in Xcode: Codex Sign In not working
Hey all, the codex sign in isn't working for me in Agents. I am using the 26.5 release candidate version. It always says "Not Signed In". I have completed the Sign In process multiple times. Anyone else seeing this? I have filed Feedback FB22732574
Replies
32
Boosts
6
Views
1.6k
Activity
2d
iOS Simulator downloads a lot of data
iOS simulator downloads loads of data even over personal hotspots that should be low data - 10s of GBs which exhausts cellular plans. I.e. I'm connecting the phone over USB (charging and it automatically shares the cellular connection and faster deploy and debugging). I see that /Library/Developer/CoreSimulator/Volumes/iOS_23F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 26.5.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/nsurlsessiond downloads 10s of GBs probably in /Library/Developer/Xcode/UserData/Previews/Simulator Devices/<UUID>/data/private/var/MobileAsset/AssetsV2 over time. Most plans are not that infinite. Has anyone seen such thing? The phone is connected over USB and automatically used as network device and also has the low data mode toggle on.
Replies
0
Boosts
0
Views
35
Activity
2d
xcode27 beta2 library 'd64' not found
what can i do?
Replies
1
Boosts
0
Views
52
Activity
2d