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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Created

Live Activity Shows Only Black Dynamic Island UI (No Content Rendering) — Widget Extension Receives Updates but SwiftUI UI Is Empty
Hi all, very new "developer" trying to build my own app. The app works, just trying to improve it. I’m implementing a Live Activity in a widget extension (Swift/SwiftUI) for an app built with Flutter as the host app. ActivityKit is functioning correctly—activities start, update, and end normally, and the widget extension receives all state updates. However, the Live Activity UI renders as a completely black capsule (both compact and expanded Dynamic Island, as well as the Lock Screen presentation). The system shows the Live Activity container, but none of the SwiftUI content displays. Verified so far: ActivityAttributes contains at least one stored property (previously empty). ContentState fully Codable + Hashable. All Dynamic Island regions return visible test UI (Text/Image). No .containerBackground() usage. Added explicit .activityBackgroundTint() + system foreground colors. All Swift files included in widget extension target. No runtime errors, no decode failures, no SwiftUI logs. Widget previews work. Clean build, app reinstall, device reboot. Entitlements and Info.plist appear valid. Problem: The widget extension returns a completely black UI on-device, despite valid SwiftUI content in ActivityConfiguration. The Live Activity “shell” renders, so the activity is recognized, but the widget’s view hierarchy is visually empty. Question: Under what conditions would a widget extension produce a black, empty UI for a Live Activity even when ActivityKit, previews, and the SwiftUI layout are correct? Are there known cases where: Widget extension Info.plist misconfiguration, Incorrect background/tint handling, Rendering issues in Dynamic Island, Host app integrations (Flutter), Or extension isolation issues cause valid SwiftUI to fail to render in a Live Activity? Any guidance on deeper debugging steps or known system pitfalls would be appreciated.
3
0
103
3w
xcodebuild archive fail
Archive failing while executing command: xcodebuild -project Unity-VisionOS.xcodeproj -scheme Unity-VisionOS -destination generic/platform=xros archive -archivePath Unity-VisionOS.xcarchive -quiet > logs/visionos_archive.log Next error happens: 2025-11-18 15:33:12.161 ibtoold[56062:4395005] [MT] IBPlatformTool: *** Failed to launch tool with description <IBVisionPlatformToolDescription: 0x600003278380> System content for IBCocoaTouchFramework-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600003278400> scaleFactor=2x, renderMode.identifier=(null): Failed to find or create execution context for description '<IBVisionPlatformToolDescription: 0x600003278380> System content for IBCocoaTouchFramework-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600003278400> scaleFactor=2x, renderMode.identifier=(null)'. Device type: IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) Sim runtime: visionOS 2.1 (2.1 - 22N580) - com.apple.CoreSimulator.SimRuntime.xrOS-2-1 Device: (null) ** Please also include the output of `xcrun simctl diagnose` and `xcode-select -p`.: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime visionOS 2.1 (2.1 - 22N580) - com.apple.CoreSimulator.SimRuntime.xrOS-2-1 (Failure reason: Failed to create new simulator device in set SimDeviceSet : /Users/user/Library/Developer/Xcode/UserData/IB Support/Simulator Devices that matches IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) for runtime visionOS 2.1 (2.1 - 22N580) - com.apple.CoreSimulator.SimRuntime.xrOS-2-1 (Incompatible device). Available devices: ( "IBSimDeviceTypeiPad3x (D1B76A51-0DB5-439F-B65D-891AB20C2B26, iOS 18.1, Shutdown)", "IBSimDeviceTypeiPad2x (CA17569D-D3EA-4B11-A20D-3571D4A5E58A, iOS 18.1, Shutdown)", "IBSimDeviceTypeiPad2x (E3EE1BC6-2F2F-48D3-A378-A819824F7082, iOS 18.1, Shutdown)" )): Incompatible device /* com.apple.ibtool.document.warnings */ /Users/xcode_dir_path/xcode/LaunchScreen-iPhone.storyboard:global: warning: Compiling Interface Builder products for visionOS will not be supported in a future version of Xcode. [9] /* com.apple.ibtool.errors */ /Users/xcode_dir_path/LaunchScreen-iPhone.storyboard: error: Failed to find or create execution context for description '<IBVisionPlatformToolDescription: 0x600003278380> System content for IBCocoaTouchFramework-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600003278400> scaleFactor=2x, renderMode.identifier=(null)'. Device type: IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) Sim runtime: visionOS 2.1 (2.1 - 22N580) - com.apple.CoreSimulator.SimRuntime.xrOS-2-1 Device: (null) ** Please also include the output of `xcrun simctl diagnose` and `xcode-select -p`. Underlying Errors: Description: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime visionOS 2.1 (2.1 - 22N580) - com.apple.CoreSimulator.SimRuntime.xrOS-2-1 Failure Reason: Failed to create new simulator device in set SimDeviceSet : /Users/user/Library/Developer/Xcode/UserData/IB Support/Simulator Devices that matches IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) for runtime visionOS 2.1 (2.1 - 22N580) - com.apple.CoreSimulator.SimRuntime.xrOS-2-1 (Incompatible device). Available devices: ( "IBSimDeviceTypeiPad3x (D1B76A51-0DB5-439F-B65D-891AB20C2B26, iOS 18.1, Shutdown)", "IBSimDeviceTypeiPad2x (CA17569D-D3EA-4B11-A20D-3571D4A5E58A, iOS 18.1, Shutdown)", "IBSimDeviceTypeiPad2x (E3EE1BC6-2F2F-48D3-A378-A819824F7082, iOS 18.1, Shutdown)" ) Underlying Errors: Description: Incompatible device It appears when command was executed from TeamCity. And when it launches manually from console, it works fine. I tried reinstalling SDK, switching different Xcode versions, removing cache, clearing IB folder, nothing helps. xcrun simctl list command prints next: == Device Types == iPhone 17 Pro (com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro) iPhone 17 Pro Max (com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro-Max) iPhone Air (com.apple.CoreSimulator.SimDeviceType.iPhone-Air) iPhone 17 (com.apple.CoreSimulator.SimDeviceType.iPhone-17) iPhone 16 Pro (com.apple.CoreSimulator.SimDeviceType.iPhone-16-Pro) iPhone 16 Pro Max (com.apple.CoreSimulator.SimDeviceType.iPhone-16-Pro-Max) iPhone 16e (com.apple.CoreSimulator.SimDeviceType.iPhone-16e) iPhone 16 (com.apple.CoreSimulator.SimDeviceType.iPhone-16) iPhone 16 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-16-Plus) iPhone 15 Pro (com.apple.CoreSimulator.SimDeviceType.iPhone-15-Pro) iPhone 15 Pro Max (com.apple.CoreSimulator.SimDeviceType.iPhone-15-Pro-Max) iPhone 15 (com.apple.CoreSimulator.SimDeviceType.iPhone-15) iPhone 15 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-15-Plus) iPhone 14 Pro (com.apple.CoreSimulator.SimDeviceType.iPhone-14-Pro) ... Apple Vision Pro (com.apple.CoreSimulator.SimDeviceType.Apple-Vision-Pro-4K) Apple Vision Pro (com.apple.CoreSimulator.SimDeviceType.Apple-Vision-Pro) iPod touch (7th generation) (com.apple.CoreSimulator.SimDeviceType.iPod-touch--7th-generation-) == Runtimes == iOS 18.1 (18.1 - 22B81) - com.apple.CoreSimulator.SimRuntime.iOS-18-1 iOS 18.6 (18.6 - 22G86) - com.apple.CoreSimulator.SimRuntime.iOS-18-6 visionOS 2.1 (2.1 - 22N580) - com.apple.CoreSimulator.SimRuntime.xrOS-2-1 == Devices == -- iOS 18.1 -- iPhone 16 Pro (78683AE0-6238-4EF1-BD47-192FC0DC2559) (Shutdown) iPhone 16 Pro Max (98BFE915-787D-4673-991A-5D3EC448CC51) (Shutdown) iPhone 16 (D3E6FED8-9E65-4141-A31C-FC7EA3492111) (Shutdown) ... iPad mini (A17 Pro) (10F1862E-E27B-42C5-9B02-1FA71D2F4707) (Shutdown) iPad (10th generation) (E6E0D31F-91E4-4D3E-898D-516D79DDD58E) (Shutdown) -- visionOS 2.1 -- Apple Vision Pro (E4D22A75-A38E-4135-9152-EF4D64BEC3F2) (Shutdown)
0
0
80
3w
Failed to generate code coverage report on iPhone
Failed to generate code coverage report when doing Swift Testing on iPhone device, but it's ok in UI testing or running on "My Mac(Designed for iPad)". I have enable code coverage in test plan. My app can't run on simulator due to frameworks limitations. Platform: Mac mini M2 w/ macOS15.7, iPhoneXR 18.6.2 Xcode version: 26.1 & 16.0 error msg: Failed to download profiles from paths ["/private/var/mobile/Containers/Data/Application/76A1F9BC-98C8-4349-998B-0FC030DEE3EC/tmp/3A424286-872D-40AD-B4CA-65B232B57EB4"] on device 'iPhoneXR' for application with bundle ID 'xxx.xxxx.xxxx' to directory /Users//Library/Developer/Xcode/DerivedData/-bosqsqmqiqwweldrfrtgsfpnhroht/Build/ProfileData/00008020-00042C2A3E38002E: Failed to retrieve the file node for tmp/3A424286-872D-40AD-B4CA-65B232B57EB4. (Underlying Error: Failed to retrieve the file node for tmp/3A424286-872D-40AD-B4CA-65B232B57EB4)
0
0
65
3w
LLDB and environment variables in Xcode
Hey! I am writing type formatting scripts in Python for lldb, as described in https://lldb.llvm.org/use/variable.html#python-scripting. I'm trying to pass an environment variable to lldb from Xcode to determine the path to the scripts in the project root, so the project is not bound to some predetermined path. I am having trouble doing this in Xcode. What I have tried: lldbinit file Create a .lldbinit file in $(SRCROOT) with the following content: platform shell echo $SRCROOT. Set the path to the .lldbinit file in Edit Scheme... > Info > LLDB Init File ($(SRCROOT)/.lldbinit). Set the SRCROOT environment variable to $(SRCROOT) in Edit Scheme... > Arguments > Environment Variables. entry-point breakpoint Add a breakpoint to the entry-point of the application. Set the Automatically continue after evaluating actions option. Add the action platform shell $(SRCROOT) or platform shell $SRCROOT. Set the SRCROOT environment variable to $(SRCROOT) in Edit Scheme... > Arguments > Environment Variables. What I expect to happen: The first line of the debug console is a path pointing to $(SRCROOT) What actually happens: No path is output Is this functionality available in Xcode Version 26.0.1 (17A400)? Thanks in advance, Barnabas
3
0
211
3w
Unable to create SwiftUI previews in Xcode 26 for iOS 15.5
I am getting this error msg when I try to run a SwiftUI Preview on an iOS 15.5 simulator: Termination Reason: Namespace DYLD, Code 1, Library missing | Library not loaded: /usr/lib/swift/libswift_StringProcessing.dylib | Referenced from: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libLiveExecutionResultsLogger.dylib | Reason: tried: '/Users/hfg/Library/Developer/Xcode/DerivedData/Testios15sim-aawlbfbtggzozseoekycwwpadhrc/Build/Intermediates.noindex/Previews/iphonesimulator/Testios15sim/Products/Debug-iphonesimulator/libswift_StringProcessing.dylib' (no such file), '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswift_StringProcessing.dylib' (no such file), '/usr/lib/swift/libswift_StringProcessing.dylib' (no such file), '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 15.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libswift_StringProcessing.dylib' (no such file) FYI I tried with the Legacy Preview Execution both on and off
1
0
120
3w
I am unable to download any xcode component.
CRITICAL: iOS 26.1 Simulator Runtime (Build 23B86) Missing / MobileAsset Catalog Failing Summary After updating macOS and Xcode, I can no longer download or install the required iOS 26.1 simulator runtime. The Xcode Components system fails for all assets, and the MobileAsset catalog for iOS simulator runtimes appears to be missing or invalid. The runtime is also not listed on developer.apple.com. This issue blocks me from running any iOS simulators. Steps to Reproduce Update to: macOS 26.1 (25B78) Xcode 26.1.1 (24455 / 17B100) Open Xcode → Settings → Platforms/Components Attempt to download: iOS 26.1 Simulator Runtime Any other downloadable component (e.g., Predictive Code Completion Model) Alternatively, try using: xcodebuild -downloadPlatform iOS -exportPath ~/Downloads xcodebuild -downloadPlatform iOS -buildVersion 26 Observed Behaviour Xcode Components Downloads Fail Attempting to download the iOS 26.1 runtime results in: Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Additional detail: Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 And: Download failed due to a bad URL. Domain: com.apple.MobileAssetError.Download Code: 49 User Info: { checkConfiguration = 1 } Predictive Code Completion Model Also Fails The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.DownloadError error 2.) Domain: IDELanguageModelKit.IDEModelDownloadAdapter.DownloadError Code: 2 There was an error transferring over the network. Code: 2 CLI Downloads Fail Command: xcodebuild -downloadPlatform iOS -exportPath ~/Downloads Result: DVTDownloadable: Download Failed … iOS 26.1 Simulator (23B86) Command: xcodebuild -downloadPlatform iOS -exportPath ~/Downloads -buildVersion 26 Result: iOS 26 is not available for download. Runtime Not Listed on Developer Downloads The following page does not list iOS 26.1 simulator runtime: https://developer.apple.com/download/all/ Expected Behaviour Xcode should be able to fetch the MobileAsset catalog and download iOS 26.1 simulator runtime. The runtime should appear in the Components tab and on developer.apple.com/download/all/. CLI tools should successfully download the platform. System Information macOS: 26.1 (Build 25B78) Xcode: 26.1.1 (24455) (Build 17B100) Timestamp: 2025-11-17 Impact This issue currently prevents: Running any iOS simulator Testing or building on the required runtime Using other Xcode downloadable components (language models, etc.) This is a blocking issue for development. Notes Multiple Xcode reinstallations attempted macOS restarts performed Network connectivity normal Issue persists across all download methods (GUI + CLI)
0
1
107
3w
Can Live Activity Enable Continuous Nearby Interaction (UWB) in Background with Third-Party Accessories?
Hi, I'm working on an app that integrates third-party UWB accessories using the Nearby Interaction framework. I want to display real-time data via Live Activities, and ideally, I hope the app can continue ranging/interacting with the accessory even when it's in the background—triggering updates in the Live Activity. Specifically: Can I use Live Activity to keep Nearby Interaction sessions running in the background, as long as the accessory is still nearby and connected? Or do I always need to initiate sessions in the foreground? Are there ways to maintain or trigger new Nearby Interaction sessions entirely in the background, when using third-party UWB accessories? Is there any official guidance regarding permissions, user authorization requirements, or restrictions for background ranging with third-party hardware? Are there recommended strategies or patterns for updating Live Activity widgets with data from Nearby Interaction or UWB accessories while backgrounded? (e.g. Bluetooth triggers, push notifications, background tasks) Any advice, experiences, or official recommendations would be greatly appreciated! I want to ensure my implementation is compliant and offers the best possible user experience. Thanks!
0
1
58
3w
Xcode Behaviors are BROKEN
What possessed Apple developers to redesign the Behaviors UX? It is not as flexible, and at least Custom Behaviors do not work all the way through 26.2beta. You cannot name or rename behaviors. It just keeps "New Behavior." You cannot delete behaviors. Running shell scripts does not work. I gave up after that. Why was the Xcode 16 model changed and NOT TESTED!
2
0
110
4w
Failed to retrieve development teams for
Hey everyone, after signing in to my Apple Account in Xcode and I click on it, I keep getting the "Failed to retrieve development teams for xyz". I have a developer account (Individuals), however not paid one yet as I'm not that close to finish my app. I'm using the latest version of everything, signed out and back in multiple times from my accounts. Any idea why this is happening and how to fix it?
1
0
170
4w
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
90
4w
Xcode 26 | Coding Intelligence: Signing into ChatGPT Enterprise account yields error message
Hello, When trying to login into my ChatGPT Enterprise account within Xcode 26 to setup Coding Intelligence, after credentials and OTP have been accepted, I'm getting the following error message from ChatGPT/OpenAI: Route Error (400 ): { "error": { "message": "No eligible ChatGPT workspaces found.", "type": "invalid_request_error", "param": null, "code": "chatgpt_account_missing" } } What am I missing here? Any help is highly appreciated. Thank you!
0
0
63
Nov ’25
Xcode on external drive
Hello On Nov 11, 2025 I upgraded Xcode to 17B100 I found instructions to install it on an external drive because the old way of doing it (install to /Applications and move it to the desired location) didn't work. I downloaded the dmg, moved it to the external drive and the install worked I now have a usable Xcode sitting on my external drive The problem is, there are no simulators and the normal method of downloading them does not work. How do I install simulators (preferably on my external drive) for use by my externally installed Xcode (same drive)?
1
0
66
Nov ’25
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
294
Nov ’25
New Xcode lost support of old iOS versions
I cannot install ios device support using Xcode-Settings-> Components. I lost my support for my ios devices. My system ran low on disk space. All of a sudden my Schemes only show Get IOS support for my iPad and iPhone. Both devices run older ios versions : 18, 16. Any ways the Xcode-Settings-> Components just tries to force me to update ios. I don't want ios 26 yet as my app I developing does not play well with it. I may try the remove XCode, restart Mac and fresh install xcode 26 to see if this fixes it. Unpairing/Repairing devices to mac does not start the autodownload of the support files.
1
0
92
Nov ’25
Core audio for using to record Multitrack audio.
Hello, I’ve looked at a video and have tons of research and I’m trying to see if there is a way core audio can be created in Xcode as an audio device? “keep in mind” I am totally new to apple’s developer forums and I do not know anything about Xcode nor on how to create an audio device of coreaudio on a Mac since there’s a lot stuff that has do with coding. Nor am I good with that type of technology.
1
0
91
Nov ’25
In Simulator on status bar red banner with rdar:45025538
Out of nowhere I got some red banner on top of my iPhone 13 mini / iOS 17.5. I cannot pin point the root cause of this. What I can say is that it only happens to Simulators of a certain type, e.g. iPhone 12 and 13 mini, but not iPhone 14 for example. I have installed Xcode 26.1.0 and 26.1.1, out of which 26.1.0 is selected: $ xcode-select -p /Applications/Xcode-26.1.0.app/Contents/Developer And following runtimes: $ xcrun simctl runtime list == Disk Images == -- iOS -- iOS 17.5 (21F79) - CF933623-A258-44F8-B248-C0F25C0C343B (Ready) iOS 26.1 (23B80) - D11C3CDC-EE3D-44CC-8B92-9B7D00B54B0B (Ready) Total Disk Images: 2 (14.6G) Installing the newer 26.1 23B86 runtime doesn't help either.
7
0
273
Nov ’25