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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Created

Frameworks and library dependencies
I have a framework, which depends on a library (GPGME) to do its actual encryption. As a consequence of using this external library, there are header files which have GPGME types in them... @interface E3Gpgme : NSObject ... /*****************************************************************************\ |* Call GPGME to sign \*****************************************************************************/ - (int) signWithMode:(gpgme_sig_mode_t)mode userId:(NSString *)signingKeyOrEmail srcStream:(E3Stream *)src dstStream:(E3Stream *)dst error:(NSError **)error; ... @end . This means the E3Gpgme class header file has to #import <gpgme.h> to get those type definitions. That is then proving problematic because the framework modularisation fails, with <e3gpgme.h> obviously not being a part of the framework, so the project refuses to build. I can see a few ways around this: Just don't run the modularisation check. That doesn't sound like a fantastic option import the GPGME headers (there's only 2) into the project and bundle them as if they were project ones. Again, not a great option, I don't expect GPGME to change its API but it runs the risk of there being a mismatch in future if the library code itself remains external. So what's the best-practice for requiring a dependency on a library, not a framework ? Is there a way to copy the library binary into a folder inside the framework folder and make sure you link with that ? Assuming that's the shared library it ought to still be ok for the LGPL licensing... Is there a better way ? I'm sure I'm not the first person to run into this :)
0
0
26
3w
Adding Github Account to Xcode
I've been trying to add my Github Account to Xcode, but even with my user name and access token, all I get is a spinning wheel. No error message, no feedback. Nothing. I'm going to do it from terminal but this seems just poor. Especially, since there's no feedback from XCode on what the problem is. Any help would be nice.
0
1
25
3w
Archiving Catalyst project that embeds macOS tool
Hi! I have a Catalyst app that embeds command line utility. So the project has two targets: Catalyst target, this target depends on #2 and embeds it into its bundle. macOS target, the command line tool. Both targets have package dependency to the same package. I used this to embed the CMD tool. Everything builds, runs and works fine until I try to archive the project. Archiving stops early with such error: error: Multiple commands produce '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' note: Target 'MacrosForSwift' (project 'MacrosForSwift') has a command with output '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' note: Target 'MacrosForSwift' (project 'MacrosForSwift') has a command with output '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' What I have tried to fix archiving: Changing PkgTestCMD target to be on Catalyst/iOS instead of macOS. This works but I'm not sure how to properly run CMD tool with iOS SDK (if this correct at all): I need the main thread to be 'unblocked' and be active while background tasks exist. Adding an aux framework that act as container for the package. Doesn't work. Splitting targets into different projects, making workspace and cross-project reference. Doesn't work. My understanding is that archiving attempts to produce .o files for both Catalyst and macOS simultaneously, due to PkgTest being Catalyst and PkgTestCMD being macOS targets. How to archive such a project? Is there a way to separate archiving of CMD and main app? Maybe separate .o files into different directories. Simple building and running the project works, why archiving doesn't want to? I have a test project for the issue: PkgTest. main branch is the source project, DepFramework contains attempt #2, Workspace—#3. Thank you!
2
0
134
3w
Not seeing any AI/Agent options in Xcode 26.3
I've installed Xcode 26.3 on Sequoia 15.7.3 but I'm not seeing any of the AI options showing in Xcode that I see in usage/example videos. For example that AI icon in the top left hand corner isn't visible, and if I select Settings there is no Intelligence section, yet there is in all the demo videos. Why am I not seeing any of these new features?
2
1
310
3w
Xcode 26.3 Codex Account just spinning
I have the new Xcode 26.3 running on an Intel MBP macOS 26.2 I have clicked to download Codex in the Xcode settings, then under the Intelligence section I select Codex but where it says "ChatGPT Account" there is a spinner that never ends. I suspect it is meant to show a Sign In button. I don't see any documentation to suggest this shouldn't work on Intel, so what gives? My "ChatGPT in Xcode" section is successfully signed in, and i've tried signing that out.
7
3
250
3w
Cannot preview in this file – SwiftUI Preview referencing deleted simulator
I'm running Xcode 26.2 (17C52). After deleting all simulators and creating new ones, SwiftUI Preview stopped working. Xcode reports: “Simulator [D774B214-XXXX-XXXX-XXXX-XXXXXXXX8288] failed to boot and may have crashed.” However, when I list all available simulators using xcrun simctl list, there is no simulator with that identifier. It seems Xcode is still referencing a previously deleted simulator. I have tried: Deleting all simulators again Creating new simulators Restarting Xcode and the system But the issue persists and Preview still fails to launch. Has anyone encountered this issue or knows how to clear the cached simulator reference used by SwiftUI Preview?
2
0
88
3w
Tahoe 26.2 and Xcode
I need to use Xcode version 16 for a college project. However, I cannot install it on my mac. M2Pro - ios Tahoe 26.2. Is there any workaround for this? Is my best option to downgrade to Sequoia? I'm a little apprehensive about this but willing to give it a try. Can anyone recommend a good, reliable video for this?
2
0
178
3w
How can I use private AI agents in Xcode 26.3?
I work on some proprietary codebases and can only use private AI services with them (currently MiniMax M2.1 and GLM 4.7). It all works great with both Claude Code and OpenCode agents, and I'd like to leverage the new agentic capabilities that are now in Xcode 26.3. I'm not seeing any option to connect to OpenCode, and both the Anthropic and OpenAI providers require an enterprise account (which I don't have access to). Are there any options that I'm missing here?
9
4
871
3w
Unable to commit changes
Hello! I started to develop a Mac application in Xcode 15, under MacOS 13. I made several commits in this environment. Later, I switched to another Mac and continued the development in Xcode 26.2, under MacOS 26. Since then, I haven't been able to make commits. I staged the changes, inserted the message, but the commit button is inactive (non-clickable), as shown in the picture. Can anyone help me to get it to work again? Thank you in advance.
2
0
92
3w
Using an API key with xcodebuild commands for Enterprise builds
Hey folks, Looking for some assistance with using an API key with xcodebuild commands to archive/export builds on our Enterprise developer account. The goal here is to allow Xcode to completely manage signing/certificates with our cloud distribution certificate, since these builds are happening in CI and we don't want to be manually handling user sessions/certificates on these machines. This is working great with our App Store account, but with our Enterprise account we're getting errors both archiving and exporting the builds. Here's an example of an export command that is giving errors: xcodebuild -exportArchive -exportOptionsPlist /path/to/exportOptions.plist -archivePath /path/to/archive.xcarchive -exportPath /path/to/export -authenticationKeyID *** -authenticationKeyIssuerID *** -authenticationKeyPath /path/to/key.p8 -allowProvisioningUpdates I've put some example values there, but we've double/triple checked the real values when this is actually running. These are the errors we're getting: 2026-02-02 12:30:04.022 xcodebuild[59722:1854348] DVTServices: Received response for 0794248F-E534-474D-ABBF-40C1375B6590 @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} 2026-02-02 12:30:04.173 xcodebuild[59722:1854348] DVTServices: Received response for 1D51FCD1-1876-4881-BE89-DD44E78EA776 @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} 2026-02-02 12:30:04.322 xcodebuild[59722:1854344] DVTServices: Received response for 25D7983F-1153-47C9-AE8A-03A8D10B6453 @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} 2026-02-02 12:30:04.483 xcodebuild[59722:1854344] DVTServices: Received response for 8A56C98B-E786-4878-856F-4D7E3D381DEA @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} error: exportArchive Communication with Apple failed error: exportArchive No signing certificate "iOS Distribution" found We get very similar errors when archiving as well. Are we doing something incorrect here? Is API key usage with xcodebuild not supported for Enterprise builds? Appreciate any help y'all can provide!
0
3
208
3w
LLDB assertion failure when debugging Swift app
While debugging a Swift application in Xcode, LLDB crashes with an assertion failure related to LLDBMemoryReader and pointer authentication. The issue occurs during normal debugging (e.g. inspecting variables or stack frames), and causes the debugger to become unusable. The error appears to be triggered inside the Swift language runtime reflection path in LLDB error: Assertion failed: (LLDBMemoryReader module to address map ran into pointer authentication mask!), function addModuleToAddressMap, file /AppleInternal/Library/BuildRoots/603ae698-b099-11ef-b64c-aabfac210453/Library/Caches/com.apple.xbs/Sources/lldb/llvm-project/lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp, line 537 Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0 LLDB 0x00000001240eb8f8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 40 1 LLDB 0x0000000123bbd0a8 lldb_private::lldb_assert(bool, char const*, char const*, char const*, unsigned int) + 184 2 LLDB 0x0000000123d5379d lldb_private::LLDBMemoryReader::addModuleToAddressMap(std::__1::shared_ptr<lldb_private::Module>, bool) + 477 3 LLDB 0x0000000123dbb733 lldb_private::SwiftLanguageRuntimeImpl::AddObjectFileToReflectionContext(std::__1::shared_ptr<lldb_private::Module>, llvm::SmallVector<llvm::StringRef, 1u>) + 1043 4 LLDB 0x0000000123dbc6de lldb_private::SwiftLanguageRuntimeImpl::AddModuleToReflectionContext(std::__1::shared_ptr<lldb_private::Module> const&) + 2766 5 LLDB 0x0000000123dc6d60 std::__1::__function::__func<lldb_private::SwiftLanguageRuntimeImpl::ProcessModulesToAdd()::$_0, std::__1::allocator<lldb_private::SwiftLanguageRuntimeImpl::ProcessModulesToAdd()::$_0>, bool (std::__1::shared_ptr<lldb_private::Module> const&)>::operator()(std::__1::shared_ptr<lldb_private::Module> const&) + 32 6 LLDB 0x00000001239bdad2 lldb_private::ModuleList::ForEach(std::__1::function<bool (std::__1::shared_ptr<lldb_private::Module> const&)> const&) const + 66 7 LLDB 0x0000000123dba72a lldb_private::SwiftLanguageRuntimeImpl::ProcessModulesToAdd() + 346 8 LLDB 0x0000000123dba0c9 lldb_private::SwiftLanguageRuntimeImpl::GetReflectionContext() + 57 9 LLDB 0x0000000123dd32e9 lldb_private::SwiftLanguageRuntimeImpl::BindGenericTypeParameters(lldb_private::StackFrame&, lldb_private::TypeSystemSwiftTypeRef&, lldb_private::ConstString) + 121 10 LLDB 0x0000000123dd3b8b lldb_private::SwiftLanguageRuntimeImpl::BindGenericTypeParameters(lldb_private::StackFrame&, lldb_private::CompilerType) + 347 11 LLDB 0x0000000123dc980d lldb_private::SwiftLanguageRuntimeImpl::GetSwiftRuntimeTypeInfo(lldb_private::CompilerType, lldb_private::ExecutionContextScope*, swift::reflection::TypeRef const**) + 621 12 LLDB 0x0000000123dcf9b1 lldb_private::SwiftLanguageRuntimeImpl::GetBitSize(lldb_private::CompilerType, lldb_private::ExecutionContextScope*) + 49 13 LLDB 0x0000000123dc332f lldb_private::SwiftLanguageRuntime::GetBitSize(lldb_private::CompilerType, lldb_private::ExecutionContextScope*) + 63 14 LLDB 0x0000000123fb0dd1 lldb_private::TypeSystemSwiftTypeRef::GetBitSize(void*, lldb_private::ExecutionContextScope*)::$_0::operator()() const + 689 15 LLDB 0x0000000123fb0aa8 lldb_private::TypeSystemSwiftTypeRef::GetBitSize(void*, lldb_private::ExecutionContextScope*) + 440 16 LLDB 0x0000000123aa9d61 lldb_private::CompilerType::GetBitSize(lldb_private::ExecutionContextScope*) const + 241 17 LLDB 0x0000000123aa9dc9 lldb_private::CompilerType::GetByteSize(lldb_private::ExecutionContextScope*) const + 9 18 LLDB 0x00000001239ef9e1 lldb_private::ValueObjectVariable::UpdateValue() + 241 19 LLDB 0x00000001239d9993 lldb_private::ValueObject::UpdateValueIfNeeded(bool) + 1011 20 LLDB 0x00000001239dac20 lldb_private::ValueObject::GetError() + 16 21 LLDB 0x0000000123868231 ValueImpl::GetSP(lldb_private::ProcessRunLock::ProcessRunLocker&, std::__1::unique_lock<std::__1::recursive_mutex>&, lldb_private::Status&) + 145 22 LLDB 0x000000012385cd28 lldb::SBValue::GetSP(ValueLocker&) const + 376 23 LLDB 0x000000012385dab9 lldb::SBValue::GetValueType() + 297 24 lldb-rpc-server 0x000000010f2f730a rpc_server::_ZN4lldb7SBValue12GetValueTypeEv::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 42 25 lldb-rpc-server 0x000000010f300749 rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 1337 26 lldb-rpc-server 0x000000010f304434 Packets::ProcessPackets() + 564 27 lldb-rpc-server 0x000000010f30418a Packets::ReadThread() + 314 28 lldb-rpc-server 0x000000010f304049 Packets::RunReadThread(void*) + 9 29 libsystem_pthread.dylib 0x00007ff81847018b _pthread_start + 99 30 libsystem_pthread.dylib 0x00007ff81846bae3 thread_start + 15 Please file a bug report against lldb reporting this failure log, and as many details as possibleerror: Assertion failed: (LLDBMemoryReader module to address map ran into pointer authentication mask!), function addModuleToAddressMap, file /AppleInternal/Library/BuildRoots/603ae698-b099-11ef-b64c-aabfac210453/Library/Caches/com.apple.xbs/Sources/lldb/llvm-project/lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp, line 537
1
0
80
3w
Help, I'm New and Lot
Hello, I created a code in Xcode on my Mac. Once it was debugged I tried to run it on a simulator. Every time I run it on a simulator I get the white screen with the spinning red box. I'm very new at this and I am creating this app for my own child. As a teacher I couldn't stand the other math fact apps. You'll have to talk to me like an infant.
1
0
135
4w
String Catalog stops updating upon changing source code
If you add a new string in your app (for example String(localized: "contact_support_message", defaultValue: "Please contact support")), then later you change that default value and rebuild, the string catalog updates to match as expected. But once that string is translated, changing the default value in code and rebuilding does not update the catalog. You seemingly have to go manually change the default value for English in the catalog to match the code (which marks the translation as Needs Review). Is there a better way? Or is there a way to determine what strings have default values in code that do not match the catalog values to see if any were missed as wording was tweaked over time?
3
0
150
Jan ’26