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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Existing Project Not Showing Installed iOS 26 Simulator (New Projects Work Fine)
Hello everyone, I'm encountering a frustrating issue with Xcode 26 and the iOS Simulator selection, and I'd appreciate any insight from the community. Problem Overview I have updated my Xcode to version 26.0. I have successfully installed the iOS 26 SDK and the iOS 26 Simulator runtime via Xcode's component settings. However, when I open an older, existing project, the device selection dropdown menu does not list the iOS 26 simulator. I can only select older versions, such as my locally installed iOS 18.6 simulator. Key Finding (Diagnosis) New Project Test: When I create a brand new Xcode project, the iOS 26 simulator is correctly available and runs as expected. Conclusion: This strongly suggests the issue lies with a specific configuration setting in the existing (old) project, rather than the Xcode installation itself. Troubleshooting Steps Taken I suspect a project-level configuration is somehow blocking the display of the new simulator. I've already checked: General -> Deployment Target: This is set to an older version, but theoretically shouldn't hide the simulator list. Build Settings -> Base SDK: This is set to the latest iOS SDK. Has anyone else experienced this behavior when upgrading projects to support iOS 26? What specific configuration files (e.g., .xcodeproj settings, Podfile configurations, or specific Build Settings) should I check to ensure my old project properly recognizes and displays the newly installed iOS 26 simulator? Any pointers or solutions would be greatly appreciated! Thank you.
1
3
157
2w
Xcode 26 gets stuck frequently
Hi, Ever since I updated to macOS Tahoe and started using Xcode 26 daily, I've run into an issue where it gets stuck very frequently when launching and running my app in the simulator. It happens with the main app target as well as when running unit tests. If I restart Xcode and the simulator app, it works fine again for a while, but after some use, it goes back to the same situation. In Activity Monitor, Xcode ends up at 1000% CPU utilization for a minute or more, basically rendering the simulator and the debugger stuck. If I untick the "Debug Executable" option in the scheme editor, it works fine as well. Anyone else run into the same situation, or are there any tips I can follow to fix this issue? It makes it really tedious to make changes and then be stalled for a minute or more to see the app run. I've restarted the Mac, erased the booted simulator as well. I'm on a MacBook Pro M4 Pro. Everything used to run fine before macOS Tahoe / Xcode 26 on my main device. In fact, I used to run macOS Tahoe / Xcode 26 beta versions on a separate partition without any problems.
0
2
252
2w
Error executing program on simulator
Hi Team, I am getting following error when executing a program on the simulator. Warning: CocoaPods is installed but broken. Skipping pod install. You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it. This can usually be fixed by re-installing CocoaPods. For re-installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation CocoaPods not installed or not in valid state. Error launching application on iPhone 17. I tried to install cocoapods using below command which gave me another error. gem install cocoapods This gave me below error. ERROR: Error installing cocoapods: The last version of securerandom (>= 0.3) to support your Ruby & RubyGems was 0.3.2. Try installing it with `gem install securerandom -v 0.3.2` and then running the current command again securerandom requires Ruby version >= 3.1.0. The current ruby version is 2.6.10.210. I tried to execute the suggested command gem install securerandom -v 0.3.2 This installed successfully. Then the installation of cocoapods is still not successful which gave me another error related to drb. what is the recommended approach, follow the suggestions? What is the recommended approach for upgrading ruby to latest version? I assumed that this will be taken care by upgrading Xcode which is latest on my system. Can anyone help!
0
0
36
2w
Build Failure - Missing Entitlement
I have a build failure problem in my project. The two messages read: Automatic signing failed Xcode failed to provision this target. Please file a bug report at https://feedbackassistant.apple.com and include the Update Signing report from the Report navigator. Provisioning profile "iOS Team Provisioning Profile: com.hodge.MeditateMD" doesn't include the com.apple.developer.activitykit entitlement. When I look at my entitlements in the signing and capability, I see that the com.apple.activitykit is missing. When I go to my app in the developer website, I can’t find live activities to add to the provisioning profile. I am really stuck and would appreciate any help!
0
0
43
2w
Unable to compile Core Image filter on Xcode 26 due to missing Metal toolchain
I just install xcode 26.0.1 throungh app store, but when i 'xcodebuild -downloadComponent MetalToolchain', i get wrong Metal Toolchain 17A324, which is the wrong version. The correct version is 17A5241e i think. This issue i saw 26.1 release has fixed, https://developer.apple.com/documentation/xcode-release-notes/xcode-26_1-release-notes. How can i get update?
1
0
74
2w
Xcode to App Store Connect Processing Issue
Hi Please when we upload our App from Xcode to App Store Connect, we do receive upload message but when we go to App store Connect interface, there we see our app being in process but it gets disabled and never goes to next step, and we waited for more than 2 hours, also we haven't received any email when we upload the app and when we refresh the page, the build in processing gets disappeared.
0
0
36
2w
Code signing issues when attempting to validate or upload for flighttest
I'm developing this app that uses python (pythonkit) to access certain python tools. It works fine locally but I was trying to validate it in order to upload it for the final testing and submission but I'm getting this signing error: codesign command failed (/var/folders/w0/9xsxryw94ps9n139w7g9q3gh0000gp/T/XcodeDistPipeline.~~~jO0urX/Root/Applications/RubyEyes.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/config-3.13-darwin/python.o: operation inapplicable or not supported for this type of code ) can someone help me?
2
0
118
2w
How di
Hi. I have been trying to figure out the code for this program for weeks now and can't figure it out. I apologize for the repeated postings. I have the following code. I am trying to find distance and velocity in the following program. I keep getting error messages. Any help would be very much appreciated! Thank you! import UIKit import CoreMotion let motion = CMMotionManager() class ViewController: UIViewController { @IBOutlet var xaxis: UILabel! @IBOutlet var yaxis: UILabel! @IBOutlet var zaxis: UILabel! let movementManager = CMMotionManager() override func viewDidLoad() { super.viewDidLoad() movementManager.startAccelerometerUpdates() movementManager.accelerometerUpdateInterval = 0.1 if let data = self.movementManager.accelerometerData { self.xaxis.text = String(data.acceleration.x) //OLD - self.yaxis.text = String(data.acceleration.y) //OLD - self.zaxis.text = String(data.acceleration.z) var xoutput = self.xaxis.text var distance: Double = 0.0 var velocityi: Double = 0.0 var velocityf: Double = 0.0 var x: Int = 1 while x == 1 { distance = velocityi * 0.1 + (1/2) * xoutput * pow(0.1, 2) velocityf = velocityi + xoutput * 0.1 velocityi = velocityf } } } }
4
0
172
2w
Error Loading Products (In-App Purchases)
I coded my mobile app using Cursor and have recently been building and submitting for TestFlight using XCode version 16.1. I am testing using my Iphone via the downloaded build from TestFlight. My onboarding flow goes smoothly, but when I reach the checkout page I receive an error that says "Error Loading Products". When I select "OK" and then try to click one of my available products I receive another error that says "Products Not Available". I am signed out of my main Apple ID and signed into a Sandbox user that is valid. I have all of my application agreements signed and valid. I believe everything is configured properly, but I have been receiving purchase errors for the past week with no progress. I had one semi-successful attempt where the Apple payment screen appeared, but have not had that since. Even on that attempt, there was a payment failure afterwards as well. Any help would be greatly appreciated. I would like to get a build submitted for app store review as soon as possible. I've attached screenshots to this ticket showing the error messages in more detail.
0
0
56
2w
new font warnings spamming my logs
Hi, I recently upgraded my device OS to 26.0 and XCode is on Version 26.0.1 (17A400) My XCode log is getting spammed with these types of errors all of a sudden. And filtering is so limited (filter a single item at a time) I can't remove them. It says to file a bug, can you folks PLEASE fix this it is making debugging really hard with all its noise. Unable to update Font Descriptor's weight to Weight(value: 0.3): UICTFontDescriptor <0x110e40180> = { NSFontNameAttribute = "SF Pro Display"; NSFontSizeAttribute = 16; } - SwiftUICore/Logging.swift:84 - please file a bug report. and UICTFontDescriptor <0x1181062e0> = { NSFontNameAttribute = "Inter Display"; NSFontSizeAttribute = 28; } - SwiftUICore/Logging.swift:84 - please file a bug report.
1
0
166
3w
Unable to launch any simulators in Xcode, XPC error talking to liblaunch_sim.dylib could not be opened
Hello, been beating my head against the wall for a few days with this. Originally got the error in Xcode 16, through the course of troubleshooting uninstalled and reinstalled Xcode multiple times, upgraded Xcode to 23 - same result. Create a different user on my computer and try, same result. Xcode &gt; Settings &gt; Components show both iOS 26.0 and iOS18.6 simulator, however no simulators show in Xcode, and Xcode hangs when you try to create one. 'xcrun simctl list runtimes' shows this: iOS 18.6 (18.6 - 22G86) - com.apple.CoreSimulator.SimRuntime.iOS-18-6 (unavailable, liblaunch_sim.dylib could not be opened) iOS 26.0 (26.0 - 23A343) - com.apple.CoreSimulator.SimRuntime.iOS-26-0 (unavailable, liblaunch_sim.dylib could not be opened). Does anyone have any ideas on what the issue could be?
0
0
199
3w
Microphone is not being detected in Safari on iOS
What I am trying to do is very simple. Environment description: macOS Catalina version 10.15.7 iOS Simulator version 12.3 Target device iPhone 11 (iOS 13.2.2) Open Safari > go to website > mictests.com Result: "Could not find any media devices. It is very likely that your browser does not allow access to these devices." The Simulator does have access to the microphone. I can use Siri just fine. Only Safari cannot access the mic. I'm really stuck here, any ideas are welcome.
1
0
856
3w
ENABLE_ENHANCED_SECURITY module file not found
When I tried turning on ENABLE_ENHANCED_SECURITY = YES in an Xcode 26.1 beta project, I got a bunch of "module file not found" errors like this: While building module 'CoreServices': In file included from <module-includes>:1: /Applications/Xcode26.1-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19:2: fatal error: module file '/Volumes/Work/Xcode-derived/PlainCalc3-gixjfymjqamwmufdwcseugzjehqa/Build/Intermediates.noindex/ExplicitPrecompiledModules/CoreFoundation-5POB3HW0BHFSPWLD7DOOKAULM.pcm' not found: module file not found 19 | #include <CoreFoundation/CoreFoundation.h> | ^ I tried deleting the project's derived data. Is this a known issue?
0
0
41
3w
Long loading time when showing/hiding the Code Review window in Xcode 26.0.1
When showing or hiding the Code Review window in Xcode 26.0.1, a loading screen appears and Xcode freezes. The loading screen appears for about 30 seconds, then disappears and the Code Review window appears. During this time, Xcode also freezes and cannot function. It doesn't seem to be an error or bug, but people who frequently switch between Code Review windows find the long loading time inconvenient. Is there any way to improve this? (MacBook Pro 16, M2 Max, 64GB memory, macOS 26.0 (25A354))
0
0
105
3w
Xcode 26 Debug Error Display Issue
I recently installed Xcode 26.0.1. (MacBook Pro 16, M2 Max, 64GB memory, macOS 26.0 (25A354)) Normally, when debugging, a red error appears in the left-hand Issues navigation, and you can click on it to access the location of the error. However, currently, when debugging, the red error does not appear in the "Issue Navigation" on the left-hand side of the Xcode screen. There is an error, but it isn't displayed. It does appear, but disappears after 1 second. (It disappears before I can click on it.) The error doesn't appear or disappears after 1 second, so I can't pinpoint the exact location. Please help me resolve this issue. Additionally, I deleted all Xcode development-related files inside my Mac and restarted my MacBook, but the symptom still persists.
3
0
150
3w
Xcode 26 macOS 26 mac app UI Testing issues
Testing is hit or miss since I've tried testing my mac App using Xcode 26 on macOS 26. Instrumenting my code shows this when things work Various App state variables initialized correctly ContentView onAppear runs App Delegate's applicationDidFinishLaunching runs When things don't work I see that the ContentView onAppear code was not executed and the app's window does not appear on my display. What would cause that to happen? This ONLY happens when testing the app in Xcode, either selecting individual tests or groups of tests or using cmd-U to run all tests.
0
0
121
3w
macOS WeatherKit "A server with the specified hostname could not be found"
My code was running with with the version before Xcode 26 RC. I recompiled one last time. Now I'm getting the error: A server with the specified hostname could not be found let now = Calendar.current.date(byAdding: .hour, value: 1, to: Date())! let nextWeek = Calendar.current.date(byAdding: .day, value: 14, to: Date())! do { let (dailyForecast, hourlyForecast, currentWeather, alertWeather) = try await weatherService.weather(for: thisLocation, including: .daily, .hourly(startDate: now, endDate: nextWeek), .current, .alerts) Suggestions?
4
1
111
3w
Used Xcode AI to Clear 100+ Sendable Warnings
I have two apps in which I have fixed warnings on Sendable, however there's one app where I did not and it looks like the rent's come due with Xcode 26.0, as I am getting over 100 warnings about Sendable. On a lark, I let the AI work on the warnings. There were so many that I ran out of free ChatGPT time and had to wait 24 hours. But today I cleared every remaining warning, but did the app still work? I figured I'd have to trash this code and do it by hand. But to my surprise, the app is working properly so far. More testing needs to be done and I need to dig into the code to make sure it's right, but so far, so good.
1
0
73
3w
xcodebuild failing when package plugin is added to project
I have created a build tool plugin in one of my SPM packages, and am trying to get it working in my project. It works fine when I build from Xcode, or have at least built the project in Xcode once before with the plugin. But if I try to build the project using xcodebuild on a machine where I have never built the project before, it fails with this error: error: '2.3.0': Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/TemporaryDirectory.BWwJWG/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx14.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks", "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-L", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk", "-package-description-version", "5.7.0", "/private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/SwiftTemplate/1FA05B4D-851D-4D2B-ADD6-E5A0DF70CD37/2.3.0/Package.swift", "-o", "/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/TemporaryDirectory.HUxmAq/2.3.0-manifest"]) <unknown>:0: error: error opening '/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/C/clang/ModuleCache/PackageDescription-3TZGMDBKTLI5E.swiftmodule' for output: /var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/C/clang/ModuleCache/PackageDescription-3TZGMDBKTLI5E.swiftmodule: Operation not permitted /private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/SwiftTemplate/1FA05B4D-851D-4D2B-ADD6-E5A0DF70CD37/2.3.0/Package.swift:4:8: error: failed to build module 'PackageDescription' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription | `- error: failed to build module 'PackageDescription' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug 5 | 6 | let package = Package( On a machine where this isn't working, if I open Xcode and build the project once, then xcodebuild will succeed. Even if the Xcode build fails because I didn't choose to trust the plugin. I first ran into this on our CI server, and confirmed the same behavior by creating a brand new user account on my Mac and reproducing there. Oddly I am not able to recreate the failure after it is fixed by Xcode, even after deleting every conceivable SPM related cache. This is the command I used (I've added a bunch of sandbox stuff to the command, with no effect): xcodebuild -workspace Zinnia.xcworkspace -scheme Zinnia -disableAutomaticPackageResolution -skipPackagePluginValidation -IDEPackageSupportDisableManifestSandbox=1 -IDEPackageSupportDisablePluginExecutionSandbox=1 OTHER_SWIFT_FLAGS='$(inherited) -disable-sandbox' clean test Here is the output immediately prior to the error: Prepare packages Compile plug-in “PixiteDependencyGenerator” in package “pixitedependency” [debug]: Compiling plugin to executable at /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Products/PluginExecutables/PixiteDependencyGenerator [debug]: Using compiler /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc [debug]: Plugin compilation output directory '/Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Products/PluginExecutables' [debug]: Computed hash of plugin compilation inputs: 44c01fc622391970b4c18b2a5fa100e2e0fa23e272829e41b575ef79872ec8f2 Apply build tool plug-in “PixiteDependencyGenerator” to target “Zinnia” in project “Zinnia” /usr/bin/sandbox-exec -p "(version 1) (deny default) (import \"system.sb\") (allow file-read*) (allow process*) (allow mach-lookup (global-name \"com.apple.lsd.mapdb\")) (allow file-write* (subpath \"/private/tmp\") (subpath \"/private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T\") ) (deny file-write* (subpath \"/Users/natetemp/projects/pixite/Zinnia\") ) (allow file-write* (subpath \"/Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Intermediates.noindex/BuildToolPluginIntermediates/Zinnia.output/Zinnia/PixiteDependencyGenerator\") (subpath \"/private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/TemporaryItems\") ) " /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/SourcePackages/artifacts/pixitedependency/Sourcery/sourcery-2.3.0.artifactbundle/sourcery/bin/sourcery --templates /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/SourcePackages/artifacts/pixitedependency/Sourcery/sourcery-2.3.0.artifactbundle/sourcery/Templates --output /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Intermediates.noindex/BuildToolPluginIntermediates/Zinnia.output/Zinnia/PixiteDependencyGenerator/GeneratedSources --cacheBasePath /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Intermediates.noindex/BuildToolPluginIntermediates/Zinnia.output/Zinnia/PixiteDependencyGenerator/Cache --sources /Users/natetemp/projects/pixite/Zinnia/Zinnia For the record, I did ensure that the 3 directories it complains about do exist with proper permissions. Is it possible that the sandbox being applied to the plugin is also being incorrectly applied to something involved in parsing and caching the manifest file? Or if there is something I am doing wrong, please let me know. This is using Xcode 16.4 on macOS 15.5.
2
0
83
3w