Reproduction procedure
Launch Xcode and press shift+command+N to create a macOS App project.
Edit the generated ContentView.swift to the following content:
struct ContentView: View {
@State var txt: String = “”
var body: some View {
VStack {
Text(“Hello, world!\(txt)”)
TextField(“input”, text: $txt)
onSubmit { // lack of a period letter.
// .onSubmit { // Correct code
print(“onSubmit\(txt)”)
}
}
}
}
Build with command+B and it succeeds.
Debug with command+R, but a rainbow wheel appears and the window does not show.
An error is displayed in Xcode’s Preview Canvas, preventing preview.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am encountering an issue where code coverage data is not showing for my main app in Xcode when running tests for the iOS simulator. However, code coverage is being reported correctly for some modules.
Enable Code Coverage Support: YES
Xcode 16.2
macOS: 15.3.1
Macbook Pro M1 14-inch, 2021
Despite these configurations, Xcode fails to show code coverage for the main app. Can anyone suggest what might be causing this issue and how to ensure code coverage is correctly reported for the main app during simulator builds?
Created a new project in Xcode 16.3. While adding breakpoints app is crashing every time in Xcode and playground both. Tried with swift 5 and swift 6 getting same error.
Crash reason : Couldn't find the Objective-C runtime library in loaded images.
Message from debugger: The LLDB RPC server has crashed. You may need to manually terminate your process
lldb-rpc-server-2025-04-14-092736.txt
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Swift Playground
Xcode
Playground Support
LLDB
Attempting to launch a widget in Debug mode on Sonoma from Xcode 15 is failing with the following message:
attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)
Looking in console I see this message:
macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (MacGalleryWidget) (pid: 1851): (MacGalleryWidget) is hardened, (MacGalleryWidget) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger
What Xcode settings should I be looking at to rectify this? I suspect I may have something that's out of whack.
Syntax highlighting & code autocompletion is broken for Swift Packages wrapping an underlying binary target. Jump to defenition for module import shows the whole module interface and project builds & archives just fine, but any known workarounds to resurrect syntax assistant won't work without any errors/warnings.
Replacing the .binaryTarget() with plain .target() with source code in package dependency brings all assistant features back.
Steps to reproduce (project attached):
Create a local Swift Package
Add a dependency with binary target (for example — AppsFlyerFramework https://github.com/AppsFlyerSDK/AppsFlyerFramework)
Try to use dependency product with binary dependency
Attempted steps to fix:
Full DD clean
Full project clean
~15 min to index
Xcode 16.0 & Sonoma 14.6.1, problem persists with Xcode16.2 & Sequoia.
Radar #16035437
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?
We have started facing an issue after updating Xcode from version 15.2 to 16, we have a voip application with webview and call kit, and we have the Background Modes capabilities: Voip, Audio, Background fetch, and Background processing.
We had no problem on Xcode 15, but ever since updating Xcode 16 and sdk 18, when app goes into the background during an active call, the app is suspended and no events are triggered UNTIL the app is resumed to the foreground.
The “Deployment Targets” for iOS was IOS12 or higher in Xcode15, but is now listed as IOS15 or higher in Xcode16.
https://developer.apple.com/support/xcode/
How does this change affect developers and users?
For example, if a developer specifies less than iOS15 in the “iOS Deployment Target” on Xcode, how will this affect them?
Also, will users under iOS 15 be unable to run the apps?
When I launch the Quick Look Preview Extension target in Xcode, an app called Quick Look Simulator opens with an almost empty window:
Online I read that the Terminal command qlmanage allows to test Quick Look plugins (which I think were an older format for creating Quick Look extensions), but running
qlmanage -p /path/to/previewed/file -c public.text -g /path/to/QuickLookPreviewExtension.appex
(where QuickLookPreviewExtension.appex is generated by the Xcode build and is located in the DerivedData folder) gives an error
Can't get generator at QuickLookPreviewExtension.appex
How can I debug a Quick Look Preview Extension?
We are seeing crashes after upgrading to xcode16.x ( tested with 16.1 , 16.2 and 16.3) and ios 18.1, 18.2, 18.3.1 and 18.4 . when tests are running simulator is crashing with mulitple reasons.
CoreSimulatorService[85444] <Error>: Failed to get a device identity for simulator device BFAD684E-A48A-4170-80E1-8FBC04744E79, error: Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to create BAA info." UserInfo={NSLocalizedDescription=Failed to create BAA info., NSUnderlyingError=0x600002072a60 {Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to query baa info." UserInfo={NSLocalizedDescription=Failed to query baa info., NSUnderlyingError=0x600002073390 {Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to load cryptex1 manifest." UserInfo={NSLocalizedDescription=Failed to load cryptex1 manifest., NSUnderlyingError=0x600002071110 {Error Domain=com.apple.MobileActivation.ErrorDomain Code=-1 "Failed to load firmware data from /System/Volumes/iSCPreboot/F743DA4B-92E7-4E92-ACD2-40775DF4B5A2/cryptex1/current/apticket.j274ap.1A256C21D3001E.im4m." UserInfo=0x600003b47bc0 (not displayed)}}}}}}
sometimes crashing with
[02:47:24]: ▸ Tests_iOS-Runner encountered an error (Failed to prepare device 'Clone 2 of iPhone 16 Pro' for impending launch. (Underlying Error: Unable to boot the Simulator. launchd failed to respond. (Underlying Error: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding)))
sometimes with
[18:44:47]: ▸ 2025-05-08 18:44:47.019 xcodebuild[75752:6252304] [MT] IDELaunchReport: a616bd895a3ee240:a616bd895a3eec00:Install Actions Finished with error: Unable to boot the Simulator.
[18:44:47]: ▸ Domain: NSPOSIXErrorDomain
[18:44:47]: ▸ Code: 60
[18:44:47]: ▸ Failure Reason: launchd failed to respond.
[18:44:47]: ▸ User Info: {
[18:44:47]: ▸ Session = "com.apple.CoreSimulator.SimDevice.BD4A5DAB-3317-44D1-AFD1-C6EED090BB20";
[18:44:47]: ▸ }
[18:44:47]: ▸ --
[18:44:47]: ▸ Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding
[18:44:47]: ▸ Domain: com.apple.SimLaunchHostService.RequestError
[18:44:47]: ▸ Code: 4
[18:44:47]: ▸ --
[18:44:47]: ▸ 2025-05-08 18:44:47.019 xcodebuild[75752:6252304] [MT] IDELaunchReport: a616bd895a3ee240:a616bd895a3eec00:Install Actions com.apple.dt.IDERunOperationWorkerFinished {
[18:44:47]: ▸ "operation_duration_ms" = 55114;
[18:44:47]: ▸ "operation_errorCode" = 60;
[18:44:47]: ▸ "operation_errorDomain" = NSPOSIXErrorDomain;
[18:44:47]: ▸ "operation_name" = "_IDEInstalliPhoneSimulatorWorker";
[18:44:47]: ▸ }
sometimes crashing with
Run test suite Tests2 encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal term before starting test execution.))
When running instruments or when debug memory in Xcode, I am getting same error as
An unknown error occurred launching the helper task
Xcode: Xcode16.3
OS: 15.5 Beta (24F5068b)
Mac mini: Apple M2 Pro
We have a Privileged Helper tool that we install with SMJobBless. I would like to debug it.
I've added WaitForDebugger in our helper tool launchd plist and it does wait.
But I can't attach to it via Debug->Attach to Process in Xcode with error:
Code: 3
Failure Reason: tried to attach to process as user 'myusername' and process is running as user 'root'
I set Debug process as: root in scheme settings. But I'm not sure if it does anything since I'm not running this particular scheme at the moment of attach.
I tried unsuccessfully to set "Wait for the executable to be launched" but I had to create a new scheme for it since helper is built as part of the main app so maybe I did something wrong.
Am I doing something wrong or is it not possible to attach to root process?
Hi! I develop an iOS library and I met an issue with SwiftUI previews in iOS app project with my library integrated. After I open preview, build for preview finishes successfully, but preview itself never appears. I failed to find any error messages or any other indicators of what went wrong or how to fix it. Switching to legacy preview execution seems to fix problem, but I think that is not ideal. Could you help fixing this?
Xcode 16.2, Simulator iPhone 16, iOS 18.2
Project to reproduce -
https://drive.google.com/file/d/1cU6JKwshK_wQfe9YIqcMg3UGWq45OYlx/view?usp=sharing
Preview diagnostics - https://drive.google.com/file/d/1kPcgVSSqreiepGuqhdIoCW2rLSicgsWr/view?usp=sharing
So I use two MacBooks for work and different levels of projects, updated MacBook 1, and I was about to download and install Predictive Code Completion Model and IOS 18.4 Runtime. But doing the same for my second MacBook isn't working... I've been searching for days now, and the deadline for submission is fast approaching. I need help on this. At first, I thought it was a network thing and had to rush to my friends, but the same issue and nothing better
IOS 18.4 Error
`Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
User Info: {
DVTErrorCreationDateKey = "2025-05-07 22:41:47 +0000";
}
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({
RequestedBuild = 22E238;
})
Domain: DVTDownloadsUtilitiesErrorDomain
Code: -1
Download failed due to not being scheduled or the download of the whole resource was not able to complete in the time allowed. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime)
Domain: com.apple.MobileAssetError.Download
Code: 53
User Info: {
checkTimeoutConditions = 1;
}
System Information
macOS Version 15.4.1 (Build 24E263)
Xcode 16.3 (23785) (Build 16E140)
Timestamp: 2025-05-07T23:41:47+01:00`
Predictive Code Completion Model
`The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $1545d4bd8).DownloadError error 2.)
Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $1545d4bd8).DownloadError
Code: 2
User Info: {
DVTErrorCreationDateKey = "2025-05-07 22:42:56 +0000";
}
There was an error transferring over the network.
Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $1545d4bd8).DownloadError
Code: 2
System Information
macOS Version 15.4.1 (Build 24E263)
Xcode 16.3 (23785) (Build 16E140)
Timestamp: 2025-05-07T23:42:56+01:00`
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Developer Tools
Xcode
Simulator
Xcode Sanitizers and Runtime Issues
(Copy pasted from FB17261080 that I submitted)
Hi:
Apple's SDK (libSystem.B.tbd) provides definition for multiple symbols(__unw_add_dynamic_fde / __unw_add_find_dynamic_unwind_sections ), but doesn't provide corresponding headers, available in LLVM upstream as libunwind_ext.h
We need such headers to write Exception-Enabled JIT Framework for macOS
app packged with Xcode16 crashed on iOS12 certainly. My question is:
is it known issue for Apple team?
to resolve this issue, what can we developers do?
This is
I am using my real device and the Xcode Preview which works pretty fine. I do not want to show an empty canvas pane all the time. But when hiding the canvas, the preview pauses. I tried the refresh shortkey (OPT + CMD + P), too, while canvas is invisible.
Why must the canvas be visible even there is no content besides "Previewing on iPhone from..." Info?
I hope there is a workaround to hide the canvas while pushing to real devices.
In our project, we download H5 resources to the local device and then open the H5 pages through WKWebView(-loadFileURL:allowingReadAccessToURL:). When the H5 pages request server resources, cookies are required.
Before opening the H5 page, we set the required cookies in the WKHTTPCookieStore using the setCookie method. Additionally, we set the allowFileAccessFromFileURLs and allowUniversalAccessFromFileURLs properties for the WebView.
On other mobile phones, the cookies can be carried normally. However, on mobile phones running the iOS 18.0 system, the cookies cannot be carried. Moreover, this problem only emerged after we upgraded Xcode to version 16.2.
We've also tried injecting cookies via JavaScript, but it didn't work(document.cookie = xx=${xx}; path=/; expires=weekday, xx jan xxxx xx:xx:xx GMT; Domain=example.com; Secure; SameSite=None ;).
Can anyone help me on this?
Thanks in advance.
It's maddening. I just opened a file and now it's gone because I had the audacity to open another file. I've learned that I can double click the tab of the first file to make it a permanent tab... but, of course, I'll need to do that every time I ever open any file ever, and if I close that file and come back to it later I'm going to be constantly having to double click tabs just to make Xcode stop replacing my tabs for me.
It's nuts. It's driving me insane.
Please. Is there any way to just DISABLE the temporary tabs behavior? I don't find it helpful in any way and I find it to be destructive to my development workflows.
Hi! When building my app using Xcode 16, fast scrolling (using scrollViewProxy.scrollTo) a list would result in items not appearing even when scrolling stopped. This does not happen when the app is built with Xcode 15, even on iOS 18.
I'm also getting this error in the logs: List failed to visit cell content, returning an empty cell. - SwiftUICore/Logging.swift:84 - please file a bug report.