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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Simulator frozen while Xcode debugger attached
I'm on Xcode 16.3 (16E140), using iPhone 16 Pro Simulator with iOS 18.4, on macOS Sequoia 15.4. Today is the first time using this particular configuration. On Friday I was using Xcode 16.2, simulator on 17.5, macOS 15.3.2. This morning while running the app in the debugger I get times where I pause in using the app, perhaps to look up some information or make some notes, then go back to the simulator and nothing works. It is just frozen. Tap tap tap all day long and nothing responds. In the Xcode console I get this over and over while the simulator doesn't respond. nw_protocol_socket_set_no_wake_from_sleep [C100.1.1:2] setsockopt SO_NOWAKEFROMSLEEP failed [22: Invalid argument] nw_protocol_socket_set_no_wake_from_sleep setsockopt SO_NOWAKEFROMSLEEP failed [22: Invalid argument] I then hit the "Stop" button in Xcode debugger and get this in console <0x10843a0b0> Gesture: System gesture gate timed out. XPC connection interrupted Message from debugger: Xcode has killed the LLDB RPC server to allow the debugger to detach from your process. You may need to manually terminate your process. The Simulator springs to life immediately. It even seems to have queued up my most recent inputs and happily accepts them and processes them as normal.
6
1
590
Apr ’25
Re: "Unknown Apple ID" entries in Xcode Accounts settings
Hello! This post is a response to another post from Oct 17 that has already been locked for some reason: https://forums.developer.apple.com/forums/thread/766500 After upgrading to Xcode 16.0, our build machine was no longer able to archive and upload builds to App Store Connect automatically, as every single time it would say: `IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account` I tried using the workaround in the post above as suggested, but it does not help the problem. Removing and signing out of the account just results in Xcode not being able to do automatic signing because it no longer has access to the account with privileges to do that automatic signing. error: exportArchive No Accounts error: exportArchive No signing certificate "iOS Distribution" found I also tried Xcode 16.1 beta 3 as suggested and now the build machine's account is actually removed after every build via our build system! I have to log on after every build, log back in, and then upload the build to App Store Connect manually. I'm guessing that this "workaround" was added to Xcode itself, which is not serving its intended purpose and has actually made things worse. Not sure if there is a more official venue to send a bug report, but I'm posting here for help since that's where I originally found the post and it appeared to be written by an Apple engineer. Any other possible workarounds? Should I try one of the newer beta releases? Any help would be appreciated as this is becoming very cumbersome and a routine update of Xcode on our build machine has caused a ton of headaches.
6
0
914
Oct ’24
Xcode cloud errors
Hi community: I'm coming across two error types on Xcode cloud during ui tests. encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal kill before starting test execution. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundlexcresult)) encountered an error (Failed to prepare device 'Clone 7 of iPhone 14 Pro' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/ resultbundle.xcresult. (Underlying Error: Unable to boot the Simulator. launch failed to respond. (Underlying Error: Failed to start launch_ sim: could not bind to session, launchd_sim may have crashed or quit responding))) Any ideas on how to solve them? Thanks
6
1
2.3k
Dec ’24
Xcode 16 beta 3 can't load Teams in VM
I'm currently setting up a new build environment. Our old build server was a small M1 Mac Mini set up to build our, up-to-now, only app. Since we now have a second app (and probably more to come) and have some issues building all on the same mac (gem versions, flutter versions, etc.) I now set up a virtualized build environment. I'm currently running a MacOS 15 beta 3 VM on a M2 Mac Mini also on MacOS 15 beta 3. The VM has all basic tools inside, including Xcode 16 beta 3 and is logged in with our AppleID for our build server. The VM is spun up with a non-persistent storage before the build, installs the gem's/flutter in the correct version, checks out the code and builds it. Now I'm getting an error on the build, that I have to select a development team, but he team is already selected and the build is working fine on the old M1 Mac Mini. It is suggested to login to Xcode, so I logged in to Xcode in the VM, which itself was successful, but when loading the teams I'm getting the following error: Decoding Error There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn't be read because it isn't in the correct format.. The account info is correct, it's the same account that is logged in to MacOS and it's the same account from the old build system. I guess this somehow has to do with the MacOS VM (before MacOS 15 it was not possible to signin to an apple id, this is also the reason why I use the beta). Is there any chance to fix this and get it working? We are not able to use Xcode cloud builds (or any other cloud services) due to corporate policies. We are also not able to buy a dedicated Mac Mini for every app (too expensive and too much time needed for maintenance).
6
2
3k
Dec ’24
On-demand resources suddenly stopped working?
So yesterday I noticed that some of images in my app stopped appearing. All of them were placed in the on-demand resources, that is I've assigned tags to them. Up until yesterday they were working correctly but since then whenever I try to load the assets I get the error message saying: Error Domain=NSCocoaErrorDomain Code=4099 "Connection invalidated to streaming unzip service." My code for loading the asset is pretty straightforward and it was working perfectly fine before: let resourceRequest = NSBundleResourceRequest(tags: ["vinyl"]) defer { resourceRequest.endAccessingResources() } do { if await !resourceRequest.conditionallyBeginAccessingResources() { try await resourceRequest.beginAccessingResources() } } catch { assertionFailure("Vinyl image was not available, error: \(error)") } I'm obviously using it in asynchronous context, but the old method which used completion handler gives me the same error. Has anyone encountered this issue as well? I just updated my devices to iOS 15.5, maybe that update broke on-demand resources? Tested on Xcode 13.4, iOS 15.5
6
6
3.6k
Dec ’24
Problems installing iOS 18.4 SDK on Intel iMac
Hi! I'm having problems installing the iOS 18.4 SDK for Xcode. The installation fails from within Xcode or from the command line with the following error message: $ xcodebuild -downloadPlatform iOS Downloading iOS 18.4 Simulator (22E238): Preparing to download...2025-04-05 10:16:50.451 xcodebuild[7138:103696] DVTDownloadable: Observed finish. Cancelling download asset. { assetId = 6fb1e5fe25ee1c372f7116516e615c556906bd4e; assetIdHash = 9d684dee0a7bae81ba9c4f79475976f41789eaf3; assetType = "com.apple.MobileAsset.iOSSimulatorRuntime"; attributesHash = 99e0653b3c175e32d4a045cb9be856573b2938c1; contentHash = d4aad730490a4476d8179d4cdb7c1fcae8dd388a; nonIdHash = be7dd5950580ff7c8e1f822b24bd76d58c08b8aa; pallasDynamicAssetIdHash = d7904ac1d93cc3702244074c49aafad923a6e2b4; policyHash = d3700ca0e5058eb1d7b21fd74b1c225a66f5e74e; urlHash = fc93246f74e44ae2b94a727bfd9bac228f69f961; }, error: (null) Downloading iOS 18.4 Simulator (22E238): Error: Error Domain=SimDiskImageErrorDomain Code=5 "(-67061 invalid signature (code or signature have been modified)" UserInfo={NSLocalizedDescription=(-67061 invalid signature (code or signature have been modified), unusableErrorDetail=} When trying to install in Xcode I get the following error message: Any idea on how to get this fixed is appreciated!
6
0
319
Apr ’25
Can't install Metal Toolchain component
With Xcode 26.0 beta 5 (17A5295f) when I run the following command xcodebuild -downloadComponent metalToolchain I get the following error: xcodebuild[48851:12478851] Writing error result bundle to /var/folders/b_/g67r_tl557z244g20ncr_qmsd9wrz1/T/ResultBundle_2025-07-08_11-10-0012.xcresult xcodebuild: error: Failed fetching catalog for assetType (com.apple.MobileAsset.MetalToolchain), serverParameters ({ RequestedBuild = 17A5295f; }) I can't install the toolchain from the Xcode GUI also. Does someone know a workaround ?
6
16
483
Aug ’25
Xcode 16.4 can't choose a lower version iOS simulator to debug
My Xcode version is 16.4, I have added an old version simulator (iPhone 13 with iOS 17.2) to the simulator list, but I can't use it for debugging, and all on display are iPhone 16 with 18.6 (the latest iOS devices). The setting "Minimum Deployments" for my App is 16.6. In addition, when I downloaded an iOS 16.0 version simulator, Xcode automatically added all iPhone 15 models of the simulator, but I still can't use them. In short, I can only use the default iPhone 16 simulators. So, if I want to debug my App using iPhone 13 (iOS 17.2), what should I do? Thank you for your reply. :) Another small issue, my App's destination has been set to support only iPhone, why are those iPad simulators still appearing?
6
0
178
Aug ’25
App can't debug on iOS 26 device, but can on iOS 18
This is from Mac OS 26 or the prior version. It seems to be trying to include XCTest, but its no where in the build phases or frameworks? Anyone seen this issue? Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { DVTErrorCreationDateKey = "2025-06-11 15:28:16 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; NSURL = "file:///Users/ekaplan/Library/Developer/Xcode/DerivedData/dormway-mobile-feckueenojzruoaobakflnuqoglk/Build/Products/Debug-iphoneos/dormway-mobile.app"; } Unable to Install “DormWay” Domain: IXUserPresentableErrorDomain Code: 1 Failure Reason: Please try again later. Recovery Suggestion: Failed to iterate on macho slices for input file: /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Failed to iterate on macho slices for input file: /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Domain: MIInstallerErrorDomain Code: 73 User Info: { FunctionName = MIMachOFileIterateImageVersions; SourceFileLine = 129; } parse_macho_iterate_slices failed for /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Domain: NSPOSIXErrorDomain Code: 62 Failure Reason: Too many levels of symbolic links User Info: { FunctionName = MIMachOFileIterateImageVersions; SourceFileLine = 129; }
6
0
240
Jul ’25
Device Support for IOS 18.5 Missing
I am missing device support for IOS 18.5 in xcode. I tried installing xcode 16.4, xcode 16.4 beta and xcode 26 beta 2 but none of them generated folder for 18.5. Is this happening only for me or everyone. Please provide me 18.5 folder if anyone has it. I would appreciate a lot.
6
0
517
Jul ’25
Xcode26: download stuck on 'fetching'
I just downloaded Xcode26, and am trying to download the new simulator to be able to run and test my app. But the downloads folder just shows that it's stuck on "Fetching download information ..." even 15 minutes after it started. I tried restarting Xcode but didn't help. Internet connection is good. Any tips to get it working?
6
3
277
Jul ’25
Sign in with Apple credential always revoked on iOS18/18.1 Simulator
Hi there - I maintain the react-native-apple-authentication module which allows react native developers to implement sign in with Apple When testing we noticed that code working perfectly in iOS17 Simulators now fails on iOS18/18.1 Simulators. Specifically, the credential status is always revoked when testing on an iOS18+ Simulator. The same code works perfectly on a real device running iOS18 or 18.1 so this appears to be a Simulator bug. This is problematic because App review is frequently performed on a Simulator, so there are false-negative test results for Sign In With Apple from reviewers when they use iOS18 emulators, resulting in App submission rejections. We're tracking this here, with some results posted and an example app in-repo that demonstrates the issue: https://github.com/invertase/react-native-apple-authentication/issues/356 It would be great to see the Simulator fixed so that it works correctly with Sign In With Apple again. Thanks
6
1
844
Nov ’24
Why doesn't Xcode's "Download Container" not always work?
Been using Xcode's Download Container for a short time, and at first there were no issues. But lately, it doesn't always download all the files from my iPhone to the Mac. Sometimes cleaning the build folder works, other times not. As well, the same happens whether I am connected to my iPhone via cable, or wifi. Has anyone else had this issue?
6
0
387
Nov ’24
Xcode no longer supports temporarily using a local SwiftPM package?
One practice that I use a lot is to drag and drop a SwiftPM package into my project when I want to make local edits - this replaces the remote dependency with a local dependency. Then I can edit and make changes to the dependency. When I am done, I remove that directory and Xcode would revert back to the remote package. In Xcode 16 this feature does not seem to work anymore, and instead it offers to copy the files into the project.
6
1
1.3k
Oct ’24
Xcode build time frustration
We have a Xcode project consisting of: A mix of Swift and Objective-C code app code ~ 1600 source files. Roughly around 35 {XC}Frameworks. Some of them are binary and some of them are getting built as a dependency to our app, etc. Binary libraries. Most of the frameworks built together with app code are Objective-C or Swift-based, which have their own amount of sources files and framework dependencies. The binary frameworks mostly contain cross-platform C++ code. Our (the poor developers) frustration is that almost all time when we do a insignificant change (or even just tap Cmd-R without any changes) in Swift-file or Objective-C file (.m) and then build again then big sh*t show starts again... For example: Frameworks may get rebuilt even though they are not touched. Tons of app-level files get built again even though no interface changes, etc. was made. Module verifier keeps verifying modules not touched at all, which takes really long time. Xcode 16 didn't seems to improve the situation - on the contrary. Example of an untouched framework that for unknown reason goes trough this every time we build: I know it is hard to come with ideas to solve this for an unknown larger project. But do other people with similar-size projects also experience this or is re-building not an issue for you? Cheers!
6
5
5.6k
Sep ’24
Can someone help me fix my xcode.
This is for a profile page for the app I am building. let updatedUser = User( coder: <#NSCoder#>, id: userId, name: name, email: email, phoneNumber: phoneNumber, profilePictureURL: nil, bio: bio ) Error code by line 1: Extra arguments at positions #2, #3, #4, #5, #6, #7 in call Error code by profile picture: 'nil' requires a contextual type This error at the bottom of the code: Expected '}' in struct Can someone please help me?
6
0
329
Nov ’24
The async/await API crashes in Xcode 16.3 and later
We use several UIKit and AVFoundation APIs in our project, including: setAlternateIconName(_:completionHandler:) getAllTasks(completionHandler:) loadMediaSelectionGroup(for:completionHandler:) Moreover, we use the Swift Concurrency versions for these APIs: @MainActor func setAlternateIconName(_ alternateIconName: String?) async throws var allTasks: [URLSessionTask] { get async } func loadMediaSelectionGroup(for mediaCharacteristic: AVMediaCharacteristic) async throws -> AVMediaSelectionGroup? Everything worked well with these APIs in Xcode 16.2 and earlier, but starting from Xcode 16.3 (and in 16.4), they cause crashes. We've rewritten the APIs to use completion blocks instead of async/await, and this approach works. Stack traces: setAlternateIconName(_:completionHandler:) var allTasks: [URLSessionTask] { get async } loadMediaSelectionGroup(for:completionHandler:) Also, I attached some screenshots from Xcode 16.4.
6
0
268
Jul ’25
Instruments in Xcode 15.3 not showing symbols
When using Instruments in Xcode 15.3 on macOS Sonoma 14.3.1 symbols from system frameworks are not displaying. I've tried creating a template "App" project and running it on the iOS 17.4 simulator without any code changes and still am not seeing symbols so I can be sure it's not unique to my real-world project build settings. If I install Xcode 15.0 and run the same build in the same 17.4 simulator using Instruments 15.0 it shows thread names and symbols for UIKit and other frameworks but is still missing SwiftUI symbols. Instruments 15.3 Instruments 15.0 I've spent 2 days trying to narrow down why I couldn't debug my app and even deleted all my partitions and reinstalled macOS which didn't fix the issue.
6
1
3.0k
Sep ’24