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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Created

Xcode is a mess!
After having used Obj-C and C++ for years, I recently (~6 months) moved to Swift, which is hard for me but most often sends less obscure error messages (not always). My trouble is 1- why is it soooooo long (sometimes up to 20s - that's horrible) to get an object's variables accessible in the debugger? 2- In Xcode 16 why is it no longer possible to arrange my files as I did before (organised into folders from within Xcode - horrible when you get a bigger and bigger project)? 3- Why has it become impossible to see the retention cycles and retaining objects from with the memoryGraph (it's worth ~nothing) now !
2
0
68
1w
macOS Simulator
Currently Xcode has iOS simulators that allow easily testing apps on older versions of iOS. It would be helpful if there was also a macOS simulator for testing apps on older versions of macOS. FB21229682 https://github.com/feedback-assistant/reports/issues/724
0
0
76
1w
Canvas fails with "Runtime Linking Failure" in Swift Package
I have a view inside a Swift Package that relies on an external Swift Package. My Preview Canvas breaks as soon as I use code from the external package: import ComplexModule // From swift-numerics import SwiftUI struct MyView: View { // Commenting out this line will make Previews work let number: Complex<Double> = 123 var body: some View { Text("Hello World") } } #Preview { MyView() } This is part of the error the preview emits: == PREVIEW UPDATE ERROR: GroupRecordingError Error encountered during update group #33 ================================== | [Remote] JITError: Runtime linking failure | | Additional Link Time Errors: | Symbols not found: [ _$sSd10RealModule0A0AAMc, _$s13ComplexModule0A0VMn, _$s13ComplexModule0A0V14integerLiteralACyxG07IntegerD4TypeQz_tcfC ] | | ================================== | | | [Remote] LLVMError | | | | LLVMError: LLVMError(description: "Failed to materialize symbols: { (static-MyTarget, { __replacement_tag$1 }) }") Did anyone else see this before?
1
0
99
1w
Why is SimulatorTrampoline taking TONS of memory?
This is a M4 iMac 32GB 2TB where over the last few months memory use has been crazy. The worst offender is SimulatorTrampoline. I just opened a default iOS app and ran it in a simulator. So this is as simple as it gets: there's 1 SF Symbol and "Hello, world!" text. iStatMenus shows SimulatorTrampoline at 10.7GB, Safari 5.2GB, Xcode at 3.2GB, and swap at 548MB meanwhile ActivityMonitor shows the top memory use of Ildb-rpc-server at 2.30GB, Xcode at 523.4MB Swap is 548MB is the only number that matches and the fact that Memory used is ~26GB total. Is this amount of memory use normal? Is iStat menu reporting something different than Activity monitor. This computer used to never swap. Any suggestions?
1
0
71
2w
Failed PLA Update Available
I am getting the following error: " Unable to process request - PLA Update available: You currently don't have access to this membership resource. To resolve this issue, agree to the latest Program License Agreement in your developer account." Seems to be straight forward enough but after agreeing to the updated PLA I still get the error..but weirdly only on one title and on one device. I can compile and run the app on my iPad, but it fails on the iPhone. Thoughts?
0
0
211
2w
SwiftUI Canvas
Hi everyone, I think this is a simple issue. I got the following error message" "PreviewDevice is ignored in a #Preview macro. Use the device picker at the bottom of the Canvas to change which device type is used for the preview. (from macro 'Preview')" after this line: ".previewDevice(PreviewDevice(rawValue: "iPhone 17 Pro"))" But in my Canvas I do not see the device picker. Thank you.
9
0
323
2w
Attributes inspector in Xcode 26
It has been two years since I wrote my a SwiftUI app, and I wanted to start again in Xcode 26. I can no longer see the attributes inspector when I select an element in the canvas. This was an Xcode feature that was very helpful as I am still a novice. Has this feature been deprecated in Xcode 26? And if not, please help explain how I can find and use it.
3
3
248
2w
Unity build error in Xcode - Undefined Symbols - Swift
This is using: **Unity 6000.2.7f - latest ARKit etc Xcode 26.1 ** This is going to iPad/iPhone/iOS and I have succesfully built to the iPad before, but updates to the software seem to have added these errors in. Basically all updated as much as possible. Originally I got 5 errors, but updates brought it down. On build I now get 3 undefined symbols: Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibility51 Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibility56 Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibilityConcurrency This appears to be a bug, or issue, that is in some way known, but I'm not sure how best to get past it. ld: warning: search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.1.324.0.kGuqPt/Metal.xctoolchain/usr/lib/swift/iphoneos' not found ld: warning: search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.1.324.0.kGuqPt/Metal.xctoolchain/usr/lib/swift-5.0/iphoneos' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibility51': library 'swiftCompatibility51' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibility56': library 'swiftCompatibility56' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency': library 'swiftCompatibilityConcurrency' not found ld: warning: Could not find or use auto-linked library 'swiftCompatibilityPacks': library 'swiftCompatibilityPacks' not found ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found ld: warning: Could not find or use auto-linked framework 'UIUtilities': framework 'UIUtilities' not found ld: warning: Could not parse or use implicit file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it Undefined symbols for architecture arm64: "_swift_FORCE_LOAD$_swiftCompatibility51", referenced from: _swift_FORCE_LOAD$swiftCompatibility51$_UnityARKit in libUnityARKit.a[49](RoomCaptureSessionWrapper. o) "_swift_FORCE_LOAD$_swiftCompatibility56", referenced from: _swift_FORCE_LOAD$swiftCompatibility56$_UnityARKit in libUnityARKit.a[49](RoomCaptureSessionWrapper. o) "_swift_FORCE_LOAD$_swiftCompatibilityConcurrency", referenced from: _swift_FORCE_LOAD$swiftCompatibilityConcurrency$_UnityARKit in libUnityARKit.a[49](RoomCaptureSessionWrapper. o) ld: symbol(s) not found for architecture arm64 clang++: error: linker command failed with exit code 1 (use -v to see invocation)
0
1
169
2w
CoreNFC / NFCTagReaderSession Availability on iPad
Hello, I am currently working on a project that requires the use of the NFCTagReaderSession API to perform read and write operations on NFC tags (ISO15693 and other standard NFC tag types). According to the Apple documentation, CoreNFC and NFCTagReaderSession are fully supported on iPhone devices. However, the behavior and availability on iPad devices are not clearly documented. I would like to request clarification on the following points: Is NFCTagReaderSession officially supported on iPad devices? We have verified that some iPad models equipped with NFC hardware still do not expose support for this API. Is there an up-to-date list of iPad models that support CoreNFC? The documentation currently mentions only “iPhone 7 or later,” with no reference to iPad models. Does Apple plan to enable NFCTagReaderSession on iPad in the future? This information is important for our product roadmap, as several of our deployments rely on tablets. Our goal is to determine whether NFC tag read/write operations are intended to be available exclusively on iPhone, or whether there are existing or upcoming iPad models that will support CoreNFC as well. Thank you in advance for your support and for any clarification you can provide. Kind regards,
1
0
119
2w
Mergeable Library Bundle Hooking Does Not Work When Frameworks Is Merged Into Container Framework
Problem When we merge FeatureModuleA.framework into IntegrationContainer.framework instead of HostApp_Main.app, the magic method Bundle(for: FeatureAProvider.self) does not work and this will trigger crash. When FeatureModuleA is merged into HostApp, Bundle(for: FeatureAProvider.self) will return: HostApp_Main.App/Frameworks/DomainFeatureA.framework instead of HostApp_Main.App/, although the FeatureAProvider class is actually in the merged main app binary So we can use the returned FeatureModuleA bundle get the nested resource. If we merge the frameworks into our IntegrationContainer.framework, the result will be: for release: PrototypeApp.app for debug: PrototypeApp.app/Frameworks/IntegrationContainer.framework/ReexportedBinaries/DomainFeatureA.framework Apple has not considered the case that frameworks are merged into independent framework. And other methods like bundle(for: identifier) does not work for both destination cases: merge into main app or a container framework.
0
0
29
2w
Unable to Generate .ipa for .NET MAUI iOS App – Codesign Fails With “unable to build chain to self-signed root”
Hi everyone, I am trying to generate an .ipa file for my .NET MAUI (net9.0-ios) application, but every attempt fails with the same codesigning error. I have tried multiple approaches, including building from Windows paired to macOS, and directly building through the macOS terminal, but nothing is working. Below are the exact steps I followed: Steps I Performed Generated the Apple Development certificate using Keychain Access on macOS. Added that certificate into my developer account and created the corresponding provisioning profile. Created an App ID, attached the App ID to the provisioning profile, and downloaded it. Added the provisioning profile into Xcode. Verified that the certificate is correctly visible in Keychain Access (private key available). Attempted to build/publish the MAUI app to generate the .ipa file. Issue Whenever I run the publish command or build via Windows/macOS, codesigning fails with the following error: /usr/bin/codesign exited with code 1: Frameworks/libSkiaSharp.framework: replacing existing signature Warning: unable to build chain to self-signed root for signer "Apple Development: Created via API (8388XAA3RT)" Frameworks/libSkiaSharp.framework: errSecInternalComponent Failed to codesign 'PCS_EmpApp.app/Frameworks/libSkiaSharp.framework': Warning: unable to build chain to self-signed root for signer "Apple Development: Created via API (8388XAA3RT)" PCS_EmpApp.app: errSecInternalComponent Build eventually fails with: Build failed with 4 error(s) and 509 warning(s) Environment .NET: 9.0 MAUI: latest tools Xcode: 26.0.1 macOS: 26.0.1 Building for ios-arm64 (device) What I suspect It looks like the signer certificate might not be trusted, or the certificate chain cannot connect to an Apple root CA. But the certificate was created using the Developer website and appears valid. Need Help With Why is codesign unable to build the certificate chain? Do I need a different type of certificate? (App Store / Distribution vs Development?) Is there any special configuration required for MAUI apps using native frameworks like libSkiaSharp.framework? How can I successfully generate the .ipa file? Any guidance will be greatly appreciated. Thank you!
1
0
121
2w
How to stop Xcode for sending me reminders about Coding Intelligence?
Once in a while I get from Xcode a reminder to test Coding Intelligence. I am today not interested in Coding Intelligence and it's unlikely that I will be in the future. Therefore, I would like to get rid of these for me useless reminders to activate Coding Intelligence. I have not found anywhere anything for doing so. Or do I get rid of the reminders when activating it and deactivating it immediately again (if this is possible)?
0
0
104
2w
Crashing build when testing my app
The Test target not build for not such file or directory: 'CoreGraphics'. Not sure why I get this error, but I configured the target without forgetting the variables BUNDLE_LOADER with $(BUILT_PRODUCTS_DIR)/MyExistingApp.app/MyExistingApp value and TEST_HOST with $(BUNDLE_LOADER) value. App target (not the test target), the Symbols Hidden by Default build setting its equal to NO, unlike the Test target that is set to YES. Any variable more for this? I'm not sure if I should take anything into account when using Xcode 26.1.1 and Swift Testing framework.
1
0
182
2w
Unable to Download iOS Simulator Runtime 26.1 on Xcode — Bad URL Error (Code 49)
Hi everyone, I’m experiencing a persistent issue when trying to download the iOS Simulator Runtime 26.1 on Xcode (version 26.1). The download always fails with the following error Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 49 I’m located in Brazil, so I initially thought it might be region-related, but I’ve already tried several attempts to fix it, including: Using VPNs for the US and Europe Installing the Xcode 26.2 beta Downgrading Xcode to earlier versions Reinstalling the same version of Xcode Restarting Xcode and my Mac Switching networks Clearing simulator support/device files Unfortunately, nothing has resolved the issue. Is anyone else facing this problem? Does anyone know a workaround or a manual way to download/install the iOS 26.1 simulator runtime? Thanks in advance!
2
1
374
2w
How to find the call site for incomplete completions in a stopped app?
I am fixing bugs / extending a macOS app written by somebody else in Swift. I’ve made changes to it and debugging it, so breakpoints/rebuilding/debug print/change/rerun it isn’t a problem. But it is a multi-threaded, async app, and when I pause the running app, it will not display source code location in each thread where it is. I only get assembly. [and, yes, "Always Show Assembly" in OFF] It is inherent to async apps and threading that they spend most of their time waiting for the user to do something. Hence if you stop an app, you’ll almost always be in system code somewhere. But I think wanting to see the origin of completions that are pending is a legitimate question for somebody debugging (and trying to understand how the app works). Am I not aware some feature in Xcode / LLDB to reveal this?
0
0
97
2w