Qazi Ammar
Qazi Ammar

Reputation: 1518

Please check your project settings and ensure that a valid product has been built. Xcode 14

I just updated my Xcode 13 to 14 version. After updating I tried to build and run app on my phone but Xocde is giving the this error. Any solution to this problem. I am using Mac os version 12.6 on Apple M1 Pro machine. For the simulator after showing the message build succeed Xcode stuck on waiting for attachment.

enter image description here

Here is the detail log.

Details

Unable to install "HTPlanner"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653081
Recovery Suggestion: Please check your project settings and ensure that a valid product has been built.
User Info: {
    DVTErrorCreationDateKey = "2022-10-03 05:50:48 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
There was an internal API error.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653081
User Info: {
    DVTRadarComponentKey = 261622;
    MobileDeviceErrorCode = "(0xE8000067)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x00000001147e02bc DTDKCreateNSErrorFromAMDErrorCode + 300
    1   DTDeviceKitBase                     0x00000001148143c0 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 136
    2   DVTFoundation                       0x0000000104cfe57c DVTInvokeWithStrongOwnership + 76
    3   DTDeviceKitBase                     0x0000000114814144 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1196
    4   IDEiOSSupportCore                   0x00000001146dfd10 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.147 + 2328
    5   DVTFoundation                       0x0000000104e08864 __DVT_CALLING_CLIENT_BLOCK__ + 16
    6   DVTFoundation                       0x0000000104e092d0 __DVTDispatchAsync_block_invoke + 152
    7   libdispatch.dylib                   0x00000001884a25f0 _dispatch_call_block_and_release + 32
    8   libdispatch.dylib                   0x00000001884a41b4 _dispatch_client_callout + 20
    9   libdispatch.dylib                   0x00000001884ab8a8 _dispatch_lane_serial_drain + 668
    10  libdispatch.dylib                   0x00000001884ac404 _dispatch_lane_invoke + 392
    11  libdispatch.dylib                   0x00000001884b6c98 _dispatch_workloop_worker_thread + 648
    12  libsystem_pthread.dylib             0x0000000188664360 _pthread_wqthread + 288
    13  libsystem_pthread.dylib             0x0000000188663080 start_wqthread + 8
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone14,3";
    "device_osBuild" = "16.0 (20A362)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 4572;
    "operation_errorCode" = "-402653081";
    "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" = 1;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos16.0";
    "sdk_osVersion" = "16.0";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 12.6 (Build 21G115)
Xcode 14.0 (21335) (Build 14A309)
Timestamp: 2022-10-03T10:50:48+05:00

Upvotes: 25

Views: 14986

Answers (7)

maxmijn
maxmijn

Reputation: 347

In my case there was a TestFlight build stuck on installing. Cancelling the TestFlight install fixed it.

Upvotes: 1

aeon
aeon

Reputation: 1

In my case, I had to change the CodeSigningIdentity from Apple Developer to iOS Developer.

Strangely...I only had to do that for the app extension, not the main app target.

Target > Widget > Build Settings > Signing > Code Signing Identity

Upvotes: 0

狗吃咸了掉毛
狗吃咸了掉毛

Reputation: 51

I had the same issue, you can check your bundle ID if you created a widgetExtension, the widget's bundle ID should be different to main project.

eg, main proj's BID == "com.banana.app"
so, widget's BID should be "com.banana.app.widget". ✅
rather than "com.banana.app".❌

it works for me.

Upvotes: 5

Binh Ho
Binh Ho

Reputation: 4934

I installed app from Xcode 13.4. Then install app from XCode 14.2 so this issue shown up. Uninstall app then rebuild works for me.

Upvotes: 1

duongnd12.dev
duongnd12.dev

Reputation: 1

There are some things you can try.

enter image description here

Reduce SWIFT_VERSION from 5.0 to 4.0 (depending on your device).

Upvotes: -1

Pokaboom
Pokaboom

Reputation: 1388

I was having this same issue. But I noticed that I had previously installed app on my device. So I uninstalled it and re-ran the build from Xcode and now it's working fine. So try to uninstall your app from the device completely and then build again.

Upvotes: 58

Nabil Zouhir
Nabil Zouhir

Reputation: 107

There are some things you can try.

First of all try cleaning and building again the project. If you're lucky that'll solve bit but I doubt it.

Then try removing Pods and Podfile.lockfiles and run pod install again.

If it doesn't work (as mentioned here) you can set a new user-defined build setting in TARGET -> Build Settings according to the simulator you're using.Target build setting

Upvotes: 0

Related Questions