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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Impossible to connect iPhone 7 (iOS 15.8) with xCode 26
I have spent nearly an hour trying to get my iPhone 7 with iOS 15.8 to be recognized within xCode 26. I did not have this issue with the previous version of xCode. I have tried rebooting my Mac, rebooting my iPhone 7, removing the iPhone 7 from the list of devices that belong to my account, verified that I have support files for iOS 15.8 installed, signing out of my Apple account and signing back in....nothing works. Every time I go to "Windows > Devices" I see the iPhone 7, but I get a never-ending spinning circle next to the iPhone 7 (which is shown as connected) along with a banner that says "xCode will continue when Joe's iPhone 7 is finished." I can leave the phone connected to my Mac for an hour, and this message and the spinning circle next to the iPhone 7 never changes.
5
0
240
1w
Unable to launch tests in Xcode 26
I am trying to upgrade my app to use Xcode 26 and I cannot get my tests to launch. I am trying to launch tests to the simulator, and I always get this error after 300 second timeout: "encountered an error (The test runner hung before establishing connection.)" There are no other errors getting logged. I can run to the same simulator just fine, and in Xcode 16 the tests launch with no issues. The tests also run fine on an actual iPhone. Thanks in advance.
6
0
197
1w
Xcode 26.0.1 launch fails with error "Loading a Plugin Failed."
Hi All, I have recently upgraded my Silicon Mac Laptop from MacOS 15.3 (Sequoia) to MacOS 26 (Tahoe). Since existing Xcode 16.2 is not compatible with MacOS 26, i installed Xcode 26.0.1 but after the successful installaton the application is not working and quits after the erorr dialog "Loading a Plugin Failed." (Screenshot attached). I tried resatring/reinstalling the Xcode 26.0.1 but no luck. To narrow down the issue i installed the same Xcode 26.0.1 in another Silicon Mac laptop with MacOS 26(Tahoe) where no previous Xcode was installed and it went well and working as expected. With my assumption Xcode 26.0.1 breaks when the device is upgraded from sequoia to Tahoe due to some conflicting old Xcode settings/files which may not be compatible with Xcode 26 or Tahoe but i am not sure. I followed some old articles as below from the forum and nothing worked for me so far. https://developer.apple.com/forums/thread/660860 https://developer.apple.com/forums/thread/719810 https://developer.apple.com/forums/thread/759396 Can some one shed a light on this to resolve this issue? Thanks.
0
0
53
1w
Compile Failure on NSXPCInterface Initializer
I have a project that leverages XPC and has interoperability between Swift and Objective-C++. I am presently getting a compile-time error in one of our unit test targets, of "Argument passed to call that takes no arguments" on the following code: let interface = NSXPCInterface(with: XPCServiceDelegate.self) My XPCServiceDelegate protocol is defined as: @objc(XPCServiceDelegate) public protocol XPCServiceDelegate { //... } For the longest time, this code has compiled successfully, and it has not recently changed. There are two confusing things about this error. The first is that I have a different build scheme that will compile correctly other code with the same structure. The other is that I have team members that are able to compile my failing scheme successfully on the same XCode version, OSVersion, and branch of our repository. I've attempted numerous things to try to get this code to compile, but I've run out of ideas. Here's what I've tried: Clean build both on XCode 16.4 and XCode 26 Beta Delete DerivedData and rebuild on XCode 16.4 and XCode 26 Beta Delete and re-clone our git repository Uninstall and reinstall XCode Attempt to locate cached data for XCode and clear it out. (I'm not sure if I got everything that exists on the system for this.) Ensure all OS and XCode updates have been applied. The interface specification for NSXPCInterface clearly has an initializer with one arguement for the delegate protocol, so I don't know why the compiler would fail for this. Is there some kind of forward declaration or shadowing of NSXPCInterface? Do you have any ideas on what I could try next?
12
0
181
1w
iOS Enterprise App Build Showing “Requires iOS 26.0” Even Though Deployment Target Set to iOS 18.0
We’re facing an issue when trying to install an enterprise-distributed iOS app on devices running iOS 18.5. During installation, we receive this error message: “This iOS app requires a newer version of iOS. You need to update this iPhone to iOS 26.0 to install this app.” However, in Xcode 26.0.1, our app’s minimum deployment target is explicitly set to iOS 17.6. After adding this step and the app result is unable to install the app on ios 18.5 and message getting as per the above quotes. Kindly help me out this issues.
0
0
56
1w
How can I remove a localization from a String Catalog in a Swift Package?
Hello, I'm trying to remove a localization from a String Catalog in a Swift Package. How can I do that? I tried to remove the file and create a new one, but all the languages are back. The only place where I've found a reference to the languages is in Package/.swiftpm/xcode/package.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate But I don't know how to edit this file to remove a language. Thank you, Axel
2
0
91
1w
Xcode downloads window won't go away
Every time I launch Xcode 26.0 (17A324), I see this window: Consequently, each time I launch Xcode, I must manually close the Downloads window, and it will always reappear the next time I launch Xcode. My question: How can I make the Downloads window with this message go away permanently, so I don't have to manually dismiss it? I tried deleting Device Support for Vision Pro (M5) and iPad Pro (M5) from Settings > Components, but unfortunately this is what I see: Thank you for any guidance you can provide.
3
1
109
1w
Error in gathering code coverage in Xcode16
Fails to gather code coverage and throws this error Showing All Messages Failed to merge raw profiles in directory /Users//Library/Developer/Xcode/DerivedData/Receiver-ekqrbpsaciuxmlfslviajhoecyat/Build/ProfileData/0B0C6B69-FD46-4801-B106-56B7FCD44370 to destination /Users//Library/Developer/Xcode/DerivedData/Receiver-ekqrbpsaciuxmlfslviajhoecyat/Build/ProfileData/0B0C6B69-FD46-4801-B106-56B7FCD44370/Coverage.profdata: Aggregation tool '/Users/shwethamugeraya/Downloads/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata' failed with exit code 1: warning: /Users/shwethamugeraya/Library/Developer/Xcode/DerivedData/Receiver-ekqrbpsaciuxmlfslviajhoecyat/Build/ProfileData/0B0C6B69-FD46-4801-B106-56B7FCD44370/2F4EFBF7-1CCF-4E9E-8FD6-482EEDB98B6C-34646.profraw: raw profile version mismatch: Profile uses raw profile format version = 4; expected version = 8 PLEASE update this tool to version in the raw profile, or regenerate raw profile with expected version. error: no profile can be merged
7
9
1.1k
1w
I can't run or create a simulator that isn't iOS26 after downloading the Xcode Beta 3
I downloaded the Xcode Beta 3 on my MacBook Pro M4 Base today and tested out some iOS26 mechanics of my app. And when I came back to my main Xcode to continue developing in iOS18, I couldn't build my app. I went to Product > Destination > Manage run destinations and then tried to create a simulator with iOS18 but it didn't show up, only choice that's showing up was iOS26. I tried deleting iOS18 platform and downloading it again but it didn't solve, I tried deleting Xcode Beta but it didn't solve the problem either. I deleted Runtimes folder, it didn't solve too. I can not create a simulator of iOS18 or below too, the error says "The iOS 18.5 simulator runtime is not available. Try reinstalling Xcode or the simulator runtime." How can I fix this problem?
5
1
399
1w
ChatGPT in Xcode 26 not recognizing Plus subscription
Hi all, Has anyone else run into this issue in Xcode 26? I’m logged into my paid ChatGPT Plus account, but the Xcode integration doesn’t seem to recognize the subscription. After a short period of use, I get the following error: “Over daily limit. ChatGPT in Xcode will be unavailable for up to 24 hours. For higher limits, sign in with a paid ChatGPT account.” Since I’m already signed in with a paid account, this looks like either a bug or a limitation specific to Xcode. Is this expected behavior, or has anyone found a workaround to make Xcode properly recognize Plus accounts? Thanks in advance for any guidance.
32
20
1.8k
1w
Xcode 26 doesn’t recognize ChatGPT Plus subscription and triggers free daily limit
Hi everyone, Since updating to Xcode 26, I’ve been running into an issue with the new ChatGPT integration inside Xcode. Even though I have an active ChatGPT Plus subscription (GPT-4 or GPT-5) and I’m signed in to my OpenAI account, Xcode doesn’t seem to recognize my paid plan. After reaching the free usage limit, I get the following message: “Over daily limit. ChatGPT in Xcode will be unavailable for up to 24 hours. For higher limits, sign in with a paid ChatGPT account or upgrade to ChatGPT Plus.” The issue is that I am already logged in with my ChatGPT Plus account, and everything works fine on the ChatGPT web app — but inside Xcode, it keeps treating me as a free user. Here’s what I’ve tried so far: • Signing out and back into ChatGPT from within Xcode • Restarting Xcode and macOS • Verifying that I’m logged in to ChatGPT in Safari • Updating both macOS and Xcode to the latest versions None of these steps have resolved the issue. It seems like Xcode isn’t syncing properly with OpenAI authentication, and therefore it applies the free-tier limits even for paid accounts. Has anyone else encountered this problem? Is there any way to force Xcode to reauthenticate with OpenAI or link it properly to a ChatGPT Plus account? System setup: • Mac mini (Apple M2, 16 GB RAM) • macOS Tahoe 26.0.1 • Xcode Version 26.0.1 (17A400) Here’s the error message I’m seeing:
2
3
185
2w
Persistent MTLCommandQueue.h Corruption (dispatchType missing) Despite macOS Erase & Reinstall (Xcode 26.0.1 / macOS 26.0.1)
Hello Developers and Apple Engineers, I am encountering a persistent and highly unusual Xcode build failure when trying to use Metal APIs, specifically related to MTLCommandQueueDescriptor. I have exhausted all standard troubleshooting steps, including a complete erase and reinstall of macOS, yet the issue remains. Hardware diagnostics have passed. I am seeking insights or potential solutions. The Problem: When compiling any project (including brand new, empty macOS App projects) that attempts to set the dispatchType property on an MTLCommandQueueDescriptor instance, the build fails with the following errors: Swift // Code causing the error: let queueDescriptor = MTLCommandQueueDescriptor() queueDescriptor.dispatchType = .userInteractive // <-- Error occurs here // Compiler Errors: Value of type 'MTLCommandQueueDescriptor' has no member 'dispatchType' Cannot infer contextual base in reference to member 'userInteractive' Key Evidence - Physical Header File Corruption: The root cause appears to be a physically corrupted/incomplete SDK header file. Using the cat command in Terminal to inspect the contents of the relevant Metal header file confirms that the definition for MTLCommandQueueDescriptor is missing the dispatchType property: Bash cat /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Versions/A/Headers/MTLCommandQueue.h The output consistently shows MTLCommandQueueDescriptor only having maxCommandBufferCount and logState properties, even after a fresh OS and Xcode installation. Environment: macOS: Version 26.0.1 (Build 25A362) - Clean install via Erase and Reinstall from Recovery. Xcode: Version 26.0.1 (Build 17A400) - Installed fresh from Mac App Store after OS reinstall. Mac Hardware: MacBook Pro (14-inch, M3) - (Please confirm this model info is accurate) Hardware Diagnostics: Passed (Tested at an official Apple Store). Exhaustive Troubleshooting Steps Performed (Issue Persists After All): Standard Xcode Cleaning: Clean Build Folder (Shift+Cmd+K). Manually deleted DerivedData folder (~/Library/Developer/Xcode/DerivedData). Deleted Xcode Caches (~/Library/Caches/com.apple.dt.Xcode, com.apple.dt.xcodebuild). Command Line Tools Path: Correctly set using sudo xcode-select -s /Applications/Xcode.app/Contents/Developer. Verified path using xcode-select -p. Verified version using xcodebuild -version. Multiple Xcode Versions & Install Methods Attempted (Before OS Reinstall): Xcode 26.0.1 (App Store). Xcode 26.0.1 (.xip package from Developer Portal). Xcode 26.1 Beta 3 (.xip package from Developer Portal). Performed thorough cleaning (deleted ~/Library/Developer, /Library/Developer, caches, rebooted) before each .xip installation attempt. In all cases, cat command confirmed the header file remained corrupted on disk after installation. Hardware Check: Took the Mac to an official Apple Store. Hardware diagnostics passed without any issues reported. Complete OS Reinstallation: Booted into Recovery Mode. Used Disk Utility to completely erase the internal SSD (APFS, GUID Partition Map). Reinstalled macOS 26.0.1 from Recovery. Set up the Mac as a new device (did not restore from backup). Post-OS Reinstall: Installed Xcode 26.0.1 fresh from the Mac App Store. Set command line tools path correctly. Created a brand new macOS App project (MetalTest). Pasted the minimal code to reproduce the issue into AppDelegate.swift. Build failed with the exact same errors. Ran the cat command again, confirmed the MTLCommandQueue.h file on the fresh system is STILL missing the dispatchType property. Request for Help: Given that the SDK header file corruption persists even after a complete macOS erase and reinstall, and hardware diagnostics have passed, I am at a loss for the cause or further troubleshooting steps. Has anyone encountered a similar situation where core SDK files remain corrupted despite a clean OS install and passing hardware checks? Are there any deeper system caches or states that might survive an erase/reinstall and interfere with SDK file integrity? Are there any more advanced diagnostic steps recommended? Any insights or suggestions from Apple engineers or the community would be greatly appreciated. Thank you. I have previously contacted Apple Developer Support regarding this issue, case ID: 102731239935.
0
0
69
2w
File download not working in Xcode 26.0 RC
Hello Apple Developer Community, I'm experiencing an issue with file download functionality in the iOS Simulator after updating to Xcode 26 RC (Build 17A321). Issue Description: When attempting to download files in the iOS Simulator via Safari, the download prompt appears correctly, but after tapping the 'Download' button, files are not being saved to the Files app. The download appears to do nothing with no error message, no indication of failure, but the file simply doesn't appear in Downloads or anywhere in the Files app. Environment: Xcode Version: 26.0 RC (17A321) iOS Simulator Version: 26.0 RC (23A339) Device Simulated: iPhone Air Steps to Reproduce: Open Safari in the iOS Simulator Navigate to a downloadable file (PDF, ZIP, etc.) Tap to initiate download Download prompt appears as expected Tap the 'Download' button Check the Files app → Downloads folder (empty) Expected Behavior: Files should download normally as they do on physical devices and as they did in previous Xcode versions. Actual Behavior: The download prompt dismisses after tapping 'Download', but no file appears in the Files app. No error message is shown, and there's no indication that the download failed, it simply appears as if nothing happened. Additional Information: Downloads work correctly on physical device (iOS 26 RC 23A340) This functionality worked properly in previous Xcode versions I have created a bug report to Feedback assistant: FB20190927 Thanks in advance for any assistance.
6
1
362
2w
PHAssetChangeRequest deleteAssets not working some time
Hello Team, I try to delete photo from Photos for that i used this method, [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ [PHAssetChangeRequest deleteAssets:@[assetToDelete]]; completionHandler:^(BOOL success, NSError *error) { }]; This method pops up a dialog with Don't Allow or Delete. But some time in some iPhones not respond PHAssetChangeRequest deleteAssets method that's why that completionHandler not called because of that i can't perform any operation of PHPhotoLibrary then after. If I restart my iPhone then it works. Many users of my app complained about this issue. I have an iPhone 11 with iOS 15.3. But some iOS 12,14,16 users also face the same issue. So what exact issue is there? Is it related to iOS or a method? Thanks, Ankur
3
3
916
2w
Could not launch “App” (Xcode26.0 + iPhone6(iOS12))
Problem Details : Could not launch “App” Reproduction Route : Install Xcode26.0 > Connect to iPhone6(iOS12) > Run app We tried this solution but didn't work. To make Xcode 26 recognize and run apps on an iOS 12 physical device, you can manually add the missing device support files by going to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ on your Mac, where you’ll see folders like 17.0 or 18.0; download the matching iOS 12 folder (for example, 12.4) from the community-maintained repository.
1
0
79
2w
Xcode 26 won't connect to new M5 iPad
I took delivery of a new 11 inch M5 iPad Pro yesterday, and have been unable to get it to connect to Xcode so I can build to it. The iPad is running iPadOS version 26.0.1, and I am using Xcode Version 26.0.1 as well. My MacBook Pro is running MacOS 26.0 I enabled developer mode. When I connected the cable I was asked (twice) to trust the computer, and said yes. I get errors saying: "The developer disk image could not be mounted on this device.; Error mounting image: 0xe800010f (kAMDMobileImageMounterPersonalizedBundleMissingVariantError" I've tried disconnecting and reconnecting the cable, quitting and relaunching Xcode, and rebooting both the iPad and the Mac. I've also tried "Clear Trusted Computers" in the developer menu. That triggers the same sequence of having to trust the computer again when I connect it (the dialog appears twice.) Then I go back to the error message above in the devices and simulators screen. I've also tried the command sudo installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target / Nothing works. It's maddening. Does anybody know how I can can get this working? I'm eager to start developing on my new iPad, but I can't get started.
3
0
164
2w