Help With Provisioning Profile(s) for Development & Distribution

I've followed all the posts (most of which are fairly stale). I've generated dozens of certificates both for "Apple Development" and "Apple Distribution", created several profiles of "iOS App Development" and "App Store Connect". Up until now I have had very little problem installing my app (generated using Ionic/Capacitor v5/Angular v16, Xcode 15.4, macos 14.6). Now when I try to install directly on a test device (I've used regularly, previously), I get "Failed to verify code signature of... The identity used to sign the executable is no longer valid..." I've restarted Xcode and macbook. I've deleted all certificates and revoked all profiles, and started over. I have tried using automatic signing and manual signing. Nothing is working. I just want be able to install the app on a test device (mostly to see logs in Xcode's console), and to be able to upload the same app to appstoreconnect. What am I doing wrong?

Thank you for sharing your post. We'd greatly appreciate it if you could provide the full error log appearing after the "Failed to verify code signature of..." message. Error messages are invaluable in diagnosing the precise issue.

Here's a potential workaround for a common problem we've encountered: If your device is already in development mode, and the app is still not installing, please follow these steps:

  1. Force a Wired Connection: This can sometimes resolve the issue. Connect your device to your Mac via cable, then:
    • Disable Wifi on your phone.
    • Open Terminal and ensure you can connect to your phone using xcrun devicectl device info details --device <identifier>. To get the identifier, run xcrun devicectl list devices.
    • Once you're successfully connected via wire, you can reenable Wifi.

The reason for disabling Wifi is that, in some cases, macOS will continue to use the existing Wi-Fi connection even after physically connecting via USB.

Additional Tip: If these steps don't work, a solution has been discussed in this Apple Developer forum thread: https://developer.apple.com/forums/thread/761291?page=1#800918022.

Your full error log would help us explore other possibilities and provide more tailored assistance.

I did as you suggested, but it doesn't seem to have helped.

Here is the full error message (with some names redacted):

Unable to Install “APP_NAME”
Domain: IXUserPresentableErrorDomain
Code: 14
Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.vc7FTV/extracted/App.app/Frameworks/CapacitorFilesystem.framework : 0xe8008018 (The identity used to sign the executable is no longer valid.)
User Info: {
    DVTErrorCreationDateKey = "2024-08-23 04:50:29 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Unable to Install “APP_NAME”
Domain: IXUserPresentableErrorDomain
Code: 14
Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.vc7FTV/extracted/App.app/Frameworks/CapacitorFilesystem.framework : 0xe8008018 (The identity used to sign the executable is no longer valid.)
User Info: {
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    NSURL = "file:///Users/USER_NAME/Library/Developer/Xcode/DerivedData/App-gmrmqskkpsezndgklzruehvhzxyj/Build/Products/Debug-iphoneos/App.app/";
}
--
Unable to Install “APP_NAME”
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 /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.vc7FTV/extracted/App.app/Frameworks/CapacitorFilesystem.framework : 0xe8008018 (The identity used to sign the executable is no longer valid.)
--
Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.vc7FTV/extracted/App.app/Frameworks/CapacitorFilesystem.framework : 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 = 79;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone13,1";
    "device_osBuild" = "17.5.1 (21F90)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "355.28";
    "dvt_mobiledevice_version" = "1643.120.2";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 7138;
    "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_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" = 2;
    "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.5";
    "sdk_osVersion" = "17.5";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 14.6.1 (Build 23G93)
Xcode 15.4 (22622) (Build 15F31d)
Timestamp: 2024-08-22T21:50:29-07:00

I am having this problem too - super frustrating. Also super frustrating that I can't rename a freaking certificate - so I have a dozen with the same freaking name (sigh). Anyway - here is my bucket of yuck (with names redacted, also):

Unable to Install “REDACTED_APP_NAME”
Domain: IXUserPresentableErrorDomain
Code: 14
Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.dYOzZw/extracted/REDACTED_APP_NAME.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
User Info: {
    DVTErrorCreationDateKey = "2024-08-23 14:10:14 +0000";
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Unable to Install “REDACTED_APP_NAME”
Domain: IXUserPresentableErrorDomain
Code: 14
Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.dYOzZw/extracted/REDACTED_APP_NAME.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
User Info: {
    IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
    NSURL = "file:///Users/redacted_user_name/Library/Developer/Xcode/DerivedData/REDACTED_APP_NAME-elkmbcvvebejszbzuiihhxxxwyyy/Build/Products/Debug-iphoneos/visualambient.app/";
}
--
Unable to Install “REDACTED_APP_NAME”
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 /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.dYOzZw/extracted/REDACTED_APP_NAME.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
--
Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.dYOzZw/extracted/REDACTED_APP_NAME.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
Domain: MIInstallerErrorDomain
Code: 13
User Info: {
    FunctionName = "+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]";
    LegacyErrorString = ApplicationVerificationFailed;
    LibMISErrorNumber = "-402620395";
    SourceFileLine = 79;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_model" = "iPad14,1";
    "device_osBuild" = "17.5.1 (21F90)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "397.14";
    "dvt_mobiledevice_version" = "1759.0.4";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 398;
    "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_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.5";
    "sdk_osVersion" = "17.5";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 14.6.1 (Build 23G93)
Xcode 15.4 (22622) (Build 15F31d)
Timestamp: 2024-08-23T10:10:14-04:00

Any suggestions? I'm currently uploading to appstoreconnect so I can download over testflight, but this doesn't let me live tail my app's logs like if I were to run directly in xcode. I'm trying to print logs to the app's screen since there doesn't seem to be a better solution..

I ended up creating another provisioning profile (type: App Store) with a distribution certificate. Now when I try to install directly on a device via Xcode, I get:

Failed to install embedded profile for <App Identifier> : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)

The "show details" portion says this:

Unable to Install <App Name> Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to install embedded profile for <App Identifier> : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) User Info: { DVTErrorCreationDateKey = "2024-08-27 04:14:41 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; }

Unable to Install <App Name> Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to install embedded profile for <App Identifier> : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) User Info: { IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; }

Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { NSURL = "file:///Users/robertglenn/Library/Developer/Xcode/DerivedData/App-gmrmqskkpsezndgklzruehvhzxyj/Build/Products/Debug-iphoneos/App.app/"; }

Unable to Install <App Name> Domain: IXUserPresentableErrorDomain Code: 14 Failure Reason: This app cannot be installed because its integrity could not be verified. Recovery Suggestion: Failed to install embedded profile for <App Identifier> : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)

Failed to install embedded profile for <App Identifier> : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.) Domain: MIInstallerErrorDomain Code: 13 User Info: { FunctionName = "-[MIInstallableBundle _installEmbeddedProfilesWithError:]"; LegacyErrorString = ApplicationVerificationFailed; LibMISErrorNumber = "-402620385"; SourceFileLine = 308; }

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_isCoreDevice" = 1; "device_model" = "iPhone13,1"; "device_osBuild" = "17.5.1 (21F90)"; "device_platform" = "com.apple.platform.iphoneos"; "dvt_coredevice_version" = "355.28"; "dvt_mobiledevice_version" = "1643.120.2"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 5902; "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_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" = 2; "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.5"; "sdk_osVersion" = "17.5"; "sdk_variant" = iphoneos; }

System Information

macOS Version 14.6.1 (Build 23G93) Xcode 15.4 (22622) (Build 15F31d) Timestamp: 2024-08-26T21:14:41-07:00

Like, do I need two provisioning profiles? One for "distribution" and another for "development"?

Help With Provisioning Profile(s) for Development &amp; Distribution
 
 
Q