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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Xcode 16.3 repeatedly log causing CPU leak
Xcode 16.3 repeatedly logs a same message very frequently, as fast as a single thread can. I use Instruments and Console and find out the log is: Needs flush! by -[DNTBrotliDecoder decodeBytes:length:] in DNTDocumentationSupport. The call is on a single non-main thread. I've tried to clear caches and it seems doesn't change. Yet I don't know exact point when the logging starts since launch. Fortunately, this thread is dispatched at E cores, bringing approximately 2 watts of power load to my Mac. Environments: macOS 15.4 (24E248) Xcode 16.3 (16E140) M4 chip
7
3
210
3w
Objective-C headers build fine with swift but not with Xcode
On my M4 Mac running macOS 15.5 using Xcode 16.4 & Xcode CLT 16.4, Swift code in my Swift Package Manager 5.9 project (https://github.com/mas-cli/mas) builds fine against some included Objective-C headers via the following command line: swift build -c release But cannot find modules for the included Objective-C headers when building inside Xcode 16.4 or with the following command line on the same Mac: xcodebuild -scheme mas -configuration Release -destination platform=macOS,arch=arm64,variant=macos The error is: Sources/mas/AppStore/AppleAccount.swift:9:16: error: no such module 'StoreFoundation' How can I get Xcode / xcodebuild to work? Note that the project is normally built by running: Scripts/build which runs: swift build -c release after running the following script, which must be run before any build (swift, Xcode, or xcodebuild) because it generates a necessary file (Sources/mas/Package.swift): Scripts/generate_package_swift I've tried moving the Objective-C headers into include subfolders of their existing module folders, using double quotes instead of angle brackets for the #import statements, having module.modulemap files in the include subfolders or their parent module folder, and moving the module folders one level up the file hierarchy, to no avail. I've also tried various changes to the root-level Package.swift (not the generated one deeper in the hierarchy, which isn't inclined in the build configuration), like making separate library targets for each of the Objective-C modules, various swiftSettings & linkerSettings, etc. Maybe some of those changes would have helped, but maybe they were in incorrect combinations. Thanks for any help.
0
0
47
3w
Why is Xcode so slow and bad?
I just want to rant why is Xcode such a bad ide and I wish Apple can do a better job on Xcode. Here's why: The preview is so slow. Most of the times it's just faster for me to test on a real device. It is so slow, and many times I need to force quite after it's being unresponsive for sometimes. When I'm working on larger projects, the loading time becomes extremely slow especially when there's other clients that might be reading the same files like a Git client or simply iCloud. The breakpoint is so slow. I don't know why, is it an iOS thing? But when I'm on ASP.Net the breakpoints are super fast. For Xcode it takes a long time to pause and show data. It's so big I don't know why it is so hard for Apple to make their ide better. The community has been unsatisfied with Xcode for a long time. There's many tricks on the internet that you can find to help you resolve some issues with your project that's actually related to Xcode. Instead of using these tricks, Apple should just fix these issues. Learn from Intellij!
1
3
156
3w
LaunchServices has returned error -10810
M3 MBP running Sequoia 15.4.1 and Xcode 16.4 Mac is (old school) AD bound Mac is managed by Intune, and is set to allow apps to be run from anywhere. When we try to build and run anything in Xcode, we get the error in the title. Pertinent log entries: mcxalr{94} ** Denying execute for uid=1474851099 path=/Users//Library/Developer/Xcode/DerivedData/mactest2-gevqwurjuobygdaiwboubirauoxv/Build/Products/Debug/mactest2.app/Contents/MacOS/mactest2 If we run it from an AD account that is set up as a local admin, then we get the OS dialog saying: You don't have permissions to use the application "mactest2." For more information, contact the person who set up your account. If that user logs out, and we log in with a "true" local admin account (UID 501), then we get the same results, BUT the OS dialog gives us the option to grant access to the app. (for whatever reason, the auth dialog seems to be created by ScreenTime.) Signing is set up correctly, but we're not trying to distribute anything, just literally trying to run the generic "hello world" default macOS app project.
1
0
25
3w
Blocker: Registering simulator runtime with CoreSimulator failed.
Hello, FWIW I've been developing enterprise iOS apps going on 10 years and haven't seen a bug like this. It's a major blocker. Any advice is welcome. Pulled latest from my team's repository . I ran into a build issue. Reinstalled cocoa pods, resolved swift packages, cleared cache, and then tried to update my iOS simulators... Since then, everything is bricked. Can't side load an app or download a simulator. When I try to download simulator, as suggested by Xcode, I receive the following error: Registering simulator runtime with CoreSimulator failed. Domain: DVTDownloadableErrorDomain Code: 29 User Info: { DVTErrorCreationDateKey = "2025-05-28 19:18:13 +0000"; } Registering simulator runtime with CoreSimulator failed. Domain: DVTDownloadableErrorDomain Code: 29 Mount failed: SUIS premount dissented Domain: com.apple.CoreSimulator.simdiskimaged.SimDiskImageError Code: 10 Failure Reason: the operation is not appropriate (kDAReturnNotPermitted) System Information macOS Version 15.5 (Build 24F74) Xcode 16.3 (23785) (Build 16E140) Timestamp: 2025-05-28T14:18:13-05:00 I've restarted my Mac. I've cleared caches. I cleared project builds and all old simulators. I've reverted to much older previous commits after trying above just in case (even though I've verified no one else on my team is experiencing this issue). Nothing works. I found a post online and tried this command: xcrun devicectl manage ddis update Resulting in this: Host CoreDevice version: 443.19 13:57:32 Updating host DDIs. 13:57:32 Failed to update the host's developer disk images. ERROR: Failed to update developer disk images on the host. (com.apple.dt.CoreDeviceError error 12010 (0x2EEA)) ERROR: Request to update the host's developer disk images failed. (com.apple.dt.CoreDeviceError error 12013 (0x2EED)) ERROR: Failed to update developer disk images on the host. (com.apple.dt.CoreDeviceError error 12010 (0x2EEA)) ERROR: Failed to copy a developer disk image to the underlying system. (com.apple.dt.CoreDeviceError error 12009 (0x2EE9)) NSURL = file:///Library/Developer/CoreDevice/CandidateDDIs/iOS_DDI.dmg DeveloperDiskImageInstallLocation = file:///Library/Developer/DeveloperDiskImages_2D128D6A-770D-4040-8819-C611DC607098.staged/ ERROR: The developer disk image could not be staged on the host. (com.apple.dt.CoreDeviceError error 12045 (0x2F0D)) NSURL = file:///Library/Developer/CoreDevice/CandidateDDIs/iOS_DDI.dmg ERROR: The operation couldn’t be completed. StorageKit claimed that it mounted the disk image at the required path, but the item there is not a disk image. (NSPOSIXErrorDomain error 2 (0x02)) ExpectedMountPoint = /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/28C3C798-5FB7-45E6-A95C-4CC84A3D7851 NSLocalizedFailureReason = StorageKit claimed that it mounted the disk image at the required path, but the item there is not a disk image. NSURL = file:///Library/Developer/CoreDevice/CandidateDDIs/iOS_DDI.dmg NSLocalizedRecoverySuggestion = This is likely due to a software bug. Please file a bug report including a sysdiagnose. Also, here is the latest from my CoreSimulator logs: May 28 13:50:24 Mac com.apple.ibtool[3680] : Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode_16.3.app/Contents/Developer. May 28 13:52:10 Mac com.apple.CoreSimulator.simctl[4509] : Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer. May 28 13:52:44 Mac com.apple.dt.Xcode[948] : Adding runtime disk image '/System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/6fb1e5fe25ee1c372f7116516e615c556906bd4e.asset/AssetData/090-44150-318.dmg' error: Error Domain=com.apple.CoreSimulator.simdiskimaged.SimDiskImageError Code=10 "Mount failed: SUIS premount dissented" UserInfo={NSLocalizedDescription=Mount failed: SUIS premount dissented, NSLocalizedFailureReason=the operation is not appropriate (kDAReturnNotPermitted)} May 28 13:53:35 Mac com.apple.dt.Xcode[948] : Adding runtime disk image '/System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/6fb1e5fe25ee1c372f7116516e615c556906bd4e.asset/AssetData/090-44150-318.dmg' error: Error Domain=com.apple.CoreSimulator.simdiskimaged.SimDiskImageError Code=10 "Mount failed: SUIS premount dissented" UserInfo={NSLocalizedDescription=Mount failed: SUIS premount dissented, NSLocalizedFailureReason=the operation is not appropriate (kDAReturnNotPermitted)} May 28 14:21:02 Mac com.apple.dt.Xcode[948] : Adding runtime disk image '/System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/6fb1e5fe25ee1c372f7116516e615c556906bd4e.asset/AssetData/090-44150-318.dmg' error: Error Domain=com.apple.CoreSimulator.simdiskimaged.SimDiskImageError Code=10 "Mount failed: SUIS premount dissented" UserInfo={NSLocalizedDescription=Mount failed: SUIS premount dissented, NSLocalizedFailureReason=the operation is not appropriate (kDAReturnNotPermitted)} I appreciate any help. Thank you
1
0
56
3w
WatchOS app - installation not working
Hi everyone, I’ve been trying since yesterday to set up an Apple Watch app alongside my iOS app, but it’s not working at all. I created the app by adding a new target, selected watchOS > App, and linked it to my iOS project. When I run the Apple Watch scheme directly, the app works, but if I try to install it on my Apple Watch via the iOS app, it doesn’t work. Every time I tap install, I get a message saying that the installation failed. While reading the documentation, they mention an Info.plist file that is supposed to be generated with the watchOS app, but when I check, I don’t see any .plist file. Is that normal? Thanks for your help.
0
0
40
3w
Xcode JSONDecoder playground fails with 'The LLDB RPC server has crashed.
If I create a playground project that uses a JSONDecoder I get the following error. The LLDB RPC Server has crashed. The crash log is located at ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log. I have raised feedback for this, FB17702087, but I hope that there may be a workaround. The code I am using to try and get this to work is from The Apple Developer Documentation - JSON Decoder var greeting = "JSON Test 3" struct GroceryProduct: Codable { var name: String var points: Int var description: String? } let json = """ { "name": "Durian", "points": 600, "description": "A fruit with a distinctive scent." } """.data(using: .utf8)! let decoder = JSONDecoder() let product = try decoder.decode(GroceryProduct.self, from: json) print(product.name) // Prints "Durian" A screenshot of the playground showing the error The crash log (the file type has been changed to txt as ips file types cannot be selected for upload. lldb-rpc-server-2025-05-28-140832.txt
0
0
29
3w
Notification Content Extension on Simulator
Hello All, I see an issue while running the Notification content Extension on simulator without checking the "Copy only when installing in app target -> Build Phases -> Embed App Extensions" If I check "Copy only when installing in app target" then only it is working. Can someone please confirm if Notification Content Extension is working on simulator. If yes how can we do that. Please share the details
0
0
35
3w
AR Camera Freezes in Split View on iPad (Vuforia + Unity + iOS 16+)
Hi everyone, We're developing an AR app using Unity with Vuforia for object detection. Our app works well in full-screen mode, including detection and post-detection phases. However, we're facing a specific issue in iPad Split View multitasking mode. Problem: The AR camera (Vuforia-based) freezes during object detection if another app is opened in Split View. Post-detection, everything works fine in Split View. The problem only occurs during detection. Testing Environment: iPadOS 16+ Unity with Vuforia plugin Using EnableMultitaskingCameraAccess() method with AVFoundation to support camera multitasking AR scene is set up properly with detection capabilities in full-screen
0
0
27
3w
[Help] Xcode device debugging of iOS 18.4 / 18.5 is very slow, and it is suspected to be stuck in the stage of loading dynamic libraries in debugserver
Environment Xcode version: Xcode 16.0 iOS device system version: iOS 18.4 / 18.5 Problem description When debugging iOS 18.4/18.5 on a real device, the App starts very slowly after clicking Run, usually taking 2-3 minutes, which is much slower than iOS 18.3. It manifests as Xcode staying in the Launch stage for a long time, and the application stuck in the opening screen interface. Start the APP first, then attach the process, and this problem will not exist Location process Use lldb to enable logs log enable gdb-remote packets After observing the logs, it was found that: The jam mainly occurs when processing two data packets: jGetLoadedDynamicLibrariesInfos and qProcessInfo These two commands involve dynamic library loading information and process meta information, and the response time is much higher than the normal level, far exceeding other gdb-remote instructions Use Instruments / Profiler to analyze: The CPU peak of the real machine debugserver is concentrated in the dynamic library information loading process of _dyld_process_info_create Is there a way to deploy a modified debugserver on the real machine to further locate the problem How to enable and view the debugsever log to further locate the problem
0
0
40
3w
When I inherit from a class assigning SceneLocationView() sceneNode is nil
When I try to post a LocationAnnotations of a subclass respect to the one defining variable sceneLocationView, by way of: sceneLocationView.addLocationNodeWithConfirmedLocation(locationNode: bannerAnnotationLocation) When I enter in: public func addLocationNodeWithConfirmedLocation(locationNode: LocationNode) { if locationNode.location == nil || locationNode.locationConfirmed == false { return } updatePositionAndScaleOfLocationNode(locationNode: locationNode, initialSetup: true, animated: true) locationNodes.append(locationNode) print(sceneNode?.description ?? "nil") self.sceneNode?.addChildNode(locationNode) } I find sceneNode to nil, like if the effect of the renderer is lost when subclassing. I also tried to create a new variable in the subclass also assigning SceneLocationView(), but sceneNode remains nil. What to do to force it to assume a value?
1
0
29
3w
-Xlinker -reproducible flag breaks debug symbols for static library which object files has same name
Hi! For example i have library with structure like ModuleA/test.cpp, ModuleB/test.cpp, then i build it like: #Building library clang++ -c ModuleA/test.cpp -o ModuleA/test.o clang++ -c ModuleB/test.cpp -o ModuleB/test.o libtool -o module.a ModuleA/test.o ModuleB/test.o #Now reproducing build steps from Xcode #Compiling... clang++ -c main.cpp -o main.o #Linking... clang++ -Xlinker -reproducible -o main main.o module.a Now if we launch lldb main, we cant set breakpoint in file ModuleB/test.cpp, only in ModuleA/test.cpp, if link without -Xlinker -reproducible, both breakpoints working as expected. Also dsymutil completely delete symbols for "duplicate" library if link with reproducible flag. It's just example, in real static library i can't change behavior of building process, and can't change names of producing object files. Xcode always set -Xlinker -reproducible flag, and i don't know how to disable it, and my debugging process partially broken. ENV: macos: 15.4.1 Xcode: 16.2
4
0
135
3w
How do we build Intel compatible binary in Sequoia Xcode?
This is recipe I used to do. Create new project. eg. Storyboard, Objective-C Select Project, Go to Build Settings > Architectures Change "Build Active Architecture Only" to "NO". Build... Go to build directory and check with "lipo" command > lipo -info Products/Debug/my-test.app/Contents/MacOS/my-test Architecture in the fat file: Products/Debug/my-test.app/Contents/MacOS/my-test are: x86_64 arm64 This has been working for Sonoma. However, I followed the same procedure in Sequoia, (Sequoia 15.5 Xcode 16.2), it's showing arm64 only. Architecture in the fat file: Products/Debug/my-test.app/Contents/MacOS/my-test are: arm64 Does anyone have any idea how to build Intel compatible binary in Sequoia dev environment?
3
0
61
3w
How to trace/debug AU in Logic 11.1 on Arm?
Previously it was needed to attach XCode (16.3) to the AUHostingService. This does not show up in the list of attachable processes any more. Just attaching to Logic Pro skips all breakpoints. I am trying to debug output-configuration as Logic offers versions of our Plugin that employ mono outputs which we do not actually provide. Any hints how I can trace through the plug-ins init code??
1
0
37
3w
Canvas Preview error: Could not find target description
Hi, I'm developing an iOS/WatchOS app and have an issue with Preview for WatchOS components. The error message is Could not find target description for “ContentView.swift” Preview for all other views in the iOS app work fine. Also, the app builds and runs fine on the watch simulator and a physical watch. Preview worked fine earlier today and I didn't exclude it in EXCLUDED_SOURCE_FILE_NAMES. Does anyone have an idea what causes this issue? Diagnostics
0
0
39
3w
empty dSYM file detected - Xcode 16
Hi , I am currently encountering issues while running a Titanium application using Xcode 16. I would like to request your guidance on resolving the following problems: When running the Titanium app on a real device, I receive the following warning in Xcode and the app does not proceed beyond this point and the app is crashing on launch. warning: (arm64) /Users/Library/Developer/Xcode/DerivedData/Procedures-hamsarmfbtnowbcdocpmydtuafnp/Build/Products/Debug-iphoneos/Procedures.app/Procedures empty dSYM file detected, dSYM was created with an executable with no debug info. Thank you
1
0
52
3w
TestFlight version of Mac Multiplatform is on the wrong AppStore, but not the iOS TestFlight build
Hello, I'm sure I've probably missed a checkbox somewhere.. I have a mulitiplatform app, when building from Xcode, and not using the testing config, both iOS and macOS show the correct App Store currency.. When I distribute a build through TestFlight, my Mac version shows a different country/currency price (the US one). I can't find anywhere to change this. My Mac is signed into the same sandbox account as my iOS device. Can anyone help?
0
0
44
3w
xcode 16.3 now not selecting correct Signing Certificate with Automatically Manage Signing Selected
HI, I upgraded to macos 15.5 and xcode 16.3. Last year I was able to update one of my apps on the App Store without issues. Today, after a successful Testflight test, I now need to submit a new version of my app to the App Store for Distribution as the next version/build. However, when I configure a manual setting for the signing, I can select the correct choices. But when I click automatically manage signing, and choose the correct team, xcode put in the wrong signing certificate. It is choose a development one, and not the distribution one. I am concerned about this since I have read that when using the Archive tool, it choses the automatically manage signing by default. And that check box is selecting the "default" settings. I do not know where these default settings are being set, or how to fix this issue. I do not see any info in my searching up to this point. I hope someone can help. thank you, cc
0
0
60
3w