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 Build Failure
Hi, I don't understand why Xcode fails to build my app when following logic was uncommented as part of ternary operator (as highlighted in attachment). Can somebody help me please ?? Thx. ... : shelterViewModel.getShelter(row: row, column: column).productId == ... ? Color.yellow ...
6
0
266
Apr ’25
Xcode stuck on "Waiting to attach [...] on Apple Watch Series 9
Hi everyone, Since a couple days, I can't launch my watchOS widget extension in the Xcode simulator. After launching the scheme in Debug or Release, I always end up with Xcode stuck on "Waiting to attach to watchOSWidgets on Apple Watch Series 9". I already uninstalled and reinstalled Xcode and cleared all Xcode related folders in Library. I also tried to use Debug > Attach to process, then Xcode goes into "Running watchOSWidgets on Apple Watch Series 9" but no widgets are installed, neither the app so I cannot debug anything. I tried on different simulators, always end up with the same problem. However, the watch app scheme works fine, in Debug or Release, it is only the widgets extension which doesn't work anymore. This seems related to my computer, because if I create an empty project with a default watch widget extension, I still have the same issue. I really don't know what to do... Does anyone has a clue ? Thanks
6
0
823
Dec ’24
Error Simulator Download Simulator IOS 18.2 22C5142a
I can't install Simulator 18.2 I reinstalled sometimes Xcode y always return this erro Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2025-02-15 15:41:39 +0000"; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.appleTVOSSimulatorRuntime), serverParameters ({ RequestedBuild = 22K5148a; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.appleTVOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 49 User Info: { checkConfiguration = 1; } System Information macOS Version 15.2 (Build 24C101) Xcode 16.2 (23504) (Build 16C5023f) Timestamp: 2025-02-15T09:41:39-06:00
6
0
1.9k
Mar ’25
Unable to launch tests in Xcode 26
I am trying to upgrade my app to use Xcode 26 and I cannot get my tests to launch. I am trying to launch tests to the simulator, and I always get this error after 300 second timeout: "encountered an error (The test runner hung before establishing connection.)" There are no other errors getting logged. I can run to the same simulator just fine, and in Xcode 16 the tests launch with no issues. The tests also run fine on an actual iPhone. Thanks in advance.
6
0
198
1w
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
394
Nov ’24
Cannot start app on simulator, it's crash and show error dyld[27267]: Symbol not found:g
I build app success full, but app is crash when it's install and start on simulator, please help to resolve the issue. xcode version 16.3 dyld`__abort_with_payload: Thread 1: signal SIGABRT Console error log: dyld[27267]: Symbol not found: _$sSo18WKPDFConfigurationC6WebKitE4rectSo6CGRectVSgvs Referenced from: <9ED011A5-B4BE-3B0B-98C6-0AFAF76A5B6C> ..../Library/Developer/CoreSimulator/Devices/C94520D8-031D-4D91-8050-859E0951D1A6/data/Containers/Bundle/Application/522BF7A2-7633-4FF1-BA02-130727B8E65C/App.app/Frameworks/flutter_inappwebview_ios.framework/flutter_inappwebview_ios Expected in: <0085D0EC-09E4-3699-ACE9-9B0C20B090BB> /Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/WebKit.framework/WebKit Symbol not found: _$sSo18WKPDFConfigurationC6WebKitE4rectSo6CGRectVSgvs Referenced from: <9ED011A5-B4BE-3B0B-98C6-0AFAF76A5B6C> ..../Library/Developer/CoreSimulator/Devices/C94520D8-031D-4D91-8050-859E0951D1A6/data/Containers/Bundle/Application/522BF7A2-7633-4FF1-BA02-130727B8E65C/App.app/Frameworks/flutter_inappwebview_ios.framework/flutter_inappwebview_ios Expected in: <0085D0EC-09E4-3699-ACE9-9B0C20B090BB> /Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/WebKit.framework/WebKit dyld config: DYLD_SHARED_CACHE_DIR=.../Library/Developer/CoreSimulator/Caches/dyld/24D81/com.apple.CoreSimulator.SimRuntime.iOS-18-2.22C150 DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=...../Library/Developer/Xcode/DerivedData/App-fdpvmjxapalesmhcoroqmpqwlxxm/Build/Products/Debug-iphonesimulator:/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libLogRedirect.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=.....Library/Developer/Xcode/DerivedData/App-fdpvmjxapalesmhcoroqmpqwlxxm/Build/Products/Debug-iphonesimulator DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22C150/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.2.simruntime/Contents/Resources/RuntimeRoot/usr/lib
6
0
305
Apr ’25
File download not working in Xcode 26.0 RC
Hello Apple Developer Community, I'm experiencing an issue with file download functionality in the iOS Simulator after updating to Xcode 26 RC (Build 17A321). Issue Description: When attempting to download files in the iOS Simulator via Safari, the download prompt appears correctly, but after tapping the 'Download' button, files are not being saved to the Files app. The download appears to do nothing with no error message, no indication of failure, but the file simply doesn't appear in Downloads or anywhere in the Files app. Environment: Xcode Version: 26.0 RC (17A321) iOS Simulator Version: 26.0 RC (23A339) Device Simulated: iPhone Air Steps to Reproduce: Open Safari in the iOS Simulator Navigate to a downloadable file (PDF, ZIP, etc.) Tap to initiate download Download prompt appears as expected Tap the 'Download' button Check the Files app → Downloads folder (empty) Expected Behavior: Files should download normally as they do on physical devices and as they did in previous Xcode versions. Actual Behavior: The download prompt dismisses after tapping 'Download', but no file appears in the Files app. No error message is shown, and there's no indication that the download failed, it simply appears as if nothing happened. Additional Information: Downloads work correctly on physical device (iOS 26 RC 23A340) This functionality worked properly in previous Xcode versions I have created a bug report to Feedback assistant: FB20190927 Thanks in advance for any assistance.
6
1
362
2w
Xcode 15 Beta Stuck on preparing iphone simulator for previews
Hiya, I am having issues trying to use previews in the xcode 15 beta, i am using an M2 macbook air with 8gb of ram. I am using MacOS Sonoma and iOS 17.0 Beta 1 and am struggling using previews, the base simulator works but no previews. I am not receiving any error so am very confused. Any help would be majorly appreciated. Thanks, Gus
6
2
4.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
369
Apr ’25
Bitbucket Cloud is Breaking Swift Package Manager
Today when I went to add a package via SPM in Xcode 16.0, the "Recently Used Loading..." spinner ran and never stopped. I could not add any packages. The packages I am loading are remote and not from my own repo. I did a "Refresh Account" via the right-click which then shows items in my own hosted repo (for both Bitbucket Cloud and Github), but "Recently Used" just loads forever and there is no way to add a package. I tried all of the usual cache deleting to no positive outcome. I saw that others had to reinstall Xcode which I am loath to do. I wound up executing defaults delete com.apple.dt.Xcode which of course made me lose all of my settings, but that did correct the problem. At least I thought it did. However, after getting everything reset, it stopped working again with the above issue. In short, I found the issue is with Bitbucket Cloud. If I remove this account from Xcode, SPM works as normal. Add it back (all credentials are 100% fine) and I can no longer use SPM. Does anyone know why Bitbucket Cloud is now breaking SPM and more importantly what can be done to have this account but also have a functioning SPM?
6
1
804
Jan ’25
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
626
Apr ’25
Device with Number Already exists on this Team
I've created a new project in Xcode. I'm running the Xcode 16.4 and MacOS 15.5. I'm trying to run my barebones project on my iPhone 16 (I'm just getting started). I turned on developer mode on my iPhone and went through the whole process. But in the Signing & Capabilities of my project under status I see two errors... There is a problem with the request entity A device with number 'XXXX8801C' already exists on this team. Provisioning profile "iOS Team Provisioning Profile: [MyBundleID]" doesn't include the currently selected device "My iPhone" (identifier XXXX8801C). I noticed in the devices on the developer portal that my device is showing as "Processing." I feel ike it's stuck. But I can't figure out how to clear it all out and try again. It's been 24 hours since this error came up. I've tried to clear trusted computers on the iPhone. I've deleted the "Derived Data" folder. I've removed my developer account from Xcode and added it again. I've restarted both my Mac and my iPhone multiple times. I've noticed it asked to authorize my computer twice. When I clear the authorized computers and then plug the phone back in it asks twice again. So I'm not sure if this is the issue? No idea why it asks twice but I'm only ever able to respond to the second request as the first request gets blocked in the UI by the second requests if that makes sense? I'm also not able to turn off developer mode on my iPhone. The switch isn't there as the docs state it should be. So again, I feel like this is the phone and the developer portal stuck causing the problem. Note: I saw someone else had encountered this problem and I replied to it and boosted it. But it looks like it was posted in 2017? Hence this new post.
5
0
312
Sep ’25
How do I use IOUserSCSIPeripheralDeviceType00?
I am having similar problems to this guy on Stack Overflow over a year ago: https://stackoverflow.com/questions/77627852/functions-of-iouserscsiperipheraldevicetype00-class-in-scsiperipheralsdriverkit There are also a few questions on this forum about this object, none of which have answers. I can get my driver to match and instantiate, but nobody calls my UserDetermineDeviceCharacteristics (which does nothing, just returns kIOReturnSuccess) I can attempt to call UserSuspendServices(), UserResumeServices() or UserReportMediumBlockSize() and all of them return kIOReturnUnsupported. It doesn't matter if I've unmounted the disk or not. Is the custom driver supposed to be instantiated beside the kernel's IOSCSIPeripheralDeviceType00, or should it replace it? What should its IOProviderClass be? What should its IOClass be - IOUserService, or something else? see FB19678139 and FB19677920
5
0
142
Sep ’25