Hi,
You're here because your project has issues related to Xcode Previews or Swift Previews. The issue you're experiencing may be the result of any of the following:
An error in your SwiftUI app, Xcode previews, or on-device previews.
A configuration error in your Xcode project, including any third-party dependencies or packages.
A system issue in the operating system, SwiftUI, or in Xcode Previews.
Based on your request, I need more information about your SwiftUI app when rendering Xcode Previews or on-device previews. Specifically, I’ll need the diagnostics Swift Previews generates to make sure I understand the error encountered by the preview system. Please create a report in Feedback Assistant to share the details requested in the instructions below.
For issues with macOS, Mac Catalyst, or on-device iOS previews, perform the following steps to gather diagnostics:
Download and install the Swift Previews logging profile for your device.
Reproduce the error while previewing on device, taking note of the timestamp when the error occurred.
Attach the Xcode sysdiagnose, sysdiagnose, or simctl diagnose logs and timestamp to your feedback.
For issues with Xcode Previews, perform the following steps to gather diagnostics:
Download and install the Swift Previews logging profile for your device.
Reproduce the error in Xcode Previews, if you haven’t already done so.
If an error banner appears in the canvas, click the "Diagnostics" button within the banner, then go to Step 5; otherwise, continue to Step 4.
If the error banner is missing, navigate to the menu in Xcode: Editor > Canvas > Diagnostics
In the presented sheet, click the "Generate Report" button.
Attach a zip file containing the diagnostic report to your bug report (it will be named something like previews-diagnostics-0123456789.zip).
Submitting your feedback
Before you submit to Feedback Assistant, please confirm the following information is included in your feedback:
For Swift Previews
Xcode, system, or simctl diagnose logs, with Swift Previews logging profile, gathered after reproducing the issue
timestamp identifying when the issue was reproduced
focused sample Xcode project that reproduces the issue (if applicable)
screenshots or videos of the error (optional)
For Xcode Previews
Xcode Previews diagnostics report with Swift Previews logging profile, gathered after reproducing the issue
timestamp identifying when the issue was reproduced
focused sample Xcode project that reproduces the issue (if applicable)
screenshots or videos of the error (optional)
Please include all requested information to prevent delays in my investigation.
After your submission to Feedback Assistant is complete, please respond to your original Forums post with the Feedback ID. Once received, I can begin my investigation and determine if this issue is caused by an error within your SwiftUI app, a configuration issue within your Xcode project, or an underlying issue in the operating system, SwiftUI, in Xcode Previews, or on-device previews.
Cheers,
Paris X Pinkney | WWDR | DTS Engineer
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Post
Replies
Boosts
Views
Activity
I've recently upgraded to Xcode 16 and noticed a change in how the Tab key functions during autocomplete.
(not-replied-but-closed post: https://discussions.apple.com/thread/255762888)
Previously, pressing Tab would extend the typed text up to the first point of choice.
For example, we have two classes: NSViewController and NSViewCoordinator
BEFORE, typing: "NSV" + Tab used to complete to NSViewCo
Now, in Xcode 16, pressing Tab selects the first suggestion by default, instead of completing up to the choice point.
That is very inconvenient because very often I want just see all possible cases with some prefix...without need of typing all prefix manually.
Seems there is no way to restore the previous behavior and that looks very very sad.
I have reverse engineered Xcode 16...and what I get?
They just install new CodeCompletion handler instead of old one without any chance to configure this behaviour by settings or UserDefaults =\
Hope this thread would raise votes and attract Xcode devs here
I'm missing something.
I have a project in Xcode 16.2. I have made two commits. I did not tag the commits. I need to compare what is in the first commit to the current state of a file. The instructions say that when comparing files there is a button at the bottom to select the commit to compare with, but I can't find that button. It looks like I can only compare the current state of the file with the last commit.
Trying to use SwiftUI Preview in Xcode 16.2 on complex project, I have no access to Developer Apple team, instead I am using manually installed provision profiles to test on iPhone.
So, SwiftUI Preview does not work with diagnostic error "Failure: Framework Agent preparation failed: Could not find a team ID"
Hello,
When trying to download the latest version of iOS simulator on xCode i get this error:
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
User Info: {
DVTErrorCreationDateKey = "2025-02-21 09:05:50 +0000";
}
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({
RequestedBuild = 22D8075;
})
Domain: DVTDownloadsUtilitiesErrorDomain
Code: -1
Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime)
Domain: com.apple.MobileAssetError.Download
Code: 49
User Info: {
checkConfiguration = 1;
}
System Information
macOS Version 15.0 (Build 24A335)
Xcode 16.2 (23507) (Build 16C5032a)
Timestamp: 2025-02-21T11:05:50+02:00
Hi,
I'm working in unity and I've implemented Firebase Phone Number Authentication in it. Everything works fine when I directly install build from xCode. App Attest screen shows up, user receives OTP on their phone and login works. But when I download the same build from TestFlight, it gets stuck after the user sends OTP request.
I've added Push Notifications and App Attest in capabilities. I've also additionally added Remote Notifications.
In device log I see an error about mobile provisioning file but I've added that to my account also. Is this expected behavior that phone number authentication does not work on TestFlight? If yes, how can I get this approved from apple since they need to test it before approving it.
Thanks!
Summary :
I tried everything from uninstalling completely XCODE to upgrading the macOS without any success.
Cleanup Xcode & Upgrade macOS to 15.3.1
This scripts were used to clean up the xcode and residual files. Also used CleanMyMac for the rest !
VERSION="" # "-16.2.0"
## Xcode Deep Clean
# 1. Delete Xcode Itself
sudo rm -rf /Applications/"Xcode${VERSION}".app
# 2. Remove Xcode Cache and Derived Data
sudo rm -rf ~/Library/Caches/com.apple.dt.Xcode
sudo rm -rf ~/Library/Developer/Xcode
sudo rm -rf ~/Library/Application\ Support/Xcode
sudo rm -rf ~/Library/Developer/CoreSimulator
sudo rm -rf ~/Library/Developer/Shared
# 3. Remove Command Line Tools (CLT)
sudo rm -rf /Library/Developer/CommandLineTools
# 4. Remove Xcode Preferences and Supporting Files
sudo rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
sudo rm -rf ~/Library/Logs/CoreSimulator
sudo rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState
# 5. Remove Simulator Data
sudo rm -rf ~/Library/Developer/CoreSimulator
# 6. Remove Swift & Code Completion Models
sudo rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode
sudo rm -rf ~/Library/Application\ Support/Xcode
Problem :
When i try to press the button "Get" from Xcode -> Settings -> Components i receive systematically these issues :
For Predictive Code Completion Model :
The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11b3c5a90).DownloadError error 2.)
Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11b3c5a90).DownloadError
Code: 2
User Info: {
DVTErrorCreationDateKey = "2025-02-20 2:36:06\U202fPM +0000";
}
--
There was an error transferring over the network.
Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11b3c5a90).DownloadError
Code: 2
--
System Information
macOS Version 15.3.1 (Build 24D70)
Xcode 16.2 (23507) (Build 16C5032a)
Timestamp: 2025-02-20T15:36:06+01:00
For Platform Support (ex. iOS 18.2 + iOS 18.3.1 Simulator)
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
User Info: {
DVTErrorCreationDateKey = "2025-02-20 2:24:03\U202fPM +0000";
}
--
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
--
Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({
RequestedBuild = 22D8075;
})
Domain: DVTDownloadsUtilitiesErrorDomain
Code: -1
--
Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime)
Domain: com.apple.MobileAssetError.Download
Code: 49
User Info: {
checkConfiguration = 1;
}
--
System Information
macOS Version 15.3.1 (Build 24D70)
Xcode 16.2 (23507) (Build 16C5032a)
Timestamp: 2025-02-20T15:24:03+01:00
More Details :
By the way im on a MacBook Pro with M1 Max 32GB and 1TB storage. I still have more than 100 GB of Storage. I also switched to RJ45 to be sure its not network issue !
Could not build inference plan - ANECF error: failed to load ANE model file:///System/Library/Frameworks/Vision.framework/Resources/saliency_attention_box_head_i4fgq3rswb_fp16.espresso.net Error=_ANEEspressoIRTranslator : error Espresso exception: "I/O error": Cannot open additional blob file (DESIGN)
In the test plan settings, it's possible to select an .xcappdata bundle for a set of tests:
I failed to find any documentation about it in the context of macOS apps testing. What I'm trying to achieve is having a sandboxed app container (/Users/{user}/Library/Containers/{bundle-id)/Data/) replaced before running a test suite.
Is it something possible to achieve using the latest Xcode? What should be the .xcappdata structure to make it work on macOS?
I can't add my iPhone to my Apple Developer team, even though my iPhone is properly connected to my Mac.
Hello,
I have tried to add Sign in with Apple to my application, and I get to the point where the app asks which AppleID to use and does succesfull facial recognition, but does not return failed or successful validation - the loading animation does not end and just keeps going.
I have tried to create the sertificates and provision profiles again. I have also set the entitlements file Apple access level to Default. I don't understand what is going wrong here. Can the certificates be in wrong place? Is something wrong with the code?
Hi all, reposting from here:
https://unix.stackexchange.com/questions/789849/xattr-c-not-removing-com-apple-finderinfo-attribute
I was trying to build my Xcode project, but ran into the error "resource fork, Finder information, or similar detritus not allowed." I was following the solutions from this stack exchange post, but xattr seems to not be working as expected.
Basically, running xattr -cr . on my project directory successfully removes all xattrs except for com.apple.FinderInfo, which persists on all .xcodeproj and .xcworkspace files. I've tried everything under the sun, from xattr -d to sudo to dot_clean to tar to rsync and nothing can remove it. Is this just some kind of immortal attribute? It's preventing me from building my project. I'm at a loss here, this is my senior thesis project.
Hi all, reposting this from here:
https://unix.stackexchange.com/questions/789849/xattr-c-not-removing-com-apple-finderinfo-attribute
I came to this problem because my Xcode project was failing to build due to the error "resource fork, Finder information, or similar detritus not allowed" (was trying the solutions on this post).
Basically, running xattr -cr . in the terminal on my project directory removes all extended attributes except com.apple.FinderInfo, which stays on all .xcodeproj and .xcworkspace files. I've tried everything under the sun, from sudo to xattr -d to dot_clean to tar to rsync and nothing works. Is this just an immortal attribute that can never be removed? I'm truly at a loss here, this is for my senior thesis project.
My swiftUI project has started to constantly display "Cannot find 'symbol' in scope" errors in code i haven't touched, and the project still compiles fine. Neither cleaning build folder or compiling fix the errors, but if I right click the symbol, select "jump to definition" it will find it without problem and then when I return to the original file the error will be cleared.
What can I do to stop these from happening?
When Xcode 16.2 connects iPad to real machine debugging using the view in the picture box, the mac will be stuck directly, the computer cursor will disappear, and the computer cannot do any operation
Since updating Xcode to 16.2 I get the following message when attempting to build the project.
SWIFT_VERSION '' is unsupported, supported versions are: 4.0, 4.2, 5.0, 6.0.
The issue I have is that the project is pure objective-c. There is zero Swift code in the project so am struggling to understand why this error is being generated. Welcome assistance.
Graeme
I am using Xcode 15.2. I am loading a URL in a WKWebView, but a hand cursor appears above the web view. Scrolling up and down does not work. I tried adjusting the scroll bounds and isUserInteractionEnabled, but the hand cursor is still visible. How can I fix this?
We’re developing an iPad application that visualizes 2D and 3D building floor plans, including a mesh network of nodes that control lighting and climate. The node count ranges from 1,000 to 15,000.
We’re using SceneKit to dynamically render the floor plan and node mesh on an iPad 10th generation running iPadOS 18.3. While the core visualization works, we are experiencing significant performance degradation as the node count increases.
Specifically:
At 750–1,000 nodes, UI responsiveness noticeably declines.
At 2,000 nodes, navigating the floor plan becomes nearly unusable.
We attempted to optimize performance with a Geometric Pool algorithm, but the impact was minimal. Strangely, the same iPad handles 30,000+ 3D objects effortlessly when using Unity or Unreal Engine, raising the question of whether SceneKit may not be optimized for this scale.
Our questions:
Is SceneKit suitable for visualizing such large node counts, or are we hitting an inherent limitation of the framework?
Are there best practices or optimization techniques for SceneKit that we might be missing?
Should we consider a hybrid approach or fully transition to a different 3D engine for this use case?
We’ve attached a code sample below demonstrating the issue. Any insights, suggestions, or experiences would be greatly appreciated!
ContentView.swift
I have a warning on my AR app Virtual Tags that since July does not show its camera information telling:
"ARCL.SceneLocationView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen."
I tried inserting the function, but documentation does not explain what it should return and how to generate it. Is someone able to help me?
Thanks,
Hi iOS peeps !
Was just wondering if anyone has had this issue before with String Catalogs. I have an iOS project where I am using String Catalogs for localisation ( the project is split up into multiple local swift packages with each project having its own Localizable.xcstrings ) and the app currently only supports en as the base and en-US for US localisation
During the build process however some of the swift packages only produce the en-US localisation and is missing the en default localisation in the binary. Having a look at the build log for some xcstringstool will only produce one set of Localizable.strings (en-US.lproj) instead of (en.lproj and en-US.proj)
I haven't been able to find much documentation from Apple on xcstringstool as well / not sure where to find more info about this