I’ve noticed a strange bug in Xcode 16 and Swift. When a preview is rendering and hasn’t finished yet and you run an app to debug, Xcode is launching two instances of the app. Has anyone else noticed this issue? If you let the preview finish rendering before running the app, this doesn’t happen. Very odd.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
i have met error below when i tried to po one attributes of an instance in my Xcode lldb:
error: type for self cannot be reconstructed: type for typename "$xxxxx" was not found (cached)
error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work.
Is there anybody met the same error before? I urgently want to know why this happen and how to fix this issue.
My macOS Version is Sequoia v15.0.1, Xcode16.0. This problem showed after i upgraded my macOS and Xcode version.
WKWebView based apps crash in today's Xcode 16.4 iOS 18.5 simulator with messages including:
"Library not loaded: /usr/lib/swift/libswiftWebKit.dylib"
and of the form
"/Users/yyy/Library/Developer/Xcode/DerivedData/zzz/Build/Products/Debug-iphonesimulator/libswiftWebKit.dylib' (no such file)"
I updated Xcode and MacOS recently and haven't been able to compile my Flutter app on iOS devices/simulators since then. The error keeps changing every time I run it but here's one of the output in the terminal after running flutter run:
Uncategorized (Xcode): Command SwiftGeneratePch emitted errors but did not return a nonzero exit code to
indicate failure
Error (Xcode): no such file or directory:
'/Users/chiragbhansali/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation'
Error (Xcode): stat cache file
'/Users/chiragbhansali/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-
db63dc9361471f152f572502bdbfe70a.sdkstatcache' not found
Error (Xcode): unable to rename temporary
'/Users/chiragbhansali/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3F9VRK3CXAUUD/UIKit-1KHQ7M05IF
VXC-56601391.pcm.tmp' to output file
'/Users/chiragbhansali/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/3F9VRK3CXAUUD/UIKit-1KHQ7M05IF
VXC.pcm': 'No such file or directory'
Error (Xcode): could not build module 'UIKit'
/Users/chiragbhansali/Chirag/Coding/Projects/app/test/build/ios/Debug-iphonesimulator/Flutter.framewo
rk/Headers/FlutterAppDelegate.h:7:8
Error (Xcode): could not build module 'Flutter'
/Users/chiragbhansali/Chirag/Coding/Projects/app/test/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header
'/Users/chiragbhansali/Library/Developer/Xcode/DerivedData/Runner-eifcguceazlwumgsyzegclqdrbqt/Build/Intermed
iates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_PB6A5GFLTNPC-clang_3F9VRK3CXAUUD.pch' for
bridging header
'/Users/chiragbhansali/Chirag/Coding/Projects/app/test/ios/Runner/Runner-Bridging-Header.h'
Uncategorized (Xcode): Command PrecompileSwiftBridgingHeader emitted errors but did not return a nonzero exit
code to indicate failure
Uncategorized (Xcode): Command SwiftEmitModule failed with a nonzero exit code
Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code
Could not build the application for the simulator.
Error launching application on iPhone 16 Pro.
What I have tried so far:
Deleting iOS SDK and simulators
Cleaning Xcode build cache using cmd+shift+k
Creating a new Flutter project and trying to compile it (it failed so that reduces the chances of it being a Flutter issue)
Clearing the DerivedData folder
Clearing settings and cache of simulators
Restarting laptop
Versions:
Xcode: 16.0
iOS: 18.0
MacOS: 15.1 (didn't work with 15.0 either)
Flutter: 3.24
Topic:
Developer Tools & Services
SubTopic:
Xcode
Xcode 16.2 runs well, but encountered the problem in Xcode 16.3.
Topic:
Developer Tools & Services
SubTopic:
Xcode
XCode 13 is super slow, build time is 10~20 times longer than Xcode 12。The worst release ever.
I have installed Sequoia and Xcode 16 and now I can't add packages to my (or any project). I just get a message saying the package can't be resolved. Basically I can't carry on developing.
SORT THIS OUT APPLE
On both RC versions of macOS 15 and Xcode 16, predictive code completion fails to install with the following error message:
The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.)
Domain: ModelCatalog.CatalogErrors.AssetErrors
Code: 1
User Info: {
DVTErrorCreationDateKey = "2024-09-09 21:23:43 +0000";
}
--
Failed to find asset: com.apple.fm.code.generate_small_v1.tokenizer - no asset
Domain: ModelCatalog.CatalogErrors.AssetErrors
Code: 1
--
System Information
macOS Version 15.0 (Build 24A335)
Xcode 16.0 (23050) (Build 16A242)
Timestamp: 2024-09-09T17:23:43-04:00
I am suddenly unable to connect to my iPhone (running iOS 17.0) in Xcode (either 15 or the last 15 beta). I get this error:
The developer disk image could not be mounted on this device.. Error mounting image: 0xe8000115 (kAMDMobileImageMounterDevicePropertyQueryFailure: Failed to query device property.)
I am able to see the disk image iOS_DDI.dmg in the Finder by opening /Users/cmonsour/Library/Developer/DeveloperDiskImages/
I have restarted both computer and iPhone, re-enabled Developer Mode, cleared Derived Data. I am not running a VPN. I am running the latest Xcode. I upgraded from Ventura to Sonoma with no improvement.
Any help appreciated. Unable to run anything from Xcode on my iPhone now, which is quite frustrating.
Details are as follows:
The developer disk image could not be mounted on this device.
Domain: com.apple.dt.CoreDeviceError
Code: 12040
Failure Reason: Error mounting image: 0xe8000115 (kAMDMobileImageMounterDevicePropertyQueryFailure: Failed to query device property.)
User Info: {
DDIPath = "/Users/cmonsour/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg";
DVTErrorCreationDateKey = "2023-10-01 18:33:29 +0000";
DeviceIdentifier = "A4E1792C-1396-4BAF-A1E1-73C19F9FB8A4";
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
NSURL = "file:///Users/cmonsour/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg";
Options = {
MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/A4E1792C-1396-4BAF-A1E1-73C19F9FB8A4/";
UseCredentials = 0;
};
"com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI;
}
--
Error mounting image: 0xe8000115 (kAMDMobileImageMounterDevicePropertyQueryFailure: Failed to query device property.)
Domain: com.apple.mobiledevice
Code: -402652907
User Info: {
FunctionName = AMDeviceRemoteMountPersonalizedBundle;
LineNumber = 2108;
}
--
Failed to initialize remote device attributes: 0xe8000115 (kAMDMobileImageMounterDevicePropertyQueryFailure: Failed to query device property.)
Domain: com.apple.mobiledevice
Code: -402652907
User Info: {
FunctionName = "-[PersonalizedImage mountImage:]";
LineNumber = 1772;
}
--
Failed to retrieve personalization identifiers: 0xe8000115 (kAMDMobileImageMounterDevicePropertyQueryFailure: Failed to query device property.)
Domain: com.apple.mobiledevice
Code: -402652907
User Info: {
FunctionName = "-[PersonalizedImage initializeRemoteDeviceAttributes:]";
LineNumber = 1367;
}
--
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_isCoreDevice" = 1;
"device_model" = "iPhone14,5";
"device_osBuild" = "17.1 (21B5045h)";
"device_platform" = "com.apple.platform.iphoneos";
"dvt_coredevice_version" = "348.1";
"dvt_mobiledevice_version" = "1643.2.4";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 173097;
"operation_errorCode" = "-402652907";
"operation_errorDomain" = "com.apple.dt.CoreDeviceError.12040.com.apple.mobiledevice";
"operation_errorWorker" = IDEInstallCoreDeviceWorker;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 8192;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos17.0";
"sdk_osVersion" = "17.0";
"sdk_variant" = iphoneos;
}
--
System Information
macOS Version 14.0 (Build 23A344)
Xcode 15.0 (22265) (Build 15A240d)
Timestamp: 2023-10-01T14:33:29-04:00
I have a project I've been working off of for a few years now that makes use of local Swift Packages. In my workspace, I have a "Kit" project that generates a framework using several local Swift Packages as dependencies.
In Xcode 12, the local Swift packages resolve correctly and compiles, but each beta of Xcode 13 gives me the error:
"[ProjectName].xcodeproj Missing package product '[LocalSwiftPackage]'"
Clearing the package cache, derived data, or restarting the application does not resolve the issue. Only Swift Packages that are remotely loaded from a URL are compiled correctly.
Using local packages to separate module code, while still being able to edit in the same project, has been essential to my workflow and would hate to see Xcode 13 release with these breaking changes, and I have not seen this issue listed in the known issues for the Xcode 13 release notes.
Has anyone else experienced this issue or found a workaround?
I'm unable to download the Metal toolchain with Xcode. When trying to do it via the command line, I get the following:
> xcodebuild -downloadComponent metalToolchain -exportPath /tmp/MyMetalExport/
Beginning asset download...
2025-08-06 19:46:19.983 xcodebuild[1395:22024] Writing error result bundle to /var/folders/48/1k1jfsxn56zcs4qr_719rc1w0000gn/T/ResultBundle_2025-06-08_19-46-0019.xcresult
xcodebuild: error: Failed fetching catalog for assetType (com.apple.MobileAsset.MetalToolchain), serverParameters ({
RequestedBuild = 17A5295f;
})
From Console.app:
DVTDownloadsFetchAssetCatalog() complete assetType (com.apple.MobileAsset.MetalToolchain), options: (MADownloadOptions allowsCellular: 0 resourceTimeout: 60 canUseCacheServer: 0 discretionary: 0 disableUI: 0 sessionId: (null) additionalServerParams:{ RequestedBuild = 17A5295f; } allowsExpensiveAccess:1 requiresPowerPluggedIn: 0 prefersInfraWiFi: 1 liveServerOnly: -1 DownloadAuthorizationHeader: not present analyticsData: not present allowDaemonConnectionRetries: 0), result: (59), catalogError: (Download failed due to not being able to find the host. (Catalog download for com.apple.MobileAsset.MetalToolchain))
Note that I am online. I've tried restarting my computer and Xcode and using a different network.
Hi there,
I uploaded an update bundle for the posted app, but I got a rejection message.
ITMS-90048: This bundle is invalid - Your archive contains paths that are not allowed: [._Symbols]
The XCode version I'm using is 16.2, and I've been trying to find a route using Run Script and Finder, but I don't know what the hell it is about.
Does anybody know what could cause this issue?
Any help would be appreciated.
Thanks.
I have a MacMini M2 machine running Sequoia 15.1 OS. On this machine, I am running a Virtual Machine, utilizing the Virtualization.Framework, with the same OS version, 15.1.
Logging into my account in the System Settings is successful. Next, I need to add my account in Xcode 16.1. While the initial login is successful, Xcode immediately displays 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.
As a result, I cannot see any account information, teams, etc.
A very similar bug has been reported at this issue - https://developer.apple.com/forums/thread/759877, but there has been no progress or updates there.
Is there any chance to fix this and get it working?
The Foundation Models Framework stopped working after Xcode failed to download the "Predictive Code Completion Model".
What happened was on macOS Tahoe 26.0:
Downloaded and installed Xcode 26 Beta (17A5241e)
Worked with Foundation Models framework. Everything worked fine. ✅
Opened Xcode 16.4
This triggers the downloading of Predictive Code Completion Model which then fails.
Go back into Xcode 26 Beta, Foundation Models framework no longer works. ❌ Error: "Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base.generic - no asset"
What I've tried or checked:
Reinstalling Xcode 26 Beta
Uninstalling both Xcodes and only installing Xcode 26 Beta
Checked available space on drive (over 300 GB free)
Restarted Mac
Restarted Xcode 26
Changed wifi networks
Turned on VPN
Deleted the Library > Developer > Xcode folder and reinstalled Xcode 26
Feedback Report
FB18208139: Can't download Predictive Code Completion Model - Xcode 26
Screenshots
Topic:
Developer Tools & Services
SubTopic:
Xcode
We are experiencing an issue with withCheckedContinuation in our Swift project. Our implementation was working perfectly in a previous version of Xcode and continues to work in the simulator. However, it fails to work on a real device. Here’s a brief description of the problem:
• Environment:
- Xcode Version: Xcode 16.0 Beta 5
- Swift Version: Swift 5
- OS: IOS18 beta 5
• Problem:
The code using withCheckedContinuation behaves as expected in the simulator but fails on a physical device. We are receiving a “bad access to memory” error when running on a real device.
• What We’ve Tried:
1. Verified that the code works in previous Xcode versions.
2. Tested on different simulators, where it runs without issues.
3. Checked for any obvious errors in memory handling or threading.
Code Example:
Here’s a simplified version of the problematic code:
var body: some View {
VStack {
Text("Hello, world!")
}
.padding()
.onAppear {
Task {
await self.checkTrialOrIntroductoryDiscountEligibilityAsync()
}
}
}
func checkTrialOrIntroductoryDiscountEligibilityAsync() async {
return await withCheckedContinuation { continuation in
checkTrialOrIntroDiscountEligibility() {
continuation.resume()
}
}
}
func checkTrialOrIntroDiscountEligibility(completion: () -> Void) {
completion()
}
}
I am using the latest version of Xcode 16, and I have created a GPX file in my project. However, I am unable to see or select the file to simulate the GPS location. I have attempted to uninstall and reinstall Xcode completely, but the issue persists. Has anyone encountered a similar problem? How can I resolve this? Thank you.
Using xcode 26 with linker flag -ld_classic,get an error :
0 0x1042b9778 __assert_rtn + 160
1 0x1042bc560 ld::tool::SymbolTableAtom<x86_64>::classicOrdinalForProxy(ld::Atom const*) (.cold.3) + 0
2 0x1041f3da8 ld::tool::SymbolTableAtom<x86_64>::classicOrdinalForProxy(ld::Atom const*) + 172
3 0x1041f4c1c ld::tool::SymbolTableAtom::addImport(ld::Atom const*, ld::tool::StringPoolAtom*) + 140
4 0x1041f6500 ld::tool::SymbolTableAtom::encode() + 396
5 0x1041e83a8 ___ZN2ld4tool10OutputFile20buildLINKEDITContentERNS_8InternalE_block_invoke.413 + 36
6 0x182a95b2c _dispatch_call_block_and_release + 32
7 0x182aaf85c _dispatch_client_callout + 16
8 0x182acc478 _dispatch_channel_invoke.cold.5 + 92
9 0x182aa7fa4 _dispatch_root_queue_drain + 736
10 0x182aa85d4 _dispatch_worker_thread2 + 156
11 0x182c49e28 _pthread_wqthread + 232
A linker snapshot was created at:
/tmp/app-2025-06-13-215652.ld-snapshot
ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5196.
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
I'm trying to run my app on my iPhone and XCode is unable to detect it.
Versions (as of time of writing, these are all the latest versions)
XCode: 15.0.1
iOS: 17.1.2
macOS: Sonoma 14.1.2
What I've tried
Updating all hardware to the latest versions.
Restarting all hardware.
Clearing cache/derived data.
Using different USBC ports/cables.
Using the XCode 15.1-Beta 3 (the latest beta)
Clearing trusted computers and re-trusting
Disabling Multipath Networking (solution for someone else on the dev forums)
Creating a brand new xcode project.
Disabling all wifi/bluetooth and reconnecting
Using different wifi networks
Calling mac support (they directed me back here)
Scouring forums
What happens
I start by disconnecting my phone from my computer, clear trusted computers, restart xcode, and start (basically) from a completely blank slate. First I open XCode to my project. Then I connect my iPhone via USBC. I see that XCode says "iPhone not eligible while pairing in progress" (or something like that). I see on my phone that I must trust this computer, I hit trust, I enter my phone's passcode, then that disappears on my phone, and in XCode the message about eligibility disappears. I then click on the device selector to choose between either a simulator or a hardware device and under hardware I only see a message that says "No eligible devices connected to my mac". If I open the "Manage Run Destinations" organizer I see all the simulators there in the simulators tab, but when I go to the Devices tab, I see nothing. Sometimes when I go through this process, I can get a banner to appear up top, but still no device shows up on the left. The banner will show me that it is indeed my iPhone, but it will be missing information like "Serial Number" or "Capacity". Here's a screenshot of what I see. Keep in mind, this banner up top does not always show up when I go through this process.
iPhone CAN be detected on my other laptop
When I do this exact same thing on my other laptop, everything works just fine. Here are the specs I'm running on that laptop.
(using the same cable/wifi network/etc)
XCode 15.0.1
macOS: Ventura 13.6.1
iPhone 17.1.2 (I'm using the same iPhone)
The only difference here being the macOS version. However, the problem started on my "broken" computer while I was running a previous major macOS version. This problem is actually what prompted my to do a system update to Sonoma.
Please for the love of god, halp!!!
Xcode 26 Beta 5 Universal: Not able to install iOS 26 Beta 5 simulator on intel macs
Below log is shown:
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
User Info: {
DVTErrorCreationDateKey = "2025-08-08 06:37:48 +0000";
}
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
System Information
macOS Version 15.5 (Build 24F74)
Xcode 26.0 (24198.5) (Build 17A5295f)
Is simulator run time for Xcode 26 Beta 5 not given out yet?
However I am able to download simulators on Apple Silicon macs with same Universal installer.
Has anyone faced similar issue?
I've just downloaded "Additional Tools for Xcode 13" after today's release, and installed "Network Link Conditioner.prefPane" on my macOS Big Sur 11.6 (20G165).
But it just don't work. Every time I try to open it an error appeared.
Dose the tool only support macOS Monterey which Xcode 13.0 (13A233) dose not support?
BTW, the workaround for me is using the tool in "Additional Tools for Xcode 12.5"...