11

I am using iPhone 8 (Version 13.3.1), and a MacBook air (Version 10.14.6). I have set 'team' to personal team in Xcode > general. Then I click the button on the top left corner to run it. I received error like this even I have deleted the apps that I have installed before on the same phone with the sample apple id:

Details

Unable to install "Runner"
Domain: com.apple.dtdevicekit
Code: -402620383
--
App installation failed
Domain: com.apple.dtdevicekit
Code: -402620383
Failure Reason: The maximum number of apps for free development profiles has been reached.
User Info: {
    DVTRadarComponentKey = 487927;
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x00000001263006e7 DTDKCreateNSError + 109
    1   DTDeviceKitBase                     0x0000000126300de9 DTDK_AMDErrorToNSError + 792
    2   DTDeviceKitBase                     0x000000012634056a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
    3   DVTFoundation                       0x000000010ba8dc12 DVTInvokeWithStrongOwnership + 73
    4   DTDeviceKitBase                     0x0000000126340301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
    5   IDEiOSSupportCore                   0x00000001261c8a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
    6   DVTFoundation                       0x000000010bbbee7a __DVT_CALLING_CLIENT_BLOCK__ + 7
    7   DVTFoundation                       0x000000010bbc0552 __DVTDispatchAsync_block_invoke + 809
    8   libdispatch.dylib                   0x00007fff6734f5f8 _dispatch_call_block_and_release + 12
    9   libdispatch.dylib                   0x00007fff6735063d _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x00007fff673568e0 _dispatch_lane_serial_drain + 602
    11  libdispatch.dylib                   0x00007fff67357396 _dispatch_lane_invoke + 385
    12  libdispatch.dylib                   0x00007fff6735f6ed _dispatch_workloop_worker_thread + 598
    13  libsystem_pthread.dylib             0x00007fff67590611 _pthread_wqthread + 421
    14  libsystem_pthread.dylib             0x00007fff675903fd start_wqthread + 13
);
}
--

Vanice Leung
  • 304
  • 1
  • 3
  • 10

10 Answers10

7

Removing the app from the device worked for me.

Mali
  • 593
  • 6
  • 7
6

In Xcode go to Window → Devices under Installed Apps delete some apps, and afterwords you could run your app

Sagar Acharya
  • 3,397
  • 4
  • 12
  • 34
4

I fixed it by renaming the bundle ID

The bundle ID it was complaining about had been used in the past on my phone, with a different app, coming from a different TestFlight account and build.

n13
  • 6,843
  • 53
  • 40
3

It's because of the debug App Quantity in your real device. Max 3 apps are able to run from Xcode to your real device for real debugging for further more just uninstall the app. Try to uninstall some of your test app then try to install the new debug app from xcode.Now it will work.

Ryan M
  • 18,333
  • 31
  • 67
  • 74
3
  1. Goto Xcode
  2. Runner > General,
  3. Under Identity, Change "Bundle Identifier",
  4. Run app to the real device,
  5. If you want, change the "Bundle Identifier" back to the original one.

I did all 5 steps , and worked perfectly , thanks to Rens.

Akat
  • 31
  • 2
1

I simply changed the build number, it worked just fine.

Almett
  • 876
  • 2
  • 11
  • 34
1

possible ways: (maybe one of them works)

  1. change the build number.
  2. change the team.
  3. delete the app from the phone or from installed apps in window -> Devices
  4. unplug the usb cable.
  5. change the bundle identifier.

https://stackoverflow.com/a/73597887/13059465

Mohammed_7aafar
  • 385
  • 1
  • 6
  • 9
0

Try changing the lightning cable for another, use a certificate for more security, that's what I did and it worked

ferso
  • 69
  • 3
0

I too faced this issue. Removing the app from Window > Devices and Simulators didn't do it for me. What worked was renaming the bundle id. This allowed me to run it again, but I was also able to then rename it back to the original and get it to run.

Rens
  • 489
  • 5
  • 11
0

Deleting the app from the device and removing any uncommitted git changes to the ios files worked for me.

Sharon Atim
  • 1,777
  • 16
  • 12