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

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Issues updating to Xcode 26 -- can no longer successfully build project
I recently updated to macOS sequoia 15.6 Afterward, I updated to Xcode 26 The project I've been running for the last couple years no longer compiles on existing simulators and doesn't build to a physical device. I'm getting an error I'm not familiar with and have no idea how to directly resolve it: The specific error is 'Command SwiftGeneratePch failed with a nonzero exit code' Looking up this issue via Google, there wasn't really a lot of information on this particular build failure. Most suggestions were to change the location of the Derived Data folder (Xcode -> File -> Project Settings -> update location of derived data from default to relative) This was one of the only actionable solutions I found online but this doesn't fully address the issue for me, it just creates a new issue: "Command PhaseScriptExecution failed with a nonzero exit code" I feel like with enough digging around I should be able to find a solution to the "PhaseScriptExecution" issue; there seems to be a decent amount of information online about that particular problem. I would prefer if I could solve the original 'SwiftGeneratePch" failure without needing to address other issues, though. Is this possible?
3
2
227
2w
PhotosUI does not build with UIKit and WidgetKit in XCode26
To reproduce this bug create a new Xcode Project for IOS choose UIKit. In the app delegate add the following lines. As you can see in the above image . Line 19 with the initialization of PHPickerViewController has no compilation failure. Now lets add import WidgetKit As soon as widgetKit is imported a compiler error is thrown which is PHPickerViewController is not in scope. This worked with Xcode 16.4 It was possible to have a swift file with both WidgetKit implementations and PhotosUI implementations. This behavior has changed in Xcode 26/26.0.1 . Does anybody know why this happens , could not find any clues within the different versions of documentations. P.S Found a work around which raises further questions Adding import SwiftUI fixes this problem , I am genuinely curious on how this is happening on a compiler level. LINKS To my previously published post :https://developer.apple.com/forums/thread/804059
0
3
86
2w
Xcode 26 - extremely long time to open immersive space
The issue reproducible with empty project. When you run it and tap "Open immersive space" it takes a couple of minutes to respond. The issue only reproducible on real device with debugger attached. Reproducible other developers too (not specific to my environment). Issue doesn't exists in Xcode 16. Afer initial long delay subsequent opens works fine. Console logs: nw_socket_copy_info [C1:2] getsockopt TCP_INFO failed [102: Operation not supported on socket] nw_socket_copy_info getsockopt TCP_INFO failed [102: Operation not supported on socket] Failed to set dependencies on asset 9303749952624825765 because NetworkAssetManager does not have an asset entity for that id. void * _Nullable NSMapGet(NSMapTable * _Nonnull, const void * _Nullable): map table argument is NULL PSO compilation completed for driver shader copyFromBufferToTexture so=0 sbpr=256 sbpi=16384 ss=(64, 64, 1) p=70 sc=1 ds=0 dl=0 do=(0, 0, 0) in 1997 XPC connection interrupted <<<< FigAudioSession(AV) >>>> audioSessionAVAudioSession_CopyMXSessionProperty signalled err=-19224 (kFigAudioSessionError_UnsupportedOperation) (getMXSessionProperty unsupported) at FigAudioSession_AVAudioSession.m:606 Failed to load item AXCodeItem<0x14706f250> [Rank:6000] SpringBoardUIServices [AXBundle name:/System/Library/AccessibilityBundles/SpringBoardUIServices.axbundle/SpringBoardUIServices] [Platforms and Targets:{ iOS = SpringBoardUIServices; } Framework] [Excluded: (null)]. error: Error Domain=AXLoading Code=0 "URL does not exist: file:///System/Library/AccessibilityBundles/SpringBoardUIServices.axbundle" UserInfo={NSLocalizedDescription=URL does not exist: file:///System/Library/AccessibilityBundles/SpringBoardUIServices.axbundle} Failed to load item AXCodeItem<0x14706f250> [Rank:6000] SpringBoardUIServices [AXBundle name:/System/Library/AccessibilityBundles/SpringBoardUIServices.axbundle/SpringBoardUIServices] [Platforms and Targets:{ iOS = SpringBoardUIServices; } Framework] [Excluded: (null)]. error: Error Domain=AXLoading Code=0 "URL does not exist: file:///System/Library/AccessibilityBundles/SpringBoardUIServices.axbundle" UserInfo={NSLocalizedDescription=URL does not exist: file:///System/Library/AccessibilityBundles/SpringBoardUIServices.axbundle} [b30780-MRUIFeedbackTypeButtonWithBackgroundTouchDown] Playback timed out before completion (after 3111 ms) Failed to set dependencies on asset 7089614247973236977 because NetworkAssetManager does not have an asset entity for that id.
4
2
365
2w
FileHandle(forWritingTo:) crash
I am having a rare crash when calling FileHandle(forWritingTo:) initializer with a file that does not exist. In the documentation, I see that the expected behaviour is to return nil, but in my app, in rare cases I have a Crash. My code that causes the crash is if let handle = try? FileHandle(forWritingTo: logFile) { Is it a known behaviour ? should I test if the file exist before calling FileHandle(forWritingTo:) ? Shareable_2025-09-01_05-32-28.3051.crash
2
0
59
2w
Xcode shows alert about unknown com.apple.quicklook.preview extension point when running on Apple Vision Pro Simulator
I have an iOS app with a QuickLook extension. I also added Apple Vision Pro in the target's General > Supported Destinations section. About one year ago, I was able to run the app on iPhone, iPad and Apple Vision Pro Simulators. Today I tried running it again on Apple Vision Pro with Xcode 26.0.1, but Xcode shows this error: Try again later. Appex bundle at ~/Library/Developer/CoreSimulator/Devices/F6B3CCA8-82FA-485F-A306-CF85FF589096/data/Library/Caches/com.apple.mobile.installd.staging/temp.PWLT59/extracted/problem.app/PlugIns/problemQuickLook.appex with id org.example.problem.problemQuickLook specifies a value (com.apple.quicklook.preview) for the NSExtensionPointIdentifier key in the NSExtension dictionary in its Info.plist that does not correspond to a known extension point. I tried again later a couple times, even after running Clean Build Folder Immediately, without any change. I can reproduce this with a fresh Xcode project to which I add a Quick Look Preview Extension and Apple Vision Pro as a supported destination. The error doesn't happen when running on Apple Vision Pro (Designed for iPad) or iPad Pro 13-inch (M4) destinations. What is the problem? I created FB20448815.
4
0
205
2w
Request for Support of Multi-MCP Integration and AI-Powered Code Automation in Xcode 26
Hello, I appreciate the enhanced productivity brought by ChatGPT and Claude AI integration in Xcode 26, which assists with code completion, refactoring, and documentation directly within the IDE. However, in real-world development environments, teams use a variety of MCP (Model Context Protocol) collaboration tools such as Jira, GitHub, Notion, and Confluence. Currently, there is no official, seamless integration of multiple MCP services with the AI features inside Xcode. For example, it would be extremely beneficial if: AI could automatically fetch and understand issues, tickets, documents, and code context from multiple MCP services, Perform related code modifications, pull request creation, and documentation updates All done intuitively and with minimal steps directly from Xcode. I kindly request that future Xcode releases provide official support for connecting to various MCP APIs, enabling smoother collaboration between AI and multiple team productivity tools all within the IDE environment. Thank you for considering this enhancement.
1
0
113
2w
XCode 18.6 not selectable
Hello. I need to develop for iOS 18. I've recently updated Xcode and it says I have to download ios 26 platform. I don't need it, but I can no longer build my existing projects against ios 18, even though Xcode says it's still installed and used 13 days ago. How to I remedy this?
1
0
245
2w
Extract Subview option missing in Xcode 26
Hi everyone, I recently updated to Xcode 26.0 and noticed that the “Extract Subview” refactoring option seems to be missing. Now, in Xcode 26, the only options I see under Editor -> Refactor -> are: Extract to Selection File Extract to Method Extract to Variable Extract All Occurrences But there’s no Extract Subview as there was before. Was Extract Subview intentionally removed in Xcode 26? Or is it hidden behind a new menu location or renamed?
5
5
418
2w
xcrun altool picking the wrong bundle id
I have 2 app store connect apps: "" ".beta" This is necessary for our usecase as we are building an iOS blockchain wallet, for a chain that updates itself every ~3 months adding new features/changing. We need the communities input, and can't have them uninstalling/re-installing the production app constantly, having to re-import private keys, etc. So we use 1 app store connect app for production releases, and another for public facing long running beta, where we experiment with new features before pulling them into production. Allowing users to have both installed at the same time Last week my CI (without any changes to scripts, project, profiles, etc), started failing for the production build with the error: [altool.105176BE0] Validation failed (409) This bundle is invalid. The bundle identifier cannot be changed from the current value, '<bundle-id>.beta'. If you want to change your bundle identifier, you will need to create a new application in App Store Connect. (ID: ae60bab4-0c01-4b2e-9ea9-91a73adccc14) Nowhere in any of the .app, .ipa, info.plist, provisioning profiles, etc, is it referencing ".beta", everything is referencing "" I tried building it manually locally, same error. I took the local output that failed with xcrun altool, and instead dropped it into Transporter, and it uploaded successfully to the production app Is it possible that xcrun altool is using an app store connect API that changed sometime in the last few weeks? Maybe the search/sort ordering logic has changed?
3
2
204
2w
Warning on Archiving - ExtensionKit extension not embedded
Hello! Ive been working on a package tracking app for iOS and was looking forward to pushing it to TestFlight for some testers to use. When I go to archive the package, I get a warning about the "...TrackerIntents.appex is an ExtensionKit extension and must be embedded in the parent app bundle's Extensions directory, but is embedded in the parent app bundle's Tracker.app/Extensions directory". The extension is for siri integration with shortcuts. I have done quite a lot of things to try and diagnose this but cant seem to get passed this warning. I know it's a warning but would rather it not exist. Ideally I would think its a matter of "moving" the items but in the navigation area, I dont see an extensions area. The main app target has it in the dependencies along with the EmbedExtensionKit Extensions in the Build Phases. Any ideas or configs I can try? I can provide more information if needed. This is on the latest Xcode version 26.0.1 for iOS 26. Thank you.
0
0
55
2w
Xcode 26.0.1 Simulator crashes and becomes unusable after a test crash
When running unit tests or UI tests that cause a crash (even intentionally), the simulator itself crashes and can't be booted again in subsequent runs. This started happening from Xcode 26, our project never had this issue before (we had crashes before as well). Steps to Reproduce: Run the unit test with fatalError(). Observe the simulator crashes. On the next test run, the simulator fails to boot, remaining in a crashed or stuck state. Example error: error = Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "Simulator device failed to launch com.xxx.xctrunner." UserInfo={NSLocalizedDescription=Simulator device failed to launch com.xxx.xctrunner., NSUnderlyingError=0x600009895830 {Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "com.xxx.xctrunner" failed." UserInfo={BSErrorCodeDescription=RequestDenied, NSLocalizedDescription=The request to open "com.xxx.xctrunner" failed., NSUnderlyingError=0x6000085d9500 {Error Domain=FBProcessExit Code=64 "The process failed to launch." UserInfo={NSUnderlyingError=0x60000850b360 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo=0x600008999340 (not displayed)}, BSErrorCodeDescription=launch-failed, NSLocalizedFailureReason=The process failed to launch.}}, FBSOpenApplicationRequestID=0xbe36, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace).}}, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace)., FBSOpenApplicationRequestID=0xbe36, SimCallingSelector=launchApplicationWithID:options:pid:error:, BSErrorCodeDescription=RequestDenied})
2
1
177
2w
How can I optimize multilingual string translations in SwiftUI for App Store apps using Localization APIs?
Hi team, I’m developing an iOS app that helps manage and translate multilingual content . The app uses SwiftUI with Localizable.strings and Bundle.localizedString(forKey:). I’m trying to optimize for dynamic language switching inside the app without restarting. I’ve tested various methods like: Text(NSLocalizedString("welcome_text", comment: "")) and some approaches using @Environment(.locale), but the system doesn’t always update views instantly when language changes. Question: What’s the recommended approach (or WWDC reference) for real-time language change handling in SwiftUI apps targeting iOS 18+?
1
0
106
2w
Unable to access 'https://github.com/firebase/firebase-ios-sdk/'
For the last week, every Update to Latest Package Version ends with the error fatal: unable to access 'https://github.com/firebase/firebase-ios-sdk/': Failed to connect to github.com port 443 after 31891 ms: Couldn't connect to server. This could be firebase-ios-sdk or another package. The timeout in the example given is 31,891 ms, but it could be more than 75,000 ms. However, other packages from GitHub are updated without errors. The next attempt may return the same error with the same repository, or with a different one, while the repository from the previous attempt is updated normally. This only happens in Xcode; pure Git performs clones (with and without mirrors), fetching, pulling, and any other actions permitted without any error. What happened, and how can I restore normal package management? MacOS 26.0.1 xcode 26.0.1
0
0
54
3w
SceneDelegate methods are not called
SceneDelegate's sceneWillEnterForeground and sceneDidEnterBackground methods are not called when app is moved to the background and back. It happens when Stage Manager is enabled and application is moved to the background using App Switcher (double tap on the home button). Otherwise methods are called. Started to reproduce since iOS26. Is not reproducible on iOS18.
0
0
49
3w
Xcode 26.0 unknown type name 'sqlite3_context'
I have been using the Mixpanel-Swift SDK alongside the Salesforce Mobile SDK in my iOS project with Xcode 16.4 without any issues. However, after upgrading to Xcode 26, I started encountering a problem related to SQLite3. Here is the relevant portion of my Podfile setup: platform :ios, '17.0' def required_pods source 'https://cdn.cocoapods.org/' source 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git' use_frameworks! pod 'SalesforceAnalytics', '13.0.2' pod 'MobileSync', '13.0.2' pod 'SalesforceSDKCore', '13.0.2' pod 'SalesforceSDKCommon', '13.0.2' pod 'SmartStore', '13.0.2' pod 'Mixpanel-swift' end target 'Test' do required_pods end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = "" config.build_settings['CODE_SIGNING_REQUIRED'] = "NO" config.build_settings['CODE_SIGNING_ALLOWED'] = "NO" config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '17.0' end end end Has anyone else encountered a similar issue or discovered a workaround? Any advice or solutions would be greatly appreciated. Thank you in advance!
3
0
221
3w
Xcode 26 Build Failure: _sys_select and netinet_in Type Mismatches
I'm facing a build failure after migrating my project to Xcode 26. The issue appears to be related to the redefinition of some core system types. The compiler errors point to a failure to locate the original type definitions, suggesting they've been moved or renamed. Specifically, the build log contains these errors: ../arm64-apple-ios.private.swiftinterface:653:11: Cannot find type '_sys_select' in scope ../arm64-apple-ios.private.swiftinterface:130:33: Cannot find type 'netinet_in' in scope I've observed that the types are being mapped as follows: netinet_in.in_addr_t -> _DarwinFoundation2.in_addr_t _sys_select.fd_set -> _DarwinFoundation2.fd_set I'm looking for guidance on the recommended way to resolve these API changes. How should I handle these type redefinitions in Xcode 26 to ensure my project builds correctly? Any insights would be greatly appreciated. Thank you.
0
0
20
3w