Build, test, and submit your app using Xcode, Apple's integrated development environment.

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
8.9k
May ’24
Assets duplicating on Xcode 26.1 Beta 3
I've recently installed 26.1 Beta 3 alongside stable 26.0.1 When building my app with 26.0.1 the final .ipa size is ~17mb, however after building my app with 26.1 Beta 3 the size has increased up to ~22mb The main difference is Assets.car blowing from 1.1mb to 5.6mb (or 8.6mb if I include all icons settings). Upon examining I've found new liquid glass .icon file duplicating itself multiple times as png variants (any, dark, tinted, etc). Is anyone else experiencing this issue?
2
0
117
4h
SwiftData error: NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
I am using SwiftData for my model. Until Xcode 15 beta 4 I did not have issues. Since beta 5 I am receiving the following red warning multiple times: 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release This seems to be a CoreData warning. However, I am not using CoreData directly. I have no way to change the config of CoreData as used by SwiftData. My model just uses UUID, Int, String, Double, some of them as optionals or Arrays. I only use one attribute (.unique).
8
3
3.3k
18h
Xcode 26 CompileMetalFile failed
"EnableLiveAssetServerV2-com.apple.MobileAsset.MetalToolchain" = on; ProductName: macOS ProductVersion: 26.0.1 BuildVersion: 25A362 The MetalToolchain is installed, however I keep getting error that MetalToolchain cannot be found by the Xcode "Command CompileMetalFile failed with a nonzero exit code" error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain ❯ xcodebuild -downloadComponent MetalToolchain 2025-10-31 11:18:29.004 xcodebuild[6605:45524] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.324.0.k9JmEp” couldn’t be opened because you don’t have permission to view it. Beginning asset download... 2025-10-31 11:18:29.212 xcodebuild[6605:45523] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.324.0.k9JmEp” couldn’t be opened because you don’t have permission to view it. Downloaded asset to: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/4ab058bc1c53034b8c0a9baca6fba2d2b78bb965.asset/AssetData/Restore/022-17211-415.dmg Done downloading: Metal Toolchain 17A324.
3
0
163
1d
Can an IP address manually be entered into Xcode to wirelessly connect to an iOS device?
I often use a Wi-Fi network where: Whatever mechanism Xcode uses to automatically discover a previously paired iOS device seems to be blocked (the Devices and Simulators window shows "Browsing on the local area network for [iPhone]" and never proceeds), but I can connect to the iOS device from my Mac if I know its IP address, such as by pinging it The same hardware/software configuration works with wireless Xcode connections on a different Wi-Fi network. Thus I'm wondering if there's any functionality that allows the IP address to be manually entered into Xcode to avoid needing to connect a cable from my Mac to my iPhone during development. Searching around seems to suggest this existed at some point in the past but I can no longer find this in a current version of Xcode. Or if there are any other workarounds, although I can't modify the network itself as it's not my network.
0
0
132
1d
Apple Watch can't always reconnect
Using Xcode to build and deploy the app to my watch, this is what I get: “Waiting to reconnect to Apple Watch. Previous preparation error: Transport error." And then “Connecting to Apple Watch. Xcode will continue when the operation completes.” And these messages continue to switch between each other. Sometimes the watch to connect and the application starts, but more often a scenario occurs with endless reconnection. I'm using: MacOS 14.4.1 (MacBook Pro 2019; 1.4 GHz Quad-Core Intel Core i5), Xcode 15.3, Watch OS 10.2 (Apple Watch SE 1), iOS 17.1.1 (iPhone 15 Pro). Methods I tried: Connecting Macbook, iPhone and Watch to the same WIfi network; Disabling Watch (and IPhone) from the "Devices and Simulators" menu and setting up Watch (and IPhone) from the beginning. Any help?
30
6
4.5k
1d
Xcode 26.1 RC ( RC1 ?) Apple Intelligence using GPT (with account or without) or Sonnet (via OpenRouter) much slower
I didn't run benchmarks before update, but it seems at least 5x slower. Of course all the LLM work is on remote servers, so is non-intuitive to me this should be happening. Had updated MacOS and Xcode to 26.1RC at the same time, so can't even say I think it is MacOS or I think it is Xcode. Before the update the progress indicator for each piece of code might seem to get stuck at the very end (and toggling between Navigators and Coding Assistant) in Xcode UI seemed to refresh the UI and confirm coding complete... but now it seems progress races to 50%, then often is stuck at 75%... well earlier than used to get stuck. And it like something is legitimately processing not just a UI glitch. I'm wondering if this is somehow tied to visual rendering of the code in the little white window? CMD-TAB into Xcode seems laggy. Xcode is pinning a CPU. Why, this is all remote LLM work? MacBook Pro 2021 M1 64GB RAM. Went from 26.01 to 26.1RC. Didn't touch any of the betas until RC1.
1
0
144
2d
Xcode 26 crash upon dealloc of `WKNavigationResponse` on Main Thread
Since Xcode 26 our tests are crashing due to the Main Thread not being able to deallocate WKNavigationResponse. Following an example: import Foundation import WebKit final class WKNavigationResponeMock: WKNavigationResponse { private let urlResponse: URLResponse override var response: URLResponse { urlResponse } init(urlResponse: URLResponse) { self.urlResponse = urlResponse super.init() } convenience init(httpUrlResponse: HTTPURLResponse) { self.init(urlResponse: httpUrlResponse) } convenience init?(url: URL, statusCode: Int) { guard let httpURLResponse = HTTPURLResponse(url: url, statusCode: statusCode, httpVersion: nil, headerFields: nil) else { return nil } self.init(httpUrlResponse: httpURLResponse) } } import WebKit import XCTest final class ExampleTests: XCTestCase { @MainActor func testAllocAndDeallocWKNavigationResponse() { let expectedURL = URL(string: "https://galaxus.ch/")! let expectedStatusCode = 404 let instance = WKNavigationResponeMock() // here it should dealloc/deinit `instance` automatically } Here the call stack: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 CoreFoundation 0x101f3dd54 CFRetain.cold.1 + 16 1 CoreFoundation 0x101e14860 CFRetain + 104 2 WebKit 0x10864dd24 -[WKNavigationResponse dealloc] + 52
7
0
918
2d
Xcode SPM (Swift Package Manager) Error
Xcode SPM (Swift Package Manager) Error I added the "Apple App Store Server Swift Library" library to Xcode using Swift Package Manager. Both the project and target are set to iOS 14 or higher. However, when I build after adding the library, an error occurs with the library. A message appears stating that the target is set to iOS 12. I'm using Xcode 26.0.1. Even after adding it to all my projects, the build continues with the same error. I've tried building the library from version 1.0.0 to the latest version, but the same error persists. Even after completely cleaning the project and running it, the same error persists. Does anyone know how to fix this?
0
0
27
2d
Is it possible to view Xcode output from a scheme's archive post actions's script
In Xcode I've: select Product / Scheme / Edit scheme tap on Archive on the left hand side of the select post actions and + to add a new script Then in there I have added a script I want to run on the archive after its created. I'd like to be able to see the output the script churns out as it goes along but doesn't seem possible? If I just add something like echo "hello" to the start of the script then I don't see "hello" visible anywhere when I build an archive (via Product/Archive). I'm looking in the build navigator. Is there somewhere else to look or is it possible to get the logging into the navigator?
1
1
91
2d
Xcode_26 not compiling Metal project
Hello Xcode 26.0.1 (17A400) Missing some Metal components When building a program using Metal, it induces an unexpected error : “error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain Command CompileMetalFile failed with a nonzero exit code” Which terminates the build The fix given “xcodebuild -downloadComponent MetalToolchain” using sudo does not work Did someone find a work around or could resolve the issue? Many thanks Jean MacBook Air M4; macOS 26.0.1; Xcode 26.0.1
3
2
215
3d
Regarding the Deployment Targets setting for Xcode 26
Our project plans to upgrade Xcode from 16.2 to Xcode 26. We’ve noticed that the information on https://developer.apple.com/support/xcode/ states that the Deployment Targets for Xcode 26 supports iOS 15–26.1. However, the Deployment Targets for our current project is set to iOS 13. Does this mean that we must set the project’s Deployment Targets to iOS 15 or higher if we want to upgrade to Xcode 26? Can we still set the Deployment Targets to iOS 13? If we upgrade to Xcode 26 and set the Deployment Targets to iOS 13, will there be any problems?
2
0
101
4d
Xcode 26 / iOS 26 - XIB incorrectly references "HiraginoKakuGothic.ttc" causing build warnings
Hello, I'm encountering a persistent issue when building my project with Xcode 26 and iOS 26. The console shows errors related to font file references that don't actually exist in my project. After investigation, I found that the issue originates from XIB files incorrectly referencing HiraginoKakuGothic.ttc: <customFonts key="customFonts"> <array key="HiraginoKakuGothic.ttc"> <string>HiraginoSans-W3</string> </array> </customFonts> The problem appears to be triggered when setting UILabel fonts to "ヒラギノ角ゴシック W3 16.0" in Interface Builder, which causes the XIB to reference HiraginoKakuGothic.ttc. Interestingly, when I create a new project and use the same fonts ("ヒラギノ角ゴシック W3 16.0"), it does NOT automatically reference HiraginoKakuGothic.ttc. Here's what I've tried: ①Changed both UILabels' fonts to system font ②Verified in XIB Source Code that the .ttc references were gone ③Cleaned Build Folder ④Cleared DerivedData ⑤Restarted Xcode ⑥Set the labels back to "ヒラギノ角ゴシック W3 16.0" ⑦Checked XIB Source Code again - the non-existent .ttc references reappeared Even if I manually remove the customFonts references from the source code, they get regenerated as soon as I make any font changes in Interface Builder. I've also noticed that Xcode 16.1 has the same underlying issue, though it doesn't produce the console errors that Xcode 26 does. This seems to be a long-standing XIB issue, possibly related to reference caching. While new projects aren't affected, existing projects continue to maintain these incorrect references. My questions: How can I permanently resolve this issue in my existing project? What's the potential impact of these incorrect font references? Is there a way to clean up these cached references without affecting the rest of the project? Any insights or workarounds would be greatly appreciated. Thank you.
0
0
14
4d
XCPreviewAgent crashes with KERN_PROTECTION_FAILURE on macOS 26.0.1 Tahoe
Hello, I'm experiencing consistent crashes of XCPreviewAgent when using Xcode Previews on macOS 26.0.1 Tahoe (25A362). Configuration: macOS: 26.0.1 (25A362) - stable release Xcode: 16.0 (23.0.54) - stable release Hardware: MacBook Pro M4 Project: SwiftUI iOS app Issue: Every time I try to use Xcode Previews, XCPreviewAgent crashes with: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Subtype: KERN_PROTECTION_FAILURE at 0x0000000340e54000 Termination Reason: Namespace SIGNAL, Code 10, Bus error: 10 The crash occurs in shared memory region during dynamic library loading. What I've tried: Cleared all caches: rm -rf ~/Library/Developer/Xcode/DerivedData Deleted Preview data: rm -rf ~/Library/Developer/Xcode/UserData/Previews Reset simulators: xcrun simctl --set previews delete all Switched xcode-select to /Applications/Xcode.app/Contents/Developer Tried both Xcode stable and Xcode beta Created fresh simulators Clean build (Cmd+Shift+K) Rebooted Mac multiple times The app runs fine on simulator (Cmd+R), but Previews consistently crash.
1
0
56
4d
Avoid IPv6 communication when debugging with real device
We are experiencing troubles in our organization when we want to debug iOS applications on physical iPhones and iPads. Our iPhones (iPhone 16e, iOS 18.5) are not recognized by Xcode 16.4, but in the Finder they show up fine using the USB cable. We are aware, that the communication is different and there is an ad-hoc network that gets created to exchange the device profile. Together with our IT department responsible for our security infrastructure we narrowed it down to the following reason: As we are blocking all IPv6 traffic for local networking, the iPhone cannot communicate with Xcode to make the first connection and load the device profile. As they are not planning on changing this behavior, I am reaching out to you, if there is a way to force this first handshake between Xcode and iOS device to use IPv4? Or is there any other way to enable debugging for these devices? Any ideas would be very helpful.
3
0
226
5d
AppleWatchのデベロッパモードをONにする方法
開発アプリで通知確認を行うため、UDIDをプロビジョニングプロファイルに追加する必要があります。 iPhoneのUDIDは取得することができたのですが、AppleWatchのUDIDを取得する方法が分かりません。 Xcodeと接続してUDIDを取得しようとしましたが、iPhoneのみ認識がされAppleWatchが認識されていません。 AppleWatchもデベロッパモードをONしなければならないとAppleから返答をもらったが、その方法がわからないのでどなたかご教授お願い致します。
0
0
85
5d
Building macOS apps with Xcode 26 on macOS 26 VM
I'm trying to setup a macOS 26 build environment in a VM (using UTM and the virtualization framework Apple provides). I have Xcode 26 installed and have logged into my Apple ID and verified that the team and other configuration looks fine in Xcode settings. When trying to build the macOS app, I see errors saying the VM's device ID has not been registered. I have confirmed that the device ID is registered both in the Provisioning portal AND the downloaded .provisionprofiles (in Library > Developer > Xcode > UserData). This problem appears on multiple targets (e.g. the main app and extensions). If I try to manually provision the app, using the Provisioning portal, I can build the product, but it will not launch because of Gatekeeper issues. Finally, signing to run locally doesn't work either. As the app launches, frameworks refuse to load because Team IDs don't match. With ad hoc provisioning, there are no Team IDs. I've come to the conclusion that this just isn't possible. Which is a shame because I need to support products with a build environment on macOS 15 and cannot move over to macOS 26 yet. I suspect many developers outside of Apple are in a similar position.
45
11
7.0k
5d
90714: Invalid binary. The app contains one or more corrupted binaries. Please rebuild the app and resubmit.
I'm getting this error from inside the TestFlight tab in Appstore Connect. For a MacCatalyst app. This has worked for amost 4 years now I'm getting this error. I did update my version of Xcode to 26.0.1. And I migrated all the project settings it asked me to migrate. I ran the Validation in the Archive window of Xcode. No issues found there.
5
0
95
6d