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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Attributes inspector in Xcode 26
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.
3
3
248
6d
90714: Invalid binary.
90714: Invalid binary. The app contains one or more corrupted binaries. Please rebuild the app and resubmit. 我开发的OC项目,三个月前打包分发还没有问题,半个月前开始就一直报这个错。查了很多资料都无法解决,所有的SDK也都升级了,还是报这个错,麻烦Apple的工程师帮忙指正一下问题,如何解决这个问题。
7
0
292
1w
Stale TBD Files Cause Runtime Crash When Framework Changes from Dynamic to Static
Stale TBD Files Cause Runtime Crash When Framework Changes from Dynamic to Static Summary When using EAGER_LINKING=YES, Xcode generates TBD files for dynamic frameworks. When a framework changes from dynamic to static, Xcode doesn't remove the stale TBD, causing dyld: Library not loaded crash at runtime. Environment Xcode 16.4 (16F6), macOS Darwin 24.6.0, iOS Simulator 18.5 Steps to Reproduce Project Structure: MainApp (EAGER_LINKING=YES) ProjectA/SharedLib (dynamic, mh_dylib) ProjectB/SharedLib (static, staticlib) Steps: Build with ProjectA (dynamic framework) → TBD created in EagerLinkingTBDs Switch workspace to ProjectB (static framework) without cleaning DerivedData Build again → BUILD SUCCEEDED Run app → CRASH: dyld: Library not loaded Root Cause Xcode adds -F EagerLinkingTBDs before -F Build/Products: -F/.../EagerLinkingTBDs/Debug-iphonesimulator ← checked FIRST -F/.../Build/Products/Debug-iphonesimulator ← checked SECOND The linker finds the stale TBD first and treats the framework as dynamic, even though the actual binary is now static. Evidence # SharedLib is static $ file SharedLib.framework/SharedLib current ar archive random library # But stale TBD still exists $ ls EagerLinkingTBDs/.../SharedLib.framework/ SharedLib.tbd ← STALE! # MainApp incorrectly references dynamic library $ otool -L MainApp.app/MainApp.debug.dylib | grep SharedLib @rpath/SharedLib.framework/SharedLib ← WRONG! Attempted Workarounds (All Failed) Workaround Result FRAMEWORK_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)" "$(inherited)" Xcode still adds EagerLinkingTBDs first EAGER_LINKING = YES on static framework Build failure - empty TBD OTHER_LDFLAGS modifications Linker still uses TBD Expected Behavior When a framework changes from dynamic to static, Xcode should remove the stale TBD file from EagerLinkingTBDs. Suggested Fix Remove TBD files when building static library targets Track MACH_O_TYPE changes and invalidate TBD files accordingly
0
0
105
1w
Enabling xcode project for CI/CD
Hello All, I am new to apple ecosystem. We have a xcode project whose code is scattered across different repos. We are trying setup CI/CD for this Xcode project to get build so that we could know build issue. Clone/Update all repos – which I can do via some script Generate xcode projects from sources synced in step 1. This is where we want your help. How should we approach this? What apple suggest for this ? In this step we don't want to use any third part tool (like CMake) to generate Xcode projects. Build targets to know build errors – This we can easily do via xcodebuild command line tool. Please share you input/thought on this. Your input is highly appreciated.
0
0
31
1w
xcodebuild failed without clear reason
Hello, I got a weird issue with xcodebuild, the tool gives the error that requested device could not be found but I already add it. The issue is solved if I remove the -scheme (and deveriedDataPath. Do you have any idea what is wrong with the parameter or it is the xcodebuild error itself? haiphan@MacMini MetalTest % xcodebuild -project MetalTest.xcodeproj -destination 'platform=macOS,name=Any Mac' -scheme MetalTest Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project MetalTest.xcodeproj -destination "platform=macOS,name=Any Mac" -scheme MetalTest 2025-12-05 12:18:25.594 xcodebuild[17581:2982049] Writing error result bundle to /var/folders/x7/rmx20t393rx49t6gyx3fh_vdmz2lm8/T/ResultBundle_2025-05-12_12-18-0025.xcresult xcodebuild: error: Unable to find a device matching the provided destination specifier: { platform:macOS, name:Any Mac } The requested device could not be found because no available devices matched the request. Available destinations for the "MetalTest" scheme: { platform:macOS, arch:arm64, id:00006020-000E29861AE8C01E, name:My Mac } { platform:macOS, arch:x86_64, id:00006020-000E29861AE8C01E, name:My Mac } { platform:macOS, name:Any Mac }
0
0
26
1w
Xcode not updating recent projects
My Xcode does not show my Recent projects for a while now. I have different projects on my Mac that I open using Xcode and it can't remember the recent ones and never shows it. Does anyone know how to fix that? I've tried to clean caches, restart the Mac, download the Xcode again... MacOs: Tahoe 26.1 Xcode: 26.1.1
1
0
36
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.
34
20
2.4k
1w
Xcode and Anthropic: usage limits
Hi, I have been using Claude with Xcode 26.1.1 and it was working fine till a couple of days ago, when it started giving me an error message on every query: "Message from Anthropic: This request would exceed your account's rate limit. Please try again later." I am on the Pro model, and I can use the Claude.ai website just fine. The usage limits on the website show I've used only 11% of the weekly limit, and 4% of the 'current session'. So I'm wondering if this is an Xcode bug / issue, and if there is a workaround. I have restarted Xcode, restarted the Mac, logged out of Anthropic and logged back in, tried Xcode 26.2 beta as well, but no luck.
0
0
45
1w
Metal Debugger only captures static on XCode 16.2
I was encountering visual artifacts in my Unity game only on iOS devices and wanted to use the Metal Debugger to diagnose it. However, it seems to only capture static noise which is not helpful as shown below For reference, this is a frame of the visual artifact and also the location where I asked Metal to capture the frame Am I missing any settings in Unity/Xcode?
4
0
192
1w
Xcode 26 Coding Assistant & Anthropic
I've been trying to use Antrhopic with Xcode 26 RC and continue to run into this error: No Data/Bytes for request: https://api.anthropic.com/v1/messages Once I get it, all prompts fail even a simple "Hello" that worked a moment ago returns the error message. Restarting Xcode and it returns to normal till I hit that error again. Any ideas on what's going on?
1
0
164
1w
Xcode debugger stops at dyld after upgrading to Xcode 26
After upgrading to Xcode 26, started getting an issue where Xcode debugger is stopping at dyld`lldb_image_notifier Does not happen on device. Tried cleaning derived data folder, clean build but no success. what could be the cause? this is from the stack. #0 0x0000000207e0ffa1 in lldb_image_notifier () #1 0x0000000207e11c49 in dyld4::ExternallyViewableState::triggerNotifications () #2 0x0000000207e13a2f in invocation function for block in dyld4::ExternallyViewableState::notifyMonitorOfImageListChangesSim(bool, unsigned int, mach_header const**, char const**) () #3 0x0000000207e10c3b in dyld4::ExternallyViewableState::notifyMonitorOfImageListChangesSim () #4 0x00000001102b9195 in dyld4::ExternallyViewableState::triggerNotifications () #5 0x00000001102b9465 in dyld4::ExternallyViewableState::addImages () #6 0x000000011029dcec in dyld4::RuntimeState::notifyDebuggerLoad () #7 0x00000001102b8065 in dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const::'lambda'()::operator()() const () #8 0x00000001102b71fd in dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const () #9 0x00000001102b30e3 in dyld4::APIs::dlopen_from () #10 0x00000001199b4c5e in _CFBundleDlfcnLoadFramework () #11 0x0000000119982a1e in _CFBundleLoadExecutableAndReturnError () #12 0x0000000115f081c4 in -[NSBundle loadAndReturnError:] () #13 0x00000001a3c42866 in -[NSBundleAccessibility loadAndReturnError:] () #14 0x000000013cd67fa7 in __50-[AXCodeItem loadWithStrategy:onQueue:completion:]_block_invoke_2 ()
1
0
89
1w
Shortcut to wrap selected lines in a #if/#endif
I'm looking for a way to make the following possible in Xcode (26.0 or later): I select one or more lines of code. I then enter a hotkey (or select a menu item) that results in adding the line: #ifdef SOME_MACRO before the selection and adding the line: #endif after the selection. Example: Start with the following lines of code: BOOL x = NO; int y = 4; NSString *str = @"Hello"; If I then highlight the int y = 4; line and use the proper hotkey or menu, the result would be: BOOL x = NO; #ifdef SOME_MACRO int y = 4; #endif NSString *str = @"Hello"; Is something like this possible in Xcode? I looked at code snippets but that doesn't seem to support wrapping existing code. I looked at the Xcode Settings under Editor and Shortcuts and didn't see a way to add such a custom shortcut.
0
0
27
1w
Canvas fails with "Runtime Linking Failure" in Swift Package
I have a view inside a Swift Package that relies on an external Swift Package. My Preview Canvas breaks as soon as I use code from the external package: import ComplexModule // From swift-numerics import SwiftUI struct MyView: View { // Commenting out this line will make Previews work let number: Complex<Double> = 123 var body: some View { Text("Hello World") } } #Preview { MyView() } This is part of the error the preview emits: == PREVIEW UPDATE ERROR: GroupRecordingError Error encountered during update group #33 ================================== | [Remote] JITError: Runtime linking failure | | Additional Link Time Errors: | Symbols not found: [ _$sSd10RealModule0A0AAMc, _$s13ComplexModule0A0VMn, _$s13ComplexModule0A0V14integerLiteralACyxG07IntegerD4TypeQz_tcfC ] | | ================================== | | | [Remote] LLVMError | | | | LLVMError: LLVMError(description: "Failed to materialize symbols: { (static-MyTarget, { __replacement_tag$1 }) }") Did anyone else see this before?
1
0
99
1w
Xcode Crashes While Opening or Searching Specific Files
My Xcode crashed over and over again while I searing spefic file like "TingMusic". I have tried uninstall and install Xcode from 16.0 to 16.4, clear derived data folder, reboot my Mac, but none of these working. 😭 Translated Report (Full Report Below) Process: Xcode [1811] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 16.4 (23792) Build Info: IDEApplication-23792000000000000~2 (16F6) App Item ID: 497799835 App External ID: 874973124 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2025-09-02 10:51:26.8582 +0800 OS Version: macOS 15.6 (24G84) Report Version: 12 Anonymous UUID: 9835064A-AD7C-EE47-64DE-49587A7EC956 Time Awake Since Boot: 320 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: Xcode [1811] Application Specific Information: abort() called Application Specific Signatures: isSameDocumentAsURL Kernel Triage: VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x186d5e388 __pthread_kill + 8 1 libsystem_pthread.dylib 0x186d9788c pthread_kill + 296 2 libsystem_c.dylib 0x186ca0a3c abort + 124 3 IDEKit 0x10890d888 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 964 4 IDEKit 0x10890dcf8 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 872 5 DVTFoundation 0x1047839a0 _DVTAssertionHandler + 412 6 DVTFoundation 0x104783b04 _DVTAssertionFailureHandler + 196 7 IDEKit 0x1086e5178 -[IDENavigableItemCoordinator _navigableItemForFilePath:inWorkspace:withSeenFileReferences:computedNavItemsByContainerFilePath:allowLeaf:] + 2240 8 IDEKit 0x1086e3d24 -[IDENavigableItemCoordinator _structureNavigableItemForFileURL:inWorkspace:error:] + 268 9 IDEKit 0x1086e4658 -[IDENavigableItemCoordinator structureNavigableItemForDocumentURL:inWorkspace:error:] + 152 10 IDEKit 0x1086e89bc +[IDENavigableItemCoordinator temporaryStructureItemForDocumentURL:forWorkspace:error:inScope:] + 116 11 IDEKit 0x1088689e0 +[IDEOpenQuicklySubpathGenerator subpathForURL:lineNumber:isFromProject:showFileName:fromWorkspace:withAttributes:] + 716 12 IDEKit 0x108869a88 -[IDEOpenQuicklyResult(SubPath) subPathForWorkspace:withAttributes:] + 356 13 IDEKit 0x1088eee54 -[IDEOpenQuicklyResultDisplayRecord subtitle] + 172 14 IDEKit 0x10894bb1c -[IDEOpenQuicklyResult(ViewExtension) cellViewForOutlineView:displayRecord:delegate:] + 596 15 IDEKit 0x108849564 -[IDEQuickSearchWindowController outlineView:viewForTableColumn:item:] + 72 16 AppKit 0x18ae314a8 -[NSTableView(NSTableViewViewBased) makeViewForTableColumn:row:] + 176 17 AppKit 0x18ae30c0c -[NSTableRowData _addViewToRowView:atColumn:row:] + 228 18 AppKit 0x18ae2ed5c -[NSTableRowData _initializeRowView:atRow:] + 328 19 AppKit 0x18ae2d8ec -[NSTableRowData _preparedRowViewForRow:storageHandler:] + 140 20 AppKit 0x18ae2d7bc -[NSTableRowData _addRowViewForVisibleRow:withPriorView:] + 268 21 AppKit 0x18ae2d5e4 -[NSTableRowData _addRowViewForVisibleRow:] + 316 22 AppKit 0x18ae2cdf0 -[NSTableRowData _updateVisibleRowEntries] + 640 23 AppKit 0x18ae2c854 -[NSTableRowData updateVisibleRowViews] + 612 24 AppKit 0x18ae2bf08 -[NSTableView layout] + 148 25 AppKit 0x18b8d0fa8 ___NSViewLayout_block_invoke + 632 26 AppKit 0x18ade7000 NSPerformVisuallyAtomicChange + 108 27 AppKit 0x18adeb8d8 _NSViewLayout + 96 28 AppKit 0x18b8c72cc __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 372 29 AppKit 0x18ade7000 NSPerformVisuallyAtomicChange + 108 30 AppKit 0x18adeb86c -[NSView _layoutSubtreeWithOldSize:] + 100 31 AppKit 0x18b8c7410 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 696 32 AppKit 0x18ade7000 NSPerformVisuallyAtomicChange + 108 33 AppKit 0x18adeb86c -[NSView _layoutSubtreeWithOldSize:] + 100 34 AppKit 0x18b8c7410 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 696 35 AppKit 0x18ade7000 NSPerformVisuallyAtomicChange + 108 36 AppKit 0x18adeb86c -[NSView _layoutSubtreeWithOldSize:] + 100 37 AppKit 0x18b8c7410 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 696 38 AppKit 0x18ade7000 NSPerformVisuallyAtomicChange + 108 39 AppKit 0x18adeb86c -[NSView _layoutSubtreeWithOldSize:] + 100 40 AppKit 0x18b8c7410 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 696 41 AppKit 0x18ade7000 NSPerformVisuallyAtomicChange + 108 42 AppKit 0x18adeb86c -[NSView _layoutSubtreeWithOldSize:] + 100 43 AppKit 0x18b8c7410 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 696
1
0
218
1w
Unable to Generate .ipa for .NET MAUI iOS App – Codesign Fails With “unable to build chain to self-signed root”
Hi everyone, I am trying to generate an .ipa file for my .NET MAUI (net9.0-ios) application, but every attempt fails with the same codesigning error. I have tried multiple approaches, including building from Windows paired to macOS, and directly building through the macOS terminal, but nothing is working. Below are the exact steps I followed: Steps I Performed Generated the Apple Development certificate using Keychain Access on macOS. Added that certificate into my developer account and created the corresponding provisioning profile. Created an App ID, attached the App ID to the provisioning profile, and downloaded it. Added the provisioning profile into Xcode. Verified that the certificate is correctly visible in Keychain Access (private key available). Attempted to build/publish the MAUI app to generate the .ipa file. Issue Whenever I run the publish command or build via Windows/macOS, codesigning fails with the following error: /usr/bin/codesign exited with code 1: Frameworks/libSkiaSharp.framework: replacing existing signature Warning: unable to build chain to self-signed root for signer "Apple Development: Created via API (8388XAA3RT)" Frameworks/libSkiaSharp.framework: errSecInternalComponent Failed to codesign 'PCS_EmpApp.app/Frameworks/libSkiaSharp.framework': Warning: unable to build chain to self-signed root for signer "Apple Development: Created via API (8388XAA3RT)" PCS_EmpApp.app: errSecInternalComponent Build eventually fails with: Build failed with 4 error(s) and 509 warning(s) Environment .NET: 9.0 MAUI: latest tools Xcode: 26.0.1 macOS: 26.0.1 Building for ios-arm64 (device) What I suspect It looks like the signer certificate might not be trusted, or the certificate chain cannot connect to an Apple root CA. But the certificate was created using the Developer website and appears valid. Need Help With Why is codesign unable to build the certificate chain? Do I need a different type of certificate? (App Store / Distribution vs Development?) Is there any special configuration required for MAUI apps using native frameworks like libSkiaSharp.framework? How can I successfully generate the .ipa file? Any guidance will be greatly appreciated. Thank you!
1
0
121
1w
Xcode is a mess!
After having used Obj-C and C++ for years, I recently (~6 months) moved to Swift, which is hard for me but most often sends less obscure error messages (not always). My trouble is 1- why is it soooooo long (sometimes up to 20s - that's horrible) to get an object's variables accessible in the debugger? 2- In Xcode 16 why is it no longer possible to arrange my files as I did before (organised into folders from within Xcode - horrible when you get a bigger and bigger project)? 3- Why has it become impossible to see the retention cycles and retaining objects from with the memoryGraph (it's worth ~nothing) now !
2
0
68
1w
Error in validating binary for the iPad multitasking
When I try to validate my app I get the following error: Invalid bundle. Because your app supports Multitasking on iPad, you need to include the LaunchScreen.storyboard launch storyboard file in your com.augmentedReality.virtualTags bundle. Use UlLaunchScreen instead if the app's MinimumOSVersion is 14 or higher and you prefer to configure the launch screen without storyboards. For details, see: https:// developer.apple.com/documentation/bundleresources/information_property_list/ uilaunchstoryboardname (ID: 236f630a-a014-48e8-910a-77d9c0ff6f51) What should I do to fix it? In the previous Xcode version and on another app it did not appear. MacBook Pro M5, Tahow 26.1, Xcode 26.1.1
1
0
34
1w