-2

A physical device (iPhone 12 pro) is connected to Xcode. Set up provisioning profile, team and certificate like intended. And if I run the app from Xcode the app launches on the phone without any problems.

Then stop the running debug session on the device. And try to launch it again (without doing any changes to the project or code) on the physical device. At that point I get the following error:

enter image description here

Details would give me:

Details

Unable to install "App"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info: {
    DVTErrorCreationDateKey = "2023-06-15 11:24:15 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
A valid provisioning profile for this executable was not found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info: {
    DVTRadarComponentKey = 487925;
    MobileDeviceErrorCode = "(0xE8008015)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x000000010aeacb1c DTDKCreateNSErrorFromAMDErrorCode + 300
    1   DTDeviceKitBase                     0x000000010aee1000 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 136
    2   DVTFoundation                       0x000000010217bac8 DVTInvokeWithStrongOwnership + 76
    3   DTDeviceKitBase                     0x000000010aee0d7c -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1208
    4   IDEiOSSupportCore                   0x000000010b9ebce8 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.147 + 2340
    5   DVTFoundation                       0x0000000102286428 __DVT_CALLING_CLIENT_BLOCK__ + 16
    6   DVTFoundation                       0x0000000102286e94 __DVTDispatchAsync_block_invoke + 152
    7   libdispatch.dylib                   0x000000018031a874 _dispatch_call_block_and_release + 32
    8   libdispatch.dylib                   0x000000018031c400 _dispatch_client_callout + 20
    9   libdispatch.dylib                   0x0000000180323a88 _dispatch_lane_serial_drain + 668
    10  libdispatch.dylib                   0x00000001803245f8 _dispatch_lane_invoke + 384
    11  libdispatch.dylib                   0x000000018032f244 _dispatch_workloop_worker_thread + 648
    12  libsystem_pthread.dylib             0x00000001804c8074 _pthread_wqthread + 288
    13  libsystem_pthread.dylib             0x00000001804c6d94 start_wqthread + 8
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone13,3";
    "device_osBuild" = "16.5 (20F66)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 2393;
    "operation_errorCode" = "-402620395";
    "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain";
    "operation_errorWorker" = IDEInstalliPhoneLauncher;
    "operation_name" = IDEiPhoneRunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 5;
    "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" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos16.4";
    "sdk_osVersion" = "16.4";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 13.3.1 (a) (Build 22E772610a)
Xcode 14.3 (21812) (Build 14E222b)
Timestamp: 2023-06-15T13:24:15+02:00

The only way to fix this is at this point set the build setting Enable App Sandbox to "YES" and run it, then stop the build. Set Enable App Sandbox back to "NO" and launch it on the device. Then the app will update on my device and launch successfully. But any following launches will popup the same error "Unable to install". And at that point I'm forced to repeat the 'workaround' or close Xcode and reopen it.

But this isn't a viable solution for me and takes too much time away from development.

Anyone seen this behaviour before?

basvk
  • 4,437
  • 3
  • 29
  • 49

1 Answers1

0

In my case, the cause was that the actual device (iPhone SE3) did not have a provisioning profile. I installed the Apple Configurator from the Apple store, and after adding the development Profile with the Apple Configurator, I was able to install it.

  • Doesn't have any effect. And the provisioning profile is succesfully installed according to Apple Configurator – basvk Aug 31 '23 at 07:07