Since upgrading to Xcode 16, I've noticed that when I add new files to my local Swift packages, the "Update Package" option is no longer available when I right-click on my local package.
In previous versions of Xcode, I used this feature to make Xcode recognize newly added files without any issues.
Now, with Xcode 16, the only way I've found to get Xcode to recognize new files is to remove and re-add the entire package, which is obviously not ideal.
I've tried cleaning the build folder and rebuilding the project, but it doesn't seem to help.
Is there a new workflow or method in Xcode 16 to refresh or update local Swift packages without needing to remove and re-add them every time?
Any suggestions or workarounds would be greatly appreciated!
What I’ve tried so far:
Cleaning and rebuilding the project
Looking for any options under "File > Packages" menu
Environment:
Xcode 16
Local Swift Package
Thanks in advance!
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
So I have a MacOS application that was working just fine before Xcode 16. The Widgets are not working anymore.
The main application and the widgets share a file in a common App Group.
The widget app now get a permission error when accessing the file.
Also, the Widget Kit simulator keeps crashing.
I also try to start a new project in Xcode, add a target with a Widget extension with an App Intent and run it, and it also crashes.
Sometimes, it doesn't crash but just display the error: "Failed to load widget. The operation couldn't be completed. (WidgetKit_Simulator.WidgetDocument.Error error 2.).
Edited to attach WidgetKit error log
widgetKitError.txt
Hi,
I've been running Xcode 26 beta ever since Beta 1 and haven't had rebooting problems. Now with Xcode beta (Version 26.0 beta 4 (17A5285i)) I'll be working on a project when the system (Mac mini 2025) suddenly reboots itself. This has been going on since beta 3. I am also running MacOS 26.0 Beta (25A5316i). I have filed a bug report.
Is anyone else having this problem?
Thanks,
Dan Uff
I am editing my iOS project in Xcode 16 and want to use the "Swift Compiler - Upcoming Features" section of the build settings to selectively enable the new Swift 6 language features.
I have read the instructions for doing this and have dowloaded an Apple sample project and can see that section under the project and target-level Build Settings in the sample project
However, when I open my Xcode project in XCode 16 that section does not appear.
Is there any way for me to influence how Xcode 16 displays the build settings?
In fact, no "Swift Compiler" sections appear at all under my project Build Settings (All | Combined). There is a "User-Defined" section that has the Swift Version, Compilation Mode and Optimization level.
The project itself is several years old and was on a very old project version. I have upgraded my project document format to "Xcode 16" but it made no difference.
I have compared my project and the sample project in a text editor and both seem to have similar structure. I tried removing unused and outdated settings from my project but that also had no effect.
Is there an alternative to deleting my project file and adding the source files to it? I have a large project with multiple targets so that would be something I'd rather not do.
I'm unable to reset simulators using the menu or the xcrun simctl tool:
<output of xcrun simctl list>
== Devices ==
-- iOS 17.5 --
iPhone SE (3rd generation) (5A06623A-173D-4C96-8DD3-3E9FE39A06F1) (Shutdown)
iPhone 15 (iOS 17.5) (F4329E8D-29BB-4EA7-8465-C11A98D04ED7) (Shutdown)
-- iOS 18.0 --
iPhone SE (3rd generation) (2DDE8F03-F8E1-4C1B-8E28-CD9B208F3FFA) (Shutdown)
iPhone 16 Pro (DE788688-8AC6-40A0-B25C-A56AA423798E) (Shutdown)
iPhone 16 Pro Max (1405184C-36A9-40F3-B0D0-4EEB88452883) (Shutdown)
iPhone 16 (0CBBA7DB-B20E-4F17-BBC5-910F1F6E1A0A) (Shutdown)
iPhone 16 Plus (95421C27-11A0-4FCF-A889-DAAE8557B271) (Shutdown)
== Device Pairs ==
~/Library``
❯ xcrun simctl erase 0CBBA7DB-B20E-4F17-BBC5-910F1F6E1A0A
An error was encountered processing the command (domain=NSCocoaErrorDomain, code=513):
“data” couldn’t be moved because you don’t have permission to access “Deleting-8FEDFF47-5B2F-4534-BCA2-036BBE68CE37”.
You don’t have permission.
To view or change permissions, select the item in the Finder and choose File > Get Info.
Underlying error (domain=NSPOSIXErrorDomain, code=1):
The operation couldn’t be completed. Operation not permitted
Operation not permitted
Xcode Version 16.0 (16A242d)
MacOS 15.0.1 (24A348)
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
After updating from Xcode 16 to the new Xcode 26 beta 3, running my iOS app becomes slow to the point of unusable. It builds and installs fine, but when running with the console, it lags about 20-50x compared to building and running with Xcode 16. I wanted to try our Xcode 26 to preview my new app icon made in icon composer but now I don't think it's worth the hassle.
When running via simulator, the same performance issues. Anybody also struggling with slow on-device testing speed? I am on Sequoia 15.5.
I know there are several existing threads on this topic but things keep changing.
The release notes for Xcode 26 beta 3 have the following statements for a couple of resolved issues:
Asset Catalog
Fixed: Unable to set Icon Composer icon as alternate iOS icon (153305178) (FB18025356)
Icon Composer
Fixed: Icon Composer icons back deploy to older versions of iOS, macOS, and watchOS with inconsistent rendering. (152258860)
I had a working solution under beta 1 and beta 2 for both of these. But under beta 3, I am now seeing the new glass icons for my app when running on a simulated iOS 18 device. This is happening for both the main app icon and any alternates. This contradicts the statement that beta 3 fixes this issue.
There is no documentation (that I can find) describing how you are supposed to support old icons for iOS 18 and new glass icons for iOS 26. There is no documentation for how to support alternate glass icons for iOS 26.
What I'm doing at the moment (that worked before beta 3) was to have the normal iOS 18 app icons in the Asset catalog and to have the new glass icons added to the project. The filenames for the glass .icon files have the same name as the app icons in the Assets catalog. This worked under beta 1 and beta 2. And despite the Xcode 26 beta 3 release notes stating that Icon Composer icons no longer back deploy to iOS 18, I'm seeing the opposite. Beta 3 now does the opposite of that statement.
Does anyone have a working solution that supports old iOS 18 app icons and new iOS 26 glass icons using Xcode 26 beta 3?
Note, all of my testing is with simulated iOS devices and I'm running Xcode 26 beta 3 under macOS 15.5. Maybe that's an issue?
Hi,
in our Xcode project we have a Tooling package, which defines build tool plugins for generating compile time safe constants for our localization strings as well as assets using swiftgen.
This is working very well in Xcode 16, but fails in Xcode 26 beta 1 and beta 2 as well.
The failure is specifically:
unsupported configuration: the aggregate target 'Localization' has package dependencies, but targets that build for different platforms depend on it.
I've reduced this to a minimal sample project, which you can find here.. To reproduce: Open the Repro workspace, that is attached in Xcode. Try to build TestyPackage. You'll see the error.
I've filed this bug during WWDC week, but no feedback yet and no solution in Xcode 26 beta 2. Here's the feedback number, in case you have this too and want to file a duplicate: FB17934050.
Does anyone else have this issue and perhaps a solution?
I implemented AppTrackingTransparency framework but Apple is rejecting the review because it seems the request is failing on iPadOS 18.3.1. which seems rare since it is working on all other devices. Has anyone faced the same issue?
I have tested this in a physical iPhone with IOS 18.3.1 and in several devices using Xcode runtime simulator including iPad and iPhone in different IOS versions up to 18.2 (which I understand is the latest available in Xcode).
The problem is that 18.3.1 runtime simulator is not available yet. Does anyone have more information when it will be available or what to do in these cases?
Can we use Icon Composer to drive an app icon for iOS 26 apps today? I get errors uploading a build to TestFlight internal testing about missing App icon dimensions for an iOS 26 app.
We are getting following error in xcode cloud
"The step invocation hit a user timeout. The xcodebuild archive invocation timed out. No activity has been detected on stdout, stderr or the result bundle in 30 minutes"
We are using following env to create a build.
Xcode: 14.2
Macos: Ventura 13.2.1
We didn't face any issue in Ventura 13.2.0 and we are seeing this issue in our first build using ventura 13.2.1.
The difference I see between successful and failure build, I don't see
"Discovering Swift tasks after 'Compiling { list of swift file " in a failed build. I see compiling { list of swift file } and end of the compilation, the build is failing.
Any idea what this message means? I assume it's coming from CloudKit, but the application seems to store and retrieve data properly.
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?
I just want to rant why is Xcode such a bad ide and I wish Apple can do a better job on Xcode. Here's why:
The preview is so slow. Most of the times it's just faster for me to test on a real device.
It is so slow, and many times I need to force quite after it's being unresponsive for sometimes. When I'm working on larger projects, the loading time becomes extremely slow especially when there's other clients that might be reading the same files like a Git client or simply iCloud.
The breakpoint is so slow. I don't know why, is it an iOS thing? But when I'm on ASP.Net the breakpoints are super fast. For Xcode it takes a long time to pause and show data.
It's so big
I don't know why it is so hard for Apple to make their ide better. The community has been unsatisfied with Xcode for a long time. There's many tricks on the internet that you can find to help you resolve some issues with your project that's actually related to Xcode. Instead of using these tricks, Apple should just fix these issues. Learn from Intellij!
Swift assist has been announced by apple this year.
I have waited Xcode 16.2 release before posting this because I was still hopping for swift assist this year but apple DIDN'T release swift assist and they haven't post anything about swift assist reported or something...
What's going to happen with swift assist? Coming next year?
I have been using Xcode Version 26.1.1 on macOS Tahoe Version 26.1. In VIM mode, whenever I quickly tap d twice, to delete the complete line, most of the time Xcode crashes. Is anyone else facing this issue? Should I move to any older version of Xcode or any other solve for this?
Hi,
I’m seeing an unexpected change in how XCTFail behaves in UI tests after updating Xcode.
I use the following helper method:
`func waitForExistance(file: StaticString, line: UInt) -> Self {
if !(element.exists || element.waitForExistence(timeout: Configuration.current.predicateTimeout)) {
XCTFail("couldn't find element: \(element) after \(Configuration.current.predicateTimeout) seconds",
file: file,
line: line)
return self
} else {
return self
}
}`
In Xcode 16.4, this worked as expected:
– when an element wasn’t found, XCTFail was triggered, but the test continued running, allowing my retry logic to execute.
After updating to Xcode 26.1 / 26.2 - the test now immediately aborts after XCTFail, without executing the next retry.
The logs show:
`t = 113.22s Tear Down
t = 113.22s Terminate com.viessmann.care:81789
*** Assertion failure in -[UITests.Tests _caughtUnhandledDeveloperExceptionPermittingControlFlowInterruptions:caughtInterruptionException:whileExecutingBlock:], XCTestCase+IssueHandling.m:273
Test Case '-[UITests.Tests test_case]' failed (114.323 seconds).
Flushing outgoing messages to the IDE with timeout 600.00s
Received confirmation that IDE processed remaining outgoing messages`
It looks like XCTFail in Xcode 26 is now treated as an unhandled developer exception, which stops the test execution immediately, even when it’s called inside a helper method. This was not the case in earlier versions.
My questions:
Is this a regression in XCTest?
Or an intentional change in how XCTFail behaves in newer Xcode versions?
Should failures now be reported differently (e.g., using record(.init(type: .assertionFailure, …))) if I want to continue the test instead of aborting it?
I would like to restore the previous behavior where the failure is logged without terminating the entire test, so my retry mechanism can still run.
Has anyone else run into this after upgrading?
Thanks in advance!
If you’d like, I can also add recommended workarounds that actually work with Xcode 16.4 (e.g., replacing XCTFail with a non-terminating issue record).
It has been two years since I wrote my a SwiftUI app, and I wanted to start again in Xcode 26. I can no longer see the attributes inspector when I select an element in the canvas. This was an Xcode feature that was very helpful as I am still a novice. Has this feature been deprecated in Xcode 26? And if not, please help explain how I can find and use it.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Developer Tools
Interface Builder
Xcode
SwiftUI
Description:
I’m noticing that the code coverage metrics in Xcode 26 are not accurate compared to earlier versions.
In Xcode 15, the same set of unit tests shows around 38% coverage, but in Xcode 26, even though all the tests are running successfully (for example, the SegmentedUI test cases), the code coverage is displayed as 0%.
Has anyone else observed this behavior in Xcode 26?
Is there any known issue, workaround, or configuration change required to get the correct coverage report?
Environment:
Xcode 26
iOS 18 SDK
Unit tests running under XCTest
Any insights or suggestions would be appreciated.