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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Unable to connect Xcode 16 Beta to iPhone
I am unable to connect iPhone to Xcode. Getting error - The developer disk image could not be staged on the host.; Couldn’t communicate with a helper application. Xcode - 16 Beta Mac OS - Sonoma 14.6.1 iOS - 17.6.1 VPN - No Details are as follows: The developer disk image could not be staged on the host. Domain: com.apple.dt.CoreDeviceError Code: 12045 Failure Reason: Couldn’t communicate with a helper application. User Info: { DVTErrorCreationDateKey = "2024-08-21 11:04:09 +0000"; DeviceIdentifier = "01162B62-9C06-48A4-B2F7-D17ABD2D35B0"; NSURL = "file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg"; "com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI; } -- Couldn’t communicate with a helper application. Domain: NSCocoaErrorDomain Code: 4099 Recovery Suggestion: Try your operation again. If that fails, quit and relaunch the application and try again. User Info: { NSDebugDescription = "The connection to service created from an endpoint was invalidated: failed at lookup with error 9 - Bad file descriptor."; } -- System Information macOS Version 14.6.1 (Build 23G93) Xcode 16.0 (23047) (Build 16A5221g) Timestamp: 2024-08-21T16:34:09+05:30 **Tried so far - ** Xcode Quit and Reopen Restart iPhone Restart Mac Reinstalling Xcode Reset Network Settings on iPhone Developer mode ON/OFF Unpair and Pair Again Clear Trusted Computers Tried with different iPhone Cables(Not needed one but tried) Factory Reset of iPhone Please guide how to resolve this.
1
0
322
Aug ’24
XCode 16 RC and Sequoia 15 RC - Running a XCTest UI test runs the test but does not open the simulator and initiating a record just hangs and never runs
When I run a XCTest test on an IOS Target device, the test runs but the simulator is not opened so I can follow the screens being displayed and the key strokes. And when I initiate a record for a test method, it just hangs and never runs or open a simulator. Is anyone else experiencing these same issues running XCTest? Is this legacy framework not working with XCode 16 by design?
3
1
294
3w
Project Navigator Broken in Xcode 16? Drag and Drop to Reorder Files Doesn't Work. "New Groups" Creates New Folders.
I just created a new project in the newest version of Xcode as a sample project for a feedback. Bug 1 So simply what I do in every new project is create a "Supporting Files" group (not a folder because I don't want to move these files on the file system). I put the following files in this group: .entitlements file -the Info.plist (which apparently new projects don't create anymore because I don't see one). main.m Assets.xcassets In previous version of Xcode this was done with the "New Group without Folder" action (though back in the day I believe you'd get yellow folders in "New Group" and blue folder with 'New Folder" and they were separate actions.... which was actually better and much less insane IMO but that's not really important to this). In any case, "New Group without Folder" is nowhere to be found in the context menu. I finally was able to get "New Group" to appear as long as I wasn't right clicking underneath any directory. But.... New Group actually creates a New Folder, just like New Folder. So I put the .entitlements in the Supporting Files group (which is not a group, but a directory) and the app won't compile unless I fix the path in project settings because I moved the file which is most definitely not what I wanted. So we can no longer group files in the project navigator without moving them to new directories? Is this intentional behavior? It can't be, right? Bug 2 I noticed dragging and dropping to reorder files in the project navigator no longer seems to work? In previous versions of Xcode I could drag and drop to reorder files (in groups and in folders, this would work). This appears to no longer work. I just have to accept the way Xcode orders my project files?
4
0
257
1w
MacOS SDK fails to compile
I am trying to compile a program that uses the MacOS SDK and it fails to compile. I haven't found any information online. I have tried to compile with both the MacOS 14 and 15 SDKs and they both fail. I get errors such as In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:20: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTLine.h:138:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'CFMutableStringRef'? CFAttributedStringRef attrString ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0)); Here is the full output: https://pastebin.com/raw/XvMn6S2w
0
1
80
1w
Class name duplication between core data and Apple private framework
After updating to Sonoma and Xcode 16, I get this when I run my macOS (objective C) app from Xcode: Class Trace is implemented in both /System/Library/PrivateFrameworks/AudioAnalytics.framework/Versions/A/AudioAnalytics (0x273300e68) and /Users/jean/Library/Developer/Xcode/DerivedData/STRyper-ezekeictrpwjnggxusdnbwqpzqtf/Build/Products/Debug/STRyper.app/Contents/MacOS/STRyper (0x10015b8f0). One of the two will be used. Which one is undefined. How do I solve this without changing the class name? Trace is a subclass of NSManagedObject. FYI, the core data model uses the "Xcode 8.0" tools version and the module of the class is set to "Global namespace". Changing the class name doing so would force me to create a new core data model, and mess with other things as I encode some core data objects to files using NSCoding (which uses class names). Thanks.
1
0
111
1w
After building the Watch app, Xcode prompted 'Could not install the preview host' test Watch App. app 'on Apple Watch Series 10 (46mm)
I don't know where the settings were set incorrectly. Unable to install and use applications in preview and virtual machines. I have tried many online methods but have not been able to solve it. It seems that the compiled app file cannot be found. The folder structure of Build is as follows: Build Intermediates.noindex Products Debug-iphonesimulator Debug-watchsimulator Thank you all for your assistance.
0
0
114
1w
Archive Failed On Xcode 16
I am using TXLiteAVSDK_Player package dependencies and now when I want to archive and distribute an app I get this two warnings : Upload Symbols Failed The archive did not include a dSYM for the TXFFmpeg.framework with the UUIDs [1xxxxxx]. Ensure that the archive's dSYM folder includes a DWARF file for TXFFmpeg.framework with the expected UUIDs. Upload Symbols Failed The archive did not include a dSYM for the TXSoundTouch.framework with the UUIDs [Axxxx]. Ensure that the archive's dSYM folder includes a DWARF file for TXSoundTouch.framework with the expected UUIDs. My system is macOS sonoma 14.5 and Xcode is 16.0. How can I eliminate this warning?
1
0
386
1w
error: unknown type name 'CFAttributedStringRef'
OS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:104:27: error: cannot combine with previous 'type-name' declaration specifier [OHOS ERROR] CFAttributedStringRef string ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0)); [OHOS ERROR] ^ [OHOS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:132:27: error: unknown type name 'string'; did you mean 'std::string'? [OHOS ERROR] CFAttributedStringRef string, [OHOS ERROR] ^ [OHOS ERROR] ../../prebuilts/clang/ohos/darwin-arm64/llvm/bin/../include/c++/v1/iosfwd:249:65: note: 'std::string' declared here [OHOS ERROR] typedef basic_string<char, char_traits, allocator > string; [OHOS ERROR] ^ [OHOS ERROR] In file included from ../../ide/tools/previewer/util/unix/ClipboardObjc.mm:18: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAccessibilityColor.h:9: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColor.h:46: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:10: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:10: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21: [OHOS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:132:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'? [OHOS ERROR] CFAttributedStringRef string, [OHOS ERROR] ^ [OHOS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here [OHOS ERROR] typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM; [OHOS ERROR] ^ [OHOS ERROR] In file included from ../../ide/tools/previewer/util/unix/ClipboardObjc.mm:18:
0
1
98
1w
Xcode 16 Error AppShortcut phrases may have at most one parameter
I suppose this is a bug in compiler. Xcode 16.0 (16A242d) - AppStore release version When building a project from Xcode 15 in Xcode 16, an error occurs: appintentsmetadataprocessor[12633:13677489] error: At least one halting error produced during export. No AppIntents metadata have been exported and this target is not usable with AppIntents until errors are resolved. AppShortcut phrases may have at most one parameter, but found phrase, "Set Dark Mode ${darkMode} for Widget ${widget}" with more than one parameter: darkMode, widget Apparently this is an Xcode bug because I have a production app with this AppShortcut and it works fine in Apple Shortcuts. Everything is made according to the official WWDC video about AppShortcuts https://developer.apple.com/videos/play/wwdc2022/10170
0
1
151
1w
SwiftUI [[stichable]] metal shader & CIFilter written in metal extern"C" can't work at the same time
In my project, I used two metal shaders in two ways. One is link to SwiftUI's modifier .colorEffect(ShaderLibrary.myShader()), which metal shader marked as [[stichable]]. Another one is a custom CIFilter, which kernel been written in external "C" closure. Because custom CIFilter must add build rules so Xcode can compile it, so I added -fcikernel to Metal Compiler and -cikernel to Metal Linker from Build Settings, just like Apple's document told me that. But the result is weird, if I add rules, custom CIFilter works, [[stichable]] shader doesn't work. if I delete rules, and comment out code of CIFilter(for avoiding warning), [[stichable]] shader works, but now I can't use my custom CIFilter. Actually, once these two shaders works well in my project, but when I updated Xcode from 15 to 16, it became weird, the 2 shaders can't exist at same time. Even though I go back to Xcode 15, I can't save them. I have no idea, please help, thank you. XCode 16 / iOS 18 on iPhone 14 Pro
2
0
169
1w
Swift Package with Demo project with Xcode 16
My current workflow to have a Swift Package with a Demo is like this: PackageFolder > DemoFolder I have a package, with a Demo folder inside. I can open the Demo project and Drag&Drop the local PackageFolder to override the remote dependency with the local one. This allows to edit the package while inside the demo project. With Xcode 16 this does no longer work because Xcode does not allow to drop an ancestor of the file path where the project is located. Xcode does not tell this while you drop, it just does not allow it. But it tells you thats the reason, when you try to add the local package as a dependency to the project: "The selected package cannot be a direct ancestor of the project.". (Dropping other local packages still works, see: https://forums.developer.apple.com/forums/thread/756824) What is the expected way to handle a package with a demo project with Xcode 16?
5
5
821
Jun ’24
Simulator iOS 15 Can't Response touch on Xcode 15.4
I have a problem with my xcode. I try to install apps xcodes to manage multiple xcode. My xcode version on 15.2(i try to run on iOS 15 SE1 it's no problem) and after that i try to install xcode 16 beta 3 i try to run iOS 15 SE1 the simulator blank. After that, i delete xcode 16 beta 3 and use xcode 15.2 i try to run on Simulator SE1 iOS 15 the simulator can't response touch. I try to trigger with Device menu on simulator Home, lock, trigger screenshot, etc. The simulator not response touch. How to solve this problem ? how to remove all simulator if uninstall xcodes.
6
5
579
Jul ’24
[WatchOS 11, Xcode 16] Can't get watch to appear in Xcode
This morning I bought my first-ever Apple Watch for the sole purpose of development and proceeded to spend six hours failing at the first step of development: getting the device to enter developer mode and connect to Xcode. Since I'm not seeing any WatchOS 11 posts on this issue, it might just be me. This is why I'm making a new thread that's specific to WatchOS 11, Xcode 16, and maybe Series 10. Some particulars for my case: Overall __Followed Xcode 16.0 documentation On a watchOS device that you use for development, go to Settings > Privacy > Developer Mode. To toggle Developer mode, use the Developer Mode switch. To pair an Apple Watch to a Mac, connect its companion iPhone to the Mac with a cable, and ensure that the iPhone is paired for development. After this step, follow any instructions on the Apple Watch to trust the Mac. When paired through an iPhone running iOS 17 or later, Xcode connects to the Apple Watch over Wi-Fi __Tried all the folk remedies listed in the (many) previous posts on enabling development mode and connecting to Xcode iOS 18.0 __In developer mode __Connected to macOS via USB, trusts computer WatchOS 11.0 __Prompt to trust computer appears and trust is established __‘Developer Mode’ list item never appears at end of the ‘Privacy’ menu under ‘Settings’ __‘Developer’ item sometimes appears at the end of ‘Settings’ Despite never having seen or toggled ‘Developer Mode’ under ‘Privacy’ Persists across reboots Possible that WatchOS 11 eliminated the item under Settings > Privacy? If so, documentation not up to date Xcode 16.0 __Watch never appears under ‘Manage Run Destinations’ After installing sample app to phone, then attempting to install WatchOS app via iOS Watch app, “Cannot install at this time” alert appears App icon appears on watch, and tapping on it leads to an alert with, “This app cannot be installed because its integrity could not be verified”, despite wi-fi working Watch apps for other apps (e.g. Apple Store) can be successfully installed via iOS Watch app Above suggests the watch isn't truly in developer mode despite Settings > Developer appearing and persisting across reboots __The network path from Xcode to WatchOS should be clear Reconfigured router such that devices on the same network can talk to each other iPad and iPhone appear with network icon when not connected via cable and Xcode can run code on them Watch on same network as iPad and iPhone macOS 15.0 __Due to security policy, cannot use Wi-Fi (disabled both physically and via sudo /usr/sbin/networksetup -setnetworkserviceenabled 'Wi-Fi' off) Possible that Xcode can only establish a connection to WatchOS via Wi-Fi and not via ethernet bridged to wifi. If so, a confirmation would be hugely helpful. This is currently my prime suspect. Wi-fi cannot be re-enabled, so I'm trying workarounds like connecting watch to phone's hotspot (doesn't work) and somehow using phone to provide network to the Mac. __Due to security policy, firewall configured to block all incoming connections Shouldn't be an issue since Xcode doesn't need incoming connections to see non-watch devices __Due to security policy, mDNSResponder and mDNSResponderHelper disabled Also shouldn't be an issue, but including just in case
1
1
261
1w
Could not build Module 'UIKit'
Im currentrly having this issue when compiling iOS for my react native app. The error is "Could not build Module 'UIKit'" which brings more subsequent errors down the line like "Could not build module 'DarwinFoundation'" and "Could not build module 'Foundation'. Might it be an error of dependencies or something like that. Im currently on MacOS sequoia, running XCode 16 and trying to build on iOS 18 with react native 0.75.3. For context, i inherited the project with React native 0.69.7 and had to upgrade. Please help, i've been stuck for days and i do not know what to do. Everything in the internet talks about XCode 16 beta but not the actual public release.
1
0
202
1w
Xcode 16 RC - Cannot add packages
When opening the package management sheet there is a loading indicator going forever preventing the button to be enabled. The window displays collections but not "Recently used" (which also loads indefinitely). Anyone else seeing this? Any way to clear Xcode preferences/caches for the manager?
7
3
401
3w
Build Errors for Reality Composer Pro Packages in Xcode 16 Beta 6 for iOS 18
Using Xcode 15.4, I have successfully built and run my app using Reality Composer Pro Version 1.0 package. I then successfully submitted that app version for release. Now, using Xcode 16 Beta 6, I've created a new branch repository for updating my app for iOS/iPadOS 18 and visionOS 2. However, once I created and switched to the new branch and did a build, I get build errors. It seems to be regarding the package manifest that relates to my Reality Composer Pro package that is part of my app. When I go to the package file in my project navigator and click the Open in Reality Composer Pro button, my package opens in Reality Composer Pro 2.0, which makes sense since it it the version for Xcode 16. However, I don't know how to address/get rid of the build errors. I've added and image of my build errors.
5
0
321
Sep ’24
How to (re)symbolicate crashlog in Xcode 16.0?
I got a crashlog of my iPad App from a user and now I have to find out where in the app the problem lies. I use Xcode Version 16.0 (16A242d) and then follow these steps: Attach an iPad Xcode -> Window ->Devices and Simulators Open Recent Logs Navigate to the .ips file Open it Result: I can see that the app exceeds the wall-clock allowance All calls of my app are not symbolicated. Question: How can I get Xcode to symbolicate the crashlog properly?
2
0
141
2w
(Sequoia) Are Xcode versions < 16 not-installable by design or bug?
Several of my colleagues had unfortunately autoupdated to Sequoia and were unable to run Xcode 15 as usual (we found a workaround by executing from inside the package content). I have instructed the rest of my colleagues from the organization to avoid updating to Sequoia for now. So my question is, is this intended and will this restriction persist for future versions of Sequoia or can we wait for an update to Sequoia that would "fix" this problem?
2
3
257
2w