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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Precompile bridging header and compilation of any swift files that import that import my objective-c framework with modulemap runs every build
I have a project which is set up like so App.xcproject App target { Dependency on Bridges.framework } Bridges.xcproject Bridges.framework Bridges.framework has a bunch of Objective-c++ headers that import c++ headers/frameworks etc. It has a modulemap that allows it to generate bridging headers for the App target which is Swift only. I have noticed that every single build Planning Swift module App is run for 1 second, then Precompile bridging header is run for a moment, then every single swift file that imports Bridges recompiles regardless of if it had any edits taking about 2-3 seconds. It feels like since nothing has changed inside of Bridges that this bridging header precompile should not be necessary every single run. Bridges.framework is in General/Frameworks as "Do not embed" Bridges is in build phases "Target dependencies" and "Link binary with libraries" Is this just normal and I should let this slide or is there a way to avoid this?
2
0
52
3w
Making an xcode Run Script phase run when any file within a folder has changed
I have an Xcproject that I am using to define a .framework target that includes Objective-C++ bridges for a whole slew of C++ libraries. To bridge Objective-C++ to Swift code in a separate target, I am using a .modulemap file that I generate in a script. So we've essentially got App.xcproject App target { Dependency on Bridges.framework } Bridges.xcproject Bridges.framework { Dependency on generate-modulemap + a whole slough of c++ libraries } generate-modulemap It is VERY expensive for the Bridges framework to need to compile each build. The generation of the bridge static library takes 21 seconds, and the signing of it takes 32 seconds. I would like to get generate-module to have its RunScript phase run based on dependency analysis. This way a new modulemap is only made when there is a new header and I can avoid compiling the whole framework each build. Normally, I would just list all of the headers in the input list to the script, but in this case, the goal is more to have it be any file within that folder. However, it is very unclear how to do so. Is there a way to get the "based on dependency analysis" to go based on any file within a folder? A filelist does not work here because the filelist does not get updated automatically when you add a new header into that folder.
1
0
43
3w
Cannot load developer teams in Xcode.
Hi, The ui error says unable to login, but I'm able to login (because if I don't give the correct password it's a different error). When Xcode tries to fetch the available teams though it errors out. I can successfully login and access my teams on a different machine that's on the same network. So I know the account and network are fine. Here's what the ui shows .. and I'm also including the Xcode logs from Console. Any ideas? Thanks! xcode.log
1
0
49
3w
lldbinit file in Xcode
My ultimate aim is to be able to prevent Xcode from single-stepping into certain C++ functions - just as it does not single-step into std:: functions. It appears to be possible to arrange this by making a more elaborate version of an LLDB setting such as this: target.process.thread.step-avoid-regexp (regex) = ^std:: It also appears to be possible to put this setting into an "lldbinit" file so that LLDB (within Xcode) picks up the setting automatically when a debugging session starts. What I do not know is this: Where do I put the "lldbinit" file inside my project? What Xcode project or target settings need to be made to tell Xcode where to find my "lldbinit" file and use it?
2
0
68
3w
Predictive code completion model fails to download
Still getting the error message "Failed -- Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base.generic - no asset" Tried all the recommended solutions, toggling Apple Intelligence and Siri Toggling Value under "Editing" in settings: " check-box Predictive code completion" no help Still download fail with above message (plenty of disk space)
3
4
98
3w
Xcode 26.0 beta: Double-click in Navigator Doesn’t Open File in New Tab
Issue Report — Xcode 26.0 beta (17A5241e) In Xcode 26.0 beta, double-clicking a file in the project navigator does not open it in a new tab as it normally should. Instead, it opens the file in the current editor window. Interestingly, Option-clicking a file still opens it in a new tab as expected. I’ve confirmed that my Navigation preferences are properly set (see the attached screenshot), so this seems like a possible regression or bug in the current beta version.
1
1
81
3w
Enabling Main Thread Checker in Xcode May Cause Category Method Implementation Conflicts for UI-Related Classes
​Environment​: Xcode Version: 16.0 (latest stable release) iOS Version: 18.3.1 Devices: physical devices Configuration: Main Thread Checker enabled (Edit Scheme > Run > Diagnostics) ​Issue Description​ When the ​Main Thread Checker​ is enabled, methods defined in a UIViewController category (e.g., supportedInterfaceOrientations) fail to execute, whereas the subclass implementation of the same method works as expected. This conflicts with the normal behavior where ​both implementations should be called. ​Steps to Reproduce​ 1、Declare a category method in UIViewController+Extend.m: // UIViewController+Extend.m @implementation UIViewController (Extend) - (UIInterfaceOrientationMask)supportedInterfaceOrientations { NSLog(@"category supportedInterfaceOrientations hit"); return UIInterfaceOrientationMaskAll; } @end 2、Override the same method in a subclass ,call super methed(ViewController.m): // ViewController.m @implementation ViewController - (UIInterfaceOrientationMask)supportedInterfaceOrientations { NSLog(@"subclass called supportedInterfaceOrientations called"); return [super supportedInterfaceOrientations]; // Expected to call the category implementation } @end 3、​Expected Behavior​ (Main Thread Checker ​disabled): subclass called supportedInterfaceOrientations called category supportedInterfaceOrientations hit 4、Actual Behavior​ (Main Thread Checker ​enabled): subclass called supportedInterfaceOrientations called // category supportedInterfaceOrientations hit ​Requested Resolution​ Please investigate: 1、Why Main Thread Checker disrupts category method invocation. 2、Whether this is a broader issue affecting other UIKit categories.
1
0
40
3w
tvOS App Icon & Top Shelf Image
ISSUE: Warning: None of the input catalogs contained a matching App Icon & Top Shelf Image brand assets collection named "AppIcon" INFORMATION: So I currently have my app published and it works for iOS, and visionOS. (iPhone, iPad, Mac & Apple Vision Pro) There is one target for all OS versions. I have recently updated it to work with tvOS, however upon building I run into the warning listed at the top of this post. I have the following within the project: 'AppIcon.icon' (from the new icon composer for iOS, macOS and watchOS) And within .xcassets: 'AppIcon' (which contains the majority of the icons) 'Brand Assets' Folder (created by right click, tvOS, New tvOS App Icon and Top Shelf Image; which contains these icons in layers and the correct sizes) Brand Assets retains the names created by Xcode, App Icon - App Store, App Icon, Top Shelf Image Wide, Top Shelf Image In "General" in the target, I have AppIcon, still listed as the AppIcon name. Adding a second entry here for just tvOS does not resolve my issue, our could be that I do not what to call it so it can properly find it. QUESTION: What am I missing so that the build process detects these images properly and completes a successful build for tvOS? I am assuming I need to add options to the App Icons and Launch Screens area, but what is the name I place here for tvOS? SCREENSHOTS:
1
0
139
3w
How do I take an Icon Composer file and bring it into Xcode?
How do I take an Icon Composer file and bring it into Xcode? The WWDC 25 session video "Create Icons with Icon Composer", Delivery chapter (around 13:16) was not detailed enough on how to bring the file into Xcode so it will be used for the project. Once I've saved the Icon Composer file to Finder, where do I import/put it into my Xcode project. I have previous App Icon content in Assets. Do I add Icon Composer file content to Assets in Xcode? How do I make sure Xcode uses the new Icon Composer content in my Xcode project (for iOS) vs. the App Icon asset I currently use?
3
1
125
3w
App can't debug on iOS 26 device, but can on iOS 18
This is from Mac OS 26 or the prior version. It seems to be trying to include XCTest, but its no where in the build phases or frameworks? Anyone seen this issue? Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { DVTErrorCreationDateKey = "2025-06-11 15:28:16 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; NSURL = "file:///Users/ekaplan/Library/Developer/Xcode/DerivedData/dormway-mobile-feckueenojzruoaobakflnuqoglk/Build/Products/Debug-iphoneos/dormway-mobile.app"; } Unable to Install “DormWay” Domain: IXUserPresentableErrorDomain Code: 1 Failure Reason: Please try again later. Recovery Suggestion: Failed to iterate on macho slices for input file: /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Failed to iterate on macho slices for input file: /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Domain: MIInstallerErrorDomain Code: 73 User Info: { FunctionName = MIMachOFileIterateImageVersions; SourceFileLine = 129; } parse_macho_iterate_slices failed for /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Domain: NSPOSIXErrorDomain Code: 62 Failure Reason: Too many levels of symbolic links User Info: { FunctionName = MIMachOFileIterateImageVersions; SourceFileLine = 129; }
3
0
109
3w
Xcode 26 beta 1 failed compilation on std::tuple
Pasting compiler error below: /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:308:7: error: field has incomplete type 'void' _Hp _value; ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:466:14: note: in instantiation of template class 'std::__tuple_leaf<0, void>' requested here : public __tuple_leaf<_Indx, _Tp>... { ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:541:10: note: in instantiation of template class 'std::__tuple_impl<std::__tuple_indices<0>, void>' requested here _BaseT _base; ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:538:28: note: in instantiation of template class 'std::tuple' requested here class _LIBCPP_TEMPLATE_VIS tuple { ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:389:58: error: cannot form a reference to 'void' _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Hp& get() _NOEXCEPT { return _value; } ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:390:64: error: cannot form a reference to 'void' _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Hp& get() const _NOEXCEPT { return _value; } ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:585:83: error: cannot form a reference to 'void' _LIBCPP_CONSTEXPR_SINCE_CXX14 explicit(_Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> >::value) ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:538:28: note: in instantiation of template class 'std::tuple' requested here class _LIBCPP_TEMPLATE_VIS tuple { ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:597:83: error: cannot form a reference to 'void' _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit(_Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> >::value) ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:972:83: error: cannot form a reference to 'void' __enable_if_t< _And< _BoolConstant<_Np == sizeof...(_Tp)>, is_assignable<_Tp&, _Up const&>... >::value, int> = 0> ^ /Users/adam/Downloads/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/usr/include/c++/v1/tuple:983:89: error: cannot form a reference to 'void' __enable_if_t< _And< _BoolConstant<_Np == sizeof...(_Tp)>, is_assignable<_Tp&, _Up>... >::value, int> = 0>
1
0
93
3w
Failed to emit precompiled module in Xcode 26b1
I'm trying to bring up an existing macOS app workspace to build against the macOS 26 SDK, however Xcode 26b1 is producing the following error, and I'm unable to proceed: /Users/tonyarnold/Documents/Reveal/<unknown>:1:1: error reading '/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/module.modulemap': No such file or directory /Users/tonyarnold/Documents/Reveal/<unknown>:1:1: failed to emit precompiled module '/Users/tonyarnold/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/_Builtin_stdbool-LVR359SH1U4537HG9T3JOGN.pcm' for module map '/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/include/module.modulemap' I've checked and the module map that it claims is missing is there on the filesystem. Is this a known issue with this beta?
5
1
198
3w