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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

JSON Tutorial
HiSuppose i made a macOS App and want to connect to Oracle or mySQL Database I heard best way is using JSON which i dontknow anything about it, where can I find good reading about it thats specifically related to macOS or iOS Apps ?--Kindest Regards
3
0
435
1d
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
74
2d
Team “57AWJ345M2” cannot enable iCloud Key-Value Storage for Bundle ID “com.marsgame.fg2”
When using Team “57AWJ345M2” and setting the project’s Bundle ID to “com.marsgame.fg2”, enabling the iCloud capability and checking Key-Value Storage results in the following error:"Provisioning profile "iOS Team Provisioning Profile: com.marsgame.fg2" doesn't match the entitlements file's value for the com.apple.developer.ubiquity-kvstore-identifier entitlement." This issue does not occur if we use a different Team or a different Bundle ID. The project was transferred from another Team to this new Team, and everything worked fine before the transfer. Additionally, we have tried creating a brand new project, but as long as we use this same Team and this same Bundle ID, the error still occurs when enabling Key-Value Storage.
4
0
147
2d
Host Card Emulation (HCE) not valid
Provisioning profile doesn't match the entitlements file's value for the com.apple.developer.nfc.hce.iso7816.select-identifier-prefixes entitlement. Although when we created the request, we added a list of AIDs which is the same as the list registered in Inof.plist <key>com.apple.developer.nfc.hce.iso7816.select-identifier-prefixes</key> <array> <string>XXXXXX</string> <string>XXXXXX</string> <string>XXXXXX</string> </array> How can we get a better message of diffs between them?
1
0
104
3d
MetalToolchain download fails on macOS 26.2, build 17C48 catalog error
Without this, I can't install/open Unreal Engine on my iMac OS 26.2 Tahoe. I can't even download the Metal Toolchain in Xcode-Settings-Components. It fails every time. when I try to open Unreal Engine, it says this: Xcode Metal Compiler error: error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain But every time I try to download Metal Toolchain in terminal, it says this: xcodebuild: error: Failed fetching catalog for assetType (com.apple.MobileAsset.MetalToolchain), serverParameters ({ RequestedBuild = 17C48; }) % sudo xcode-select --reset xcrun -f metallib Password: xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find metallib 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory) xcrun: error: unable to find utility "metallib", not a developer tool or in PATH
1
0
95
4d
The identity used to sign the executable is no longer valid
Hi there, When I deploy my app to the iPhone for testing, I get the following error: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.4gpZFc/extracted/c_mll.app : 0xe8008018 (The identity used to sign the Please ensure that the certificates used to sign your app have not expired. If this issue persists, please attach an IPA of your app when sending a report to Apple. executable is no longer valid.) My account was mistakenly deactivated by Apple last month. After appealing, Apple restored it at the end of last month. Currently, my Apple Developer account seems to be working fine. Today, I recreated the developer certificate and identifier, added the account in XCode, everything seemed fine, and I clicked the XCode button (Start the active scheme). The build was successful, but I got the error: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.4gpZFc/extracted/c_mll.app : 0xe8008018 (The identity used to sign the executable is no longer valid.) Both my certificate and identifier were created just a few hours ago and show no issues. Before my account was deactivated, everything was working fine. I used a regular non-Apple developer account in XCode and performed the same steps, and it worked fine. I looked at relevant posts on the forum and tried the suggestions, but none of them solved my problem.
7
0
375
4d
Code Signing Issue with Apple Developer Account (IXUserPresentableErrorDomain, Code: 14)
Hi, I am reaching out to seek assistance with a persistent code signing issue that is preventing our team from installing our iOS app, "Scoopz" (https://apps.apple.com/us/app/scoopz-real-life-real-video/id6449206831) on physical devices. We suspect there may be an issue with our Apple Developer account, as we have exhausted all standard troubleshooting steps without success. Below, I’ve provided details about the issue, the error logs, and the steps we’ve taken. Issue Description: When attempting to install the app on an iPhone using Xcode, we encounter the following error: Unable to Install “Scoopz: Debug” Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to verify code signature of /[REDACTED_PATH]/OurApp.app : 0xe8008018 (The identity used to sign the executable is no longer valid.) The app builds successfully to the iOS Simulator and can be released to the App Store without issues, but it fails to debug on physical devices. Steps Taken: Our team has attempted the following troubleshooting steps without resolving the issue: Verified that our Apple Developer account is active and our team membership is valid. Checked certificates in Keychain Access and the Apple Developer Portal, ensuring they are not expired or revoked. We created and installed new Apple Development certificates. Confirmed that the provisioning profile includes the target device’s UDID, is associated with a valid certificate, and is not expired. We regenerated and reinstalled the profile. We tried both xcode managed and manually installed profiles. Cleaned the Xcode build folder, deleted the app from the device, and rebuilt the project. Despite these efforts, the issue persists across our entire development team, leading us to believe there may be a problem with our Apple Developer account or its associated certificates/profiles. Request for Assistance: We kindly request your help to: Investigate any potential issues with our Apple Developer account that could be causing this code signing error. Verify the status of our certificates and provisioning profiles on Apple’s servers. Provide guidance on any additional steps or configurations needed to resolve the error. If necessary, suggest how we can escalate this issue for further investigation. Full error log: Unable to Install “Scoopz: Debug” Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to verify code signature of /[REDACTED_PATH]/OurApp.app : 0xe8008018 (The identity used to sign the executable is no longer valid.) Please ensure that the certificates used to sign your app have not expired. If this issue persists, please attach an IPA of your app when sending a report to Apple. User Info: { DVTErrorCreationDateKey = "2025-08-20 23:50:11 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; } Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { *** } Unable to Install “Scoopz: Debug” Domain: IXUserPresentableErrorDomain Code: 14 Failure Reason: This app cannot be installed because its integrity could not be verified. Recovery Suggestion: Failed to verify code signature of /[REDACTED_PATH]/OurApp.app : 0xe8008018 (The identity used to sign the executable is no longer valid.) Failed to verify code signature of /[REDACTED_PATH]/OurApp.app : 0xe8008018 (The identity used to sign the executable is no longer valid.) Domain: MIInstallerErrorDomain Code: 13 User Info: { FunctionName = "+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]"; LegacyErrorString = ApplicationVerificationFailed; LibMISErrorNumber = "-402620392"; SourceFileLine = 78; } Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "-*********"; "device_isCoreDevice" = 1; "device_model" = "iPhone16,2"; "device_osBuild" = "17.1 (21B80)"; "device_platform" = "com.apple.platform.iphoneos"; "device_thinningType" = "iPhone16,2"; "dvt_coredevice_version" = "397.21"; "dvt_coresimulator_version" = 987; "dvt_mobiledevice_version" = "1784.101.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 4926; "operation_errorCode" = 14; "operation_errorDomain" = IXUserPresentableErrorDomain; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_mtc_enable" = 1; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos18.0"; "sdk_osVersion" = "18.0"; "sdk_variant" = iphoneos; } System Information macOS Version 15.4.1 (Build 24E263) Xcode 16.0 (23051) (Build 16A242d) Timestamp: 2025-08-20T16:50:11-07:00
3
3
309
4d
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?
1
0
145
5d
Apple watch Xcode pairing & connection issues
I’m blocked debugging a watchOS app on a physical Apple Watch. The iPhone connects to Xcode normally (wired), but the Watch either fails to connect with a tunnel timeout or disappears entirely from Xcode after I unpaired it inside Devices & Simulators. Environment Mac: macOS 26.x (Apple Silicon Mac) Xcode: 26.2 iPhone: iOS 26.1 Apple Watch Ultra: watchOS 26.2 (build 23S303) Connection: iPhone connected to Mac via USB (trusted). Watch paired to iPhone and working normally in the Watch app. Issue A (when Watch is visible in Xcode) In Xcode → Window → Devices and Simulators, the Watch shows up but is not usable and fails to connect. Error: “Previous preparation error: A connection to this device could not be established.” “Timed out while attempting to establish tunnel using negotiated network parameters.” In some attempts the Watch shows “Capacity: Unknown” / limited details, and then fails during preparation. Issue B (after unpairing Watch in Xcode only) I unpaired/removed the Watch in Xcode (Devices & Simulators). I did not unpair the Watch from the iPhone. Now: iPhone appears in Xcode and works normally for builds. Watch is still paired to the iPhone and works normally. Watch no longer appears anywhere in Xcode Devices & Simulators (no paired watch section, no watch run destination). What I’ve tried Reboots of Mac, iPhone, Watch (multiple times) Watch unlocked, awake; iPhone unlocked and close to Watch Verified Watch is paired and connected in iPhone Watch app Developer Mode enabled on iPhone and Watch Wi-Fi and Bluetooth ON (Mac/iPhone/Watch), tried toggling both Tried on home Wi-Fi and also with iPhone hotspot (same result) Resetting trust prompts / reconnecting iPhone via USB, re-trusting Mac Apple Watch: “Clear Trusted Computers” Xcode: removing/re-adding devices; clearing derived data; restarting Xcode Watch Developer networking test: Responsiveness = Medium (430 RPM) Questions 1. Is this a known issue/regression with Xcode 26.2 + watchOS 26.2 tunneling (CoreDevice / devicectl)? 2. Is there an Apple-supported way to force Xcode to re-discover a paired Watch after it was removed from Xcode Devices & Simulators (without unpairing the Watch from the iPhone)? 3. Any recommended logs or diagnostic steps I should collect (Console logs, sysdiagnose, specific Xcode/CoreDevice logs) to include in a Feedback report? If helpful, I can provide the full error text from Xcode’s Devices window and any logs you recommend. Thank you in advance,
6
3
454
5d
Xcode 26: `IDERunDestination: Supported platforms for the buildables in the current scheme is empty` repeatedly logged when running tests from `.xctestrun` file
We are seeing repeated occurrences of the following log line in test runs triggered via .xctestrun files on iOS 26: IDERunDestination: Supported platforms for the buildables in the current scheme is empty. This line is printed n number of times after a test fails, significantly increasing test execution duration (2–3 minutes extra in some cases). The issue does not occur when tests are built and run together from Xcode directly — it’s specific to .xctestrun-based executions using xcodebuild test-without-building. Steps to Reproduce: Use Xcode 26 to build a sample XCTest target (we used a simple UI test project). Locate the generated .xctestrun file under DerivedData/.../Build/Products/.... Run tests using: xcodebuild -xctestrun /path/to/sample.xctestrun \ -destination "id=<device_id>" \ test-without-building Observe the logs during test failure. Observed Behavior: The log line IDERunDestination: Supported platforms for the buildables in the current scheme is empty appears multiple times. The test cleanup and teardown phase takes significantly longer (2–3 minutes). Expected Behavior: The log should appear once or not at all. Test cleanup time should remain consistent. Additional Information: Affects only iOS 26 devices and .xctestrun-based runs. Not reproducible on iOS < 26. Xcode 26 and 26.x beta versions tried. Reproducible both locally and on CI systems using real devices. Same .xctestrun file, when used on older OS versions, does not cause delay.
1
5
236
5d
XCode26.2 ld: Assertion failed: ((ct == Atom::ContentType::objcConst) || (ct == Atom::ContentType::objcData) || (ct == Atom::ContentType::constData) || (ct == Atom::ContentType::constText)), function ObjCClassReadOnlyDataRef, file Atom.cpp, line 329
Dear Apple engineers: My previous project was successfully compiled using Xcode 16.2. Now, I need to adapt it to Xcode 26. I know that the linker in Xcode 26 has undergone significant changes. So, in the 'Other Linker Flags' configuration of the Build Settings in the project engineering of Xcode 26.2, I deleted '-ld64' and added '-Xlinker -dead_strip -Xlinker -dead_strip -allow_dead_duplicates' to adapt to the new linker of Xcode 26. After the modification, when I compiled my project engineering using Xcode 26.2 compiler, I encountered a new linker error. The error log is attached. Regarding this error, how should we solve it? Thank you. XCode26.2BuildErrorLog.txt
3
0
115
5d
XcodePreviews cleared actual app data
I've been developing an advanced gps tracking tool and had over 500 miles of data collected in the local storage of my test app. Recently, I used the XcodePreviews app to use my device to test UI updates as I was making them. To my surprise, doing this cleared all the data from my actual test app. Has this happened to anyone else before? Is there a way to recover my lost data? Why does this happen? I've verified that this is always clearing my app data. I tested by adding data to my actual test app then launching XcodePreviews - only to find that my app data has been cleared.
0
0
24
5d
iMessages App Capability Issue with In-App Purchase
**The issue - ** I can't add "In-App Purchase" as a capability in xCode to my iMessage extension target. **What I have tried - ** I have a valid provisioning profile with In-App Purchases enabled. I have agreed to all agreements in the apple developer console. I have an apple developer membership. I have added an active bank account to my apple developer account. **How the issue came to be - ** I am trying to develop a "stand-alone" iMessage app (no underlying app) which as I understand it is different from a "iMessage extension app"(this has an underlying app that it syncs/interacts with). To do this, I updated my mac to latest OS (Tahoe 26.2) and xCode as well. I then began by using the "iMessage App" template in xCode. And BAM right off the bat, I could not get the "In-App Purchases" capability to show up when I select my iMessage extension target. To be clear, when you make the template, you get 2 targets, one is just a regular "app" target and the other is the iMessage extension target. Now I am not sure if I even need the "app" target if I'm trying for a standalone iMessage app, but I figured it wouldn't be causing this issue as I have tried deleting that target and nothing changed. **Replicating the issue - ** I have tried creating other "iMessage App"'s off of the template to see if maybe I just got it wrong or misconfigured something in my development, but it seems like when you start one of those templates, you immediately are not able to see the "In-App Purchase" capability. **Help! - ** I know this to be possible as there is another (very popular) iMessage extension out on the app store right now called "Game Pigeon" which is also provided by an individual just like I am trying to do, and he uses In App Purchases in his iMessage app. Any help on this would be GREATLY appreciated. Please reach out to me if you need/want additional info or could/want to schedule a meeting.
4
0
121
6d
Appkit without storyboards XCode 26.2
I’m running macOS 15.7 with Xcode 26.2, and I’m trying to learn the basics of AppKit. I’m fully aware that AppKit is considered a legacy / “old” technology and that Apple clearly does not promote it out of the box anymore. This is especially visible in recent versions of Xcode, where you can no longer create a macOS App template without Storyboards or SwiftUI. That said, AppKit is still widely used under the hood, so I think it’s reasonable to at least understand its fundamentals. Here’s the problem I’m facing. I create a standard macOS App project using the Xcode template (AppKit App Delegate). Then I: delete Main.storyboard remove all storyboard references from Info.plist try to create the window manually in applicationDidFinishLaunching At this point, the project builds, but the app either: does not show any window, or behaves as if it were not a proper GUI app While debugging, it looks like Xcode / Swift is treating my target more like a dylib / wrapper than a normal .app bundle (at least judging by runtime behavior and the lack of a proper AppKit lifecycle). While searching for answers, I found this article: https://ashidiqi.com/blog/how-to-setup-xcode-project-programmatically-with-appkit/ The author claims that in this scenario you must not use the @main attribute and instead need a main.swift file that manually calls NSApplicationMain. However, the article also mentions that Xcode shows the error: 'main' attribute cannot be used in a module that contains top-level code The confusing part is that I do not have any top-level code in my project when using @main. At the same time, when I ask an LLM for clarification, it tells me that: @main does not require a storyboard removing a storyboard does not force you to switch to main.swift @main should work fine for a fully programmatic AppKit app So I’m left with two concrete questions: What is the correct, modern answer here? When building a fully programmatic AppKit app (no storyboard, no SwiftUI), do you actually need main.swift, or is @main still fully supported and correct? Is there any supported or recommended way in modern Xcode to get a “clean” AppKit app template without a storyboard? Either via project settings, templates, or some documented workflow — without having to fight the build system or end up with a half-broken target. I’m not trying to fight Apple’s direction here — I just want to understand the correct way to work with AppKit in 2025, even if it’s not the preferred path anymore. Thanks in advance for any clarification.
2
0
119
6d
Unable to Verify Code Signature with Error 0xe8008018 Despite Troubleshooting Attempts
Hello everyone, I am encountering a persistent issue with Xcode where I’m unable to install my app on a testing device due to the following error message: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.SznYNY/extracted/iForC.app : 0xe8008018 (The identity used to sign the executable is no longer valid.) Here’s what I have tried so far to resolve this issue: 1. Ensured that all my certificates and provisioning profiles are current and valid. 2. Removed all related certificates from my Keychain and reinstalled new ones. 3. Cleaned and rebuilt the project multiple times. 4. Unpaired the device and paired it again. 5. Reinstalled the latest version of Xcode. 6. Performed a complete restore of my Mac. Despite these troubleshooting steps, I am still facing the same issue. I would greatly appreciate any insights or experiences related to this error from anyone who has overcome similar challenges. Thank you in advance for your help!
13
3
7.7k
6d
In Simulator on status bar red banner with rdar:45025538
Out of nowhere I got some red banner on top of my iPhone 13 mini / iOS 17.5. I cannot pin point the root cause of this. What I can say is that it only happens to Simulators of a certain type, e.g. iPhone 12 and 13 mini, but not iPhone 14 for example. I have installed Xcode 26.1.0 and 26.1.1, out of which 26.1.0 is selected: $ xcode-select -p /Applications/Xcode-26.1.0.app/Contents/Developer And following runtimes: $ xcrun simctl runtime list == Disk Images == -- iOS -- iOS 17.5 (21F79) - CF933623-A258-44F8-B248-C0F25C0C343B (Ready) iOS 26.1 (23B80) - D11C3CDC-EE3D-44CC-8B92-9B7D00B54B0B (Ready) Total Disk Images: 2 (14.6G) Installing the newer 26.1 23B86 runtime doesn't help either.
18
2
1.8k
6d
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!
6
8
1.1k
6d