Posts under Developer Tools & Services topic

Post

Replies

Boosts

Views

Activity

Older Posts Code Blocks are broken
It appears that on older posts the code blocks are completely broken. For example https://developer.apple.com/forums/thread/678075 show the code block as a single inline value. Looking at the HTML this is what I see generated <code class="hljs block shell language-shell">Code Block shell#!/bin/bashrm -rf output/rm -rf simulator_fat/mkdir simulator_fatlibs=( "lib_static" ) #Add for i in "${libs[@]}"do lipo -create arm64_simulator/$i.a x86_64/$i.a -output simulator_fat/$i.a xcodebuild -create-xcframework -library simulator_fat/$i.a -library arm64/$i.a -output output/$i.xcframeworkdone</code> Obviously newer code blocks seem to be working (as long as the one above is) but it wreaks havoc trying to look at older posts.
3
0
121
2d
Xcode using too much memory when opening AI Panel
I pasted what ends up being too much log into the coding assistant and now every time I open up xcode and go to the AI coding panel it just runs until there's no system ram left. Is there a way to clear the cache and get rid of all of the data in the coding assistance so I can open the project again and use the coding assistant. Thanks, Rob
2
0
62
2d
Resolving Xcode Device Support File Download Issues: Domain Information or Alternative Solutions
I am currently developing iOS applications as part of my company's operations. Due to company policy, the Mac used for app development is subject to monitoring through TLS inspection. Since implementing TLS inspection, I've encountered an issue where the iPhone connected to the Mac does not appear in Xcode, and as a result, I'm unable to install the development app on the iPhone. After some investigation, I found that iPhones with pre-downloaded "device support files" are displayed in Xcode, while those without are not. This leads me to suspect that the TLS inspection is causing the failure in downloading the "device support files". To resolve this, I would like to exclude the domain accessed during the "device support files" download from TLS inspection. Could anyone provide information on the domain Xcode accesses to download these files? Alternatively, if you know of another method to resolve this issue, please share your solution. Environment: macOS Sequoia 15.5 Xcode 16.1
0
0
64
2d
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
0
0
100
2d
tvOS 26 + Xcode 26 debugger won't launch
I have been using tvOS 18 and Xcode 26 all summer without issue but since updating the tv to the latest tvOS 26 beta I am now unable to attach to debug builds. When using the Run button in Xcode the build completes, the tv screen goes black and then I see a warning in Xcode: Launching "App Name" is taking longer than expected. Do you want to continue to wait? LLDB is likely reading from device memory to resolve symbols. If I continue to wait after around 5 mins, in the Xcode console, I see: warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance. But the process on the tv hangs indefinately. Hitting stop in Xcode disconnects the debugger but the app then finishes launching successfully on the TV. Trying to use "Debug > Attach to process > [App Name]" once it is running also just hangs the app and waits until stopped. When stopping the hung debugger I see an Xcode error with the following: Could not attach to pid : “1222” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: internal error User Info: { DVTErrorCreationDateKey = "2025-09-01 09:51:54 +0000"; DVTRadarComponentKey = 855031; IDERunOperationFailingWorker = DBGLLDBLauncher; RawUnderlyingErrorMessage = "Xcode has killed the LLDB RPC server to allow the debugger to detach from your process. You may need to manually terminate your process."; } -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00008110-000240CE1A87801E"; "device_isCoreDevice" = 1; "device_isWireless" = 1; "device_model" = "AppleTV14,1"; "device_osBuild" = "26.0 (23J5348a)"; "device_osBuild_monotonic" = 2309534800; "device_os_variant" = 1; "device_platform" = "com.apple.platform.appletvos"; "device_platform_family" = 4; "device_reality" = 1; "device_thinningType" = "AppleTV14,1"; "device_transport" = 2; "launchSession_schemeCommand" = Run; "launchSession_schemeCommand_enum" = 1; "launchSession_targetArch" = arm64; "launchSession_targetArch_enum" = 6; "operation_duration_ms" = 76122; "operation_errorCode" = 3; "operation_errorDomain" = IDEDebugSessionErrorDomain; "operation_errorWorker" = DBGLLDBLauncher; "operation_error_reportable" = 1; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.appletvos"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 0; "param_diag_allowLocationSimulation" = 0; "param_diag_checker_mtc_enable" = 0; "param_diag_checker_tpc_enable" = 0; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 1; "param_diag_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 256; "param_lldbVersion_component_idx_1" = 0; "param_lldbVersion_monotonic" = 170300300002; "param_runnable_appExtensionHostRunMode" = 0; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "appletvos26.0"; "sdk_osVersion" = "26.0"; "sdk_platformID" = 3; "sdk_variant" = appletvos; "sdk_version_monotonic" = 2309534400; } -- System Information macOS Version 26.0 (Build 25A5349a) Xcode 26.0 (24208.14) (Build 17A5305k) Timestamp: 2025-09-01T10:51:54+01:00 I have another AppleTV still running on tvOS 18 and builds continue to run and attach fine there. I've tried rebooting the 26 beta AppleTV but I'm at a bit of a loss what else to try?
1
0
201
3d
Regarding the issue of Xcode not displaying Apple Watch devices
My version is iOS 18.6.2 (22G100), watchOS 10.6.1 (21U580), macOS 15.3.1 (24D70), Xcode Version 16.4 (16F6). My iPhone can connect to Xcode and complete app installation testing. I have connected the iPhone to Xcode via USB, and both the iPhone and Apple Watch have been set to trust this device. The iPhone has Developer Mode enabled, but I cannot find Developer Mode in the Privacy &amp; Security settings on the Apple Watch. As shown in the image, the Devices section in Xcode's Developer Documentation displays my iPhone but not the Apple Watch. However, the Open Console for the displayed iPhone shows my Apple Watch—actually two of them, though I only have one Apple Watch (the other might be from a previous backup). The iPhone app installs and tests normally, but the Apple Watch app cannot select a target device and fails to start installation. How can I resolve this issue?
1
0
151
4d
Xcode 26 - Create ML don't work
I tried using Create ML of Xcode 26.0 beta 7 to generate a model using the "Word Tagging" template, and I received the error: Training progress unavailable - Unexpected error. Using Create ML of XCode 16.4 with the same documentation, I was able to build the model and use it in a test app. I'd like to understand why Create ML of Xcode 26 no longer works.
0
0
75
4d
system crashed when run java
My book env: MacBook Air Apple M4 15.6.1 (24G90) I installed JDK hs_err_pid6813.log by sdkman and homebrew, but when I ran java, os crashed: /opt/homebrew/o/openj/libexec/openjdk.jdk/Contents/Home/bin | stable ./javac --verison ABRT | 12:32:20 # # A fatal error has been detected by the Java Runtime Environment: # # SIGBUS (0xa) at pc=0x000000010211b340, pid=7237, tid=9987 # # JRE version: (21.0.7) (build ) # Java VM: OpenJDK 64-Bit Server VM (21.0.7, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64) # Problematic frame: # V [libjvm.dylib+0x35f340] CodeHeap::allocate(unsigned long)+0x15c # # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /opt/homebrew/Cellar/openjdk@21/21.0.7/libexec/openjdk.jdk/Contents/Home/bin/hs_err_pid7237.log # # [1] 7237 abort ./javac --verison Does that mean I have to reinstall OSX?
2
0
392
5d
Dynamic Library and Unit Testing - Module not found
Hi! I must be missing something. I am creating a MacOS dynamic library using Xcode. I have created the library as follows: File->New Project then choose macOS 'Library' in Frameworks and Libraries. I give the Product Name "TestLib". Framework: STL (C++ Library) Type: Dynamic This creates a default library project, with one exported class 'TestLib'. There's a method "HelloWorld". And this suffices for my issue. To be able to test my dynamic library, I want to use an XCtest target. So in the project settings, I select '+', and add a 'Unit Testing Bundle': Product name: TestLibTests Language: Swift Testing System: XCTest Project: TestLib Target to be tested: TestLib I press finish, and my test target is created. Now, I think I need to have a module map. So I Add New File From Template', and choose 'Module Map'. A 'module.modulemap' is created. In the module map file, I name the module 'TestLib', and header 'TestLib.h'. So far, everything makes sense, and no errors. But here it comes... When I want to make a testcase, I need to import the module. I first built the dylib library, to make sure it's built without errors and exists. Then I switch to the TestLibTests target and want to write my first test. Simply creating an object from the TestLib class. For that, I have to import the module, so I write 'import TestLib' after the 'import XCTest' at the top. And here is where I'm stuck. No matter what I do, Xcode just gives me the error 'No such module TestLib'. This should just work, right? I should be able to unit test my library. I have spent 2 days reading the internet and trying many suggestions, but I just can't get it to work. I am currently working with Xcode 26 beta. But I tried with Xcode 16.4 and that has the same issue. What am I missing?
0
0
324
6d
Replace Apple Clang with Vanilla Clang, what can go wrong?
We are developing a cross platform c++ application. We also use some objective-c (no swift) and specific Apple frameworks like AVFoundation, CoreML in the MacOs version of our software. We use Apple Clang as compiler when building for MacOs. As our code is primarily c++ we would like to use the latest and greatest c++ 20 features. So we are looking into using vanilla clang instead, the builds with vanilla clang seem to work fine, however our concern is that we might have overlooked possible issues that could arise. So our question is whether there are specific things we need to address when switching compilers, are there things that we need to be aware of? In the end we just want to know if switching compilers won't cause problems we can't oversee. So we would like to know if others took the same steps and what your thoughts/experiences are regarding this?
1
0
55
6d
Where is the instruments command line tool?
I was reading through this documentation about instruments command line tool https://help.apple.com/instruments/mac/current/#/devb14ffaa5 and how it can be launched from the command line. However, unlike what the documentation states, there's no such instruments command anywhere on my macos M1 (OS version 15.6). That command gives: $> instruments zsh: command not found: instruments I do have XCode installed which has the Instruments.App (GUI app) but not the command line utility: $> ls Xcode.app/Contents/Applications/ ... Instruments.app Is that linked documentation up-to-date (it does say "latest" in the URL)? Is there some other way to install this command line utility?
3
0
102
6d
Xcode 26.0 beta 7 (17A5305k) / Window 'Device and Simulator' / top part is blurred and overblends important info and toggle
The window to show 'Simulators and Devices' does not show all relevant information about Simulator Devices. On top of the right window-pane the information about OS Version, name, etc is some kind cut off…strangely blurred > effect not readable/visible. Also the toggle is not clearly visible (but with good guess it is selectable). Appearance mode (light or dark) has no influence. Reduce Transparency or increase contrast also no effect. Got this issue since Xcode 26.0 (24198.5) (Build 17A5295f), and now in latest B7 still got this issue. Running macOS Tahoe 26.0 Beta (25A5349a) Does anybody else experience the same issue? Any workaround or fix known? Already filed Feedback: FB19671411
2
0
117
6d
Capturing the instruction trace from the ARM ETM
According to the ARM documentation for the CPU models available in Apple Silicon, the CoreSight implementation includes an Embedded Trace Macrocell which can perform a complete "Instruction Trace" (https://developer.arm.com/documentation/102119/0200/What-is-trace-). Although other operating systems such as Linux make this easy, we have not been able to find any tools or even a system-level API for accessing this feature of the ETM. In the "Instruments" window of Xcode 16+, there is a "Processor Trace" instrument, but this performs sampling and is totally unrelated to the Instruction Trace we need for debugging and analysis purposes. Because it produces a complete, contiguous sequence of branch instructions, the Instruction Trace is essential for identifying precise execution behaviors that are otherwise invisible to the developer. On other platforms, an alternative is debugger scripting, but we have found far too many bugs and reliability issues with the macOS implementation of lldb. Any suggestions would be greatly appreciated!
1
0
125
1w
No Update
My app will not open to myself or to clients and has a pop up that claims "App Outdated" The app version you are using is no longer supported. Please install he latest Heartland update through the App Store. However, there have been no updates to the app.
1
0
98
1w
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.
2
0
137
1w
What exactly an Xcode framework does?
I created 2 iOS projects in Xcode: Project 1: 4 targets (main app + 3 app extensions) 4 static libraries the main app's target dependencies include - 3 app extensions and the 4 libs. the main app's binary is linked to all 4 libs similarly, each extension is linked to all 4 libs Project 2: 5 targets (main app + 3 app extensions + 1 framework) 4 static libraries the main app's target dependencies include - 3 app extensions and the framework each extension is dependent only on the framework the framework's target dependencies include all the 4 static libs As per my understanding, the app bundle size for Project 2 should be less than that of Project 1, since we eliminate duplicating the static libs for each target by using a framework instead. However, I have found that the bundle size is more for Project 2 as compared to the bundle size of project 1. I do not understand, why?
3
1
171
1w