Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 11.2 - Unable to install App file to device?

Tags:

xcode

ios

I recently updated my OS to Catalina, and updated Xcode to 11.2. Since doing so, when I try to run a release version of my app on my device, I'm simply given the error:

Unable to install the app.

When I tap 'details', it provides me with the following:

App installation failed Domain: com.apple.dtdevicekit Code: -402620395 Failure Reason: A valid provisioning profile for this executable was not found.

User Info: { DVTRadarComponentKey = 487927; "com.apple.dtdevicekit.stacktrace" = ( 0 DTDeviceKitBase 0x000000011baff6e7 DTDKCreateNSError + 109 1 DTDeviceKitBase
0x000000011baffde9 DTDK_AMDErrorToNSError + 792 2 DTDeviceKitBase
0x000000011bb3f56a 90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164 3 DVTFoundation 0x000000010356f156 DVTInvokeWithStrongOwnership + 73 4 DTDeviceKitBase
0x000000011bb3f301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589 5 IDEiOSSupportCore 0x000000011b9c7a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523 6 DVTFoundation 0x00000001036a03ba __DVT_CALLING_CLIENT_BLOCK
+ 7 7 DVTFoundation 0x00000001036a1a92 __DVTDispatchAsync_block_invoke + 809 8
libdispatch.dylib 0x00007fff68220583 _dispatch_call_block_and_release + 12 9 libdispatch.dylib 0x00007fff6822150e _dispatch_client_callout + 8 10 libdispatch.dylib 0x00007fff68226ace _dispatch_lane_serial_drain + 597 11 libdispatch.dylib 0x00007fff68227452 _dispatch_lane_invoke + 363 12 libdispatch.dylib 0x00007fff68230a9e _dispatch_workloop_worker_thread + 598 13 libsystem_pthread.dylib 0x00007fff6847a71b _pthread_wqthread + 290 14 libsystem_pthread.dylib 0x00007fff6847a57b start_wqthread + 15 ); }

My provisioning profiles are 100% correct, as are my certificates. I have no idea why this is happening, and I've tried absolutely everything to get it to install/run. I've tried:

  • Double checked that 'Scheme' has release checked under the 'Run' tab
  • Confirmed that correct provisioning profile is selected
  • Removing the app from my device
  • Creating new provisioning profiles
  • Changing my bundle ID
  • Creating new certificates
  • Cleaning the build folder, restarting Xcode
  • Reinstalling Xcode
  • Deleting the Derived Data folder

NONE of the above has worked. I've been at this for 2 days now - help is appreciated. The only way I'm able to install the app file successfully to my device is if I upload it to TestFlight first (which, I can't feasibly do every time I want to test a small change).

like image 725
Brittany Avatar asked Nov 01 '19 16:11

Brittany


People also ask

How do I install an .app file on my iPhone?

drag the app file into iTunes and then select your device in the iTunes . After that you can find the apps tab on the iTunes. Then you will see the dragged app file . CLick on the install and sync your phone .

Why does it say app could not be installed?

Corrupted storage, especially corrupted SD cards, is one of the most common reasons why Android app not installed error occurs. Unwanted data might contain elements that disturb the storage location, causing Android app can't install error.


2 Answers

Go to File -> Workspace Settings, and make sure your build system is set to Legacy Build System.

I ran into the same issue on Catalina and Xcode 11.2 and this solved it for me.

As of Xcode 11 Apple is starting to enforce some of the build criteria that was previously only required for AppStore builds on .ipa extraction, and device builds.

So far I have encountered:

  • Requiring the above legacy build system setting for device deployments for older projects or projects that use older frameworks
  • Removing unused architectures to extract an ipa from an archive
like image 90
Lean van Heerden Avatar answered Oct 16 '22 09:10

Lean van Heerden


For me, it's due to Dynamic Frameworks which I have added in the application. Initially, I have selected (Embed + Don't Sign) option for the dynamic frameworks.

Changing it to (Embed & Sign) for such frameworks resolved the issue for me.

enter image description here

like image 40
Vittal Pai Avatar answered Oct 16 '22 08:10

Vittal Pai