Xcode 15 iOS 17 Failed to install app on the device

Hi all,

I've spent 3 of my 'coding-time' sessions already on trying to figure this one out. But I wasn't successful. I'm a hobby dev, so not too experienced with signing of anything code-wise. So time to head to the forums for help.

My SwiftUI app runs fine on the simulator. My app also runs fine when downloaded from the store. But I cannot:

  1. Build the item from Xcode to my new iPhone 15
  2. Build and distribute an archive, so that I can release a new version of my app

What I did so far:

  • Removed and reinstalled my Pods via Terminal
  • Removed and reinstalled my packages through Xcode
  • Removed trusted devices from my iPhone
  • Removed trusted devices from my Macbook
  • Added my new iPhone to my Apple Developer account via https://developer.apple.com/account/resources/devices/list
  • Removed my old iPhone
  • Restarted everything at least 5 times

I keep getting this error after building, but immediately upon installing:

Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    DVTErrorCreationDateKey = "2023-10-16 11:47:42 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
    NSURL = "file:///Users/jorritgernaat/Library/Developer/Xcode/DerivedData/WalkApp-fukevcszpwufbzavuluhlbvhsaaa/Build/Products/Debug-iphoneos/WalkApp.app/";
}
--
Paaltjesroutes moet worden bijgewerkt
Domain: IXUserPresentableErrorDomain
Code: 17
Failure Reason: Deze app moet door de ontwikkelaar worden bijgewerkt om te kunnen werken met deze iOS-versie.
Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.UleUN5/extracted/WalkApp.app/Frameworks/FirebaseFirestore.framework : 0xe8008029 (The code signature version is no longer supported.)
--
Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.UleUN5/extracted/WalkApp.app/Frameworks/FirebaseFirestore.framework : 0xe8008029 (The code signature version is no longer supported.)
Domain: MIInstallerErrorDomain
Code: 13
User Info: {
    FunctionName = "+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]";
    LegacyErrorString = ApplicationVerificationFailed;
    LibMISErrorNumber = "-402620375";
    SourceFileLine = 78;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone15,4";
    "device_osBuild" = "17.0.3 (21A360)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.2.4";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 1864;
    "operation_errorCode" = 17;
    "operation_errorDomain" = "com.apple.dt.CoreDeviceError.3002.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_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_memoryGraphOnResourceException" = 0;
    "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_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 99;
    "param_launcher_substyle" = 8192;
    "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" = "iphoneos17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 14.0 (Build 23A344)
Xcode 15.0 (22265) (Build 15A240d)
Timestamp: 2023-10-16T13:47:42+02:00```

It seems to somehow involve Firebase, but that can also be because that's simply the only 3rd party stuff I use.

Help me get back to writing code and shipping app updates :) 
Answered by SophisticatedJ in 768762022

Oh wow. I managed to solve it. I removed my Cocoapods integration which I used for Firebase. After that I reintegrated Firebase using the Xcode package manager.

This is what solved it for me:

  1. Close Xcode, terminal navigate to your Xcode Project directory
  2. brew install cocoapods-deintegrate cocoapods-clean
  3. pod deintegrate
  4. pod clean
  5. rm Podfile
  6. Open Xcode, 'add packages'
  7. Add Firebase to build target
  8. GOGOGOGOGO ;)

To add some more context:

  • I'm using a fully up-to-date Xcode, against a fully up-to-date iPhone 15.
  • I use Xcode managed signing.
  • I changed nothing to my bundle ID or anything
  • It runs fine in simulator
  • I can build my other project, but I see no differences in setup except for Firestore being used in the one and not the other
Accepted Answer

Oh wow. I managed to solve it. I removed my Cocoapods integration which I used for Firebase. After that I reintegrated Firebase using the Xcode package manager.

This is what solved it for me:

  1. Close Xcode, terminal navigate to your Xcode Project directory
  2. brew install cocoapods-deintegrate cocoapods-clean
  3. pod deintegrate
  4. pod clean
  5. rm Podfile
  6. Open Xcode, 'add packages'
  7. Add Firebase to build target
  8. GOGOGOGOGO ;)

I am getting the same issue on Xcode 15.0.1 (22266) (Build 15A507) with iPhone 15 Pro Max (iOS 17.1 public build). No Cocoapods, only SPM. Installing straight to the physical device. The issue did arise from nowhere. Nothing changed, just re-building the app (which previously - just minutes ago worked fine). Reported via "Feedback for Xcode tool"

What I have tried:

  • Restarting Mac
  • Unpairing and Trusting again
  • Removing Derived Data

EDIT: Removing app from device and reinstalling helped.

Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    DVTErrorCreationDateKey = "2023-10-27 18:48:36 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
    NSURL = "file:///Users/lbaronas/Library/Developer/Xcode/DerivedData/meteo-lt-gxuxorcdugflksbgrlsvmfyaytxz/Build/Products/Debug-iphoneos/meteo-lt.app/";
}
--
Unable to Install “Meteo Lietuva”
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Please try again later.
Recovery Suggestion: Could not hardlink copy /private/var/containers/Bundle/Application/21D0CAD7-392E-4ED9-B3EE-7AEDD73E7A7B/meteo-lt.app to /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EGcwbh/extracted/Payload/meteo-lt.app with manifest /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EGcwbh/extracted/com.apple.deltainstallcommands.com.liudasbar.meteo-lt
--
Could not hardlink copy /private/var/containers/Bundle/Application/21D0CAD7-392E-4ED9-B3EE-7AEDD73E7A7B/meteo-lt.app to /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EGcwbh/extracted/Payload/meteo-lt.app with manifest /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EGcwbh/extracted/com.apple.deltainstallcommands.com.liudasbar.meteo-lt
Domain: MIInstallerErrorDomain
Code: 8
User Info: {
    FunctionName = "-[MIInstallableBundlePatch _applyDeltaPatchWithError:]";
    LegacyErrorString = PackagePatchFailed;
    SourceFileLine = 116;
}
--
Entity with mode 0100644 exists at file location in dest path /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EGcwbh/extracted/Payload/meteo-lt.app/Frameworks/MeteoLtUI.framework/_CodeSignature/CodeResources
Domain: MIInstallerDeltaErrorDomain
Code: 1
User Info: {
    FunctionName = "hardlink_copy_hierarchy";
    SourceFileLine = 981;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_isWireless" = 1;
    "device_model" = "iPhone16,2";
    "device_osBuild" = "17.1 (21B80)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.2.4.100.1";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 6980;
    "operation_errorCode" = 8;
    "operation_errorDomain" = "com.apple.dt.CoreDeviceError.3002.IXUserPresentableErrorDomain.1.MIInstallerErrorDomain";
    "operation_errorWorker" = IDEInstallCoreDeviceWorker;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 1;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "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" = 1;
    "param_diag_memoryGraphOnResourceException" = 0;
    "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_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 8192;
    "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" = "iphoneos17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 14.0 (Build 23A344)
Xcode 15.0.1 (22266) (Build 15A507)
Timestamp: 2023-10-27T21:48:36+03:00

I experience a similar problem with the latest macOS (Sonoma), XCode (15.0.1) and iOS (17.1.1) The only difference that I can spot is the following:

LegacyErrorString = DuplicateIdentifier;

Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    DVTErrorCreationDateKey = "2023-11-23 11:04:42 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
    NSURL = "file:///Users/alexpro/Library/Developer/Xcode/DerivedData/Leplace_World-grgysdkpolwuceekoinuvoskvxqk/Build/Products/Debug-iphoneos/Leplace%20World.app/";
}
--
Unable to Install “Leplace World”
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Please try again later.
Recovery Suggestion: Found bundle at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.J7dmFF/extracted/Leplace World.app/Frameworks/OneSignal.framework with the same identifier (com.onesignal.OneSignal-Dynamic) as bundle at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.J7dmFF/extracted/Leplace World.app/Frameworks/OneSignalFramework.framework
--
Found bundle at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.J7dmFF/extracted/Leplace World.app/Frameworks/OneSignal.framework with the same identifier (com.onesignal.OneSignal-Dynamic) as bundle at /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.J7dmFF/extracted/Leplace World.app/Frameworks/OneSignalFramework.framework
Domain: MIInstallerErrorDomain
Code: 57
User Info: {
    FunctionName = "-[MIInstallableBundle performPreflightWithError:]";
    LegacyErrorString = DuplicateIdentifier;
    SourceFileLine = 477;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone11,2";
    "device_osBuild" = "17.1.1 (21B91)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.40.14";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 17189;
    "operation_errorCode" = 57;
    "operation_errorDomain" = "com.apple.dt.CoreDeviceError.3002.IXUserPresentableErrorDomain.1.MIInstallerErrorDomain";
    "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_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_memoryGraphOnResourceException" = 0;
    "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_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 99;
    "param_launcher_substyle" = 8192;
    "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" = "iphoneos17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 14.1.1 (Build 23B81)
Xcode 15.0.1 (22266) (Build 15A507)
Timestamp: 2023-11-23T13:04:42+02:00

I have the same problem with when I updated onesignal plugin to 5.0.3 version, any suggestion?

Thanks.

A different approach:

Try to clean Provisioning Profiles

Xcode -> Window -> Devices and Simulators -> Right click on your device -> Show Provisioning Profiles... -> Select Provisioning Profile -> - Remove selected profiles

Then, manually delete the app from the iOS device, and try using xCode to install again. This worked for me, however I did clean the build, and try other troubleshooting first.

see this for reference https://stackoverflow.com/questions/58662457/xcode-11-2-unable-to-install-app-file-to-device

I fixed by during as follows:

  1. Go to settings
  2. Select Privacy & Security
  3. Turn developer mode off if on
  4. Turn developer mode back on an follow instrctions
  5. The run your app on xcode.

This is a temporary fix. Periodical the problem may reoccur then repeat steps 1-5.

It works for me without fail. I alway clean build folder beflore during the steps.

Good luck!

This always work for me: Change the bundle identifier in Sigining&Capabilities tab to a invalid name (add a _ at the end e.g.), then press enter to make the siginature availabe. And then restore the right bundle identifier.

Xcode 15 iOS 17 Failed to install app on the device
 
 
Q