Swift & Xcode : Unable to install "MyApp" - ios

I was trying to run my application to my actual device. But I couldn't install it. I have no idea why. Could anyone give me a pointer on this issue? Thank you.
Unable to install "MyApp"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
--
Could not inspect the application package.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
DVTRadarComponentKey = 282703;
MobileDeviceErrorCode = "(0xE8000051)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000013029bc8f DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x00000001302da241 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x000000010f34264b DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x00000001302d9f82 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4 IDEiOSSupportCore 0x000000013014aa10 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
5 DVTFoundation 0x000000010f47117e __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x000000010f472da0 __DVTDispatchAsync_block_invoke + 1191
7 libdispatch.dylib 0x00007fff202765dd _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff202777c7 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff2027d5fe _dispatch_lane_serial_drain + 606
10 libdispatch.dylib 0x00007fff2027e0cb _dispatch_lane_invoke + 375
11 libdispatch.dylib 0x00007fff20287c5d _dispatch_workloop_worker_thread + 819
12 libsystem_pthread.dylib 0x00007fff2041f499 _pthread_wqthread + 314
13 libsystem_pthread.dylib 0x00007fff2041e467 start_wqthread + 15
);
}
--
System Information
macOS Version 11.2.3 (Build 20D91)
Xcode 12.4 (17801) (Build 12D4e)
Timestamp: 2021-05-13T15:49:43+09:00

I had the same problem and continue to have it still.
The device I was using to test applications is the initial iPhone X distribution.
I could install the application just fine on other devices.
"Could not inspect the application package" means you were probably stuck on the pkgConfig part of the install process, no doubt on your second run (it usually gets stuck before then on the first try).
"Clean Build Folder" is your first bet for what could fix the issue. It doesn't fully for me.
However I found a way to install applications on my phone, but it is very hacky.
The trick is to "Clean Build Folder", disconnect your device when it's in the build stage, and reconnect it before the build stage is over.
You will then have to re-install the application on the device after you get stuck the first time.
Do not uninstall the application on your device (not that you can even if you wanted, if it is the same issue as mine).
I will warn that Xcode tends to crash when you disconnect your device mid-install like so.
Best of luck to you, cause you're gonna need it.

if you have "Sign In with Your Apple ID" instead of "Apple Developer Program", you have only run one project on your real device. Also you have only one device register your membership during the free memberships.
compare memberships details

I solved this problem by changing the USB port where the cable is connected

Related

Failed to install the requested application ios xcode

So I had a fully working app, on which I was doing some updates, I was working on the last things, and testing on a real device, I run the app and test it, there was a UILabel text value I had to update, I did and ran the app again on the device to find an error stating "Unable to install iosApp" details below
Details
Unable to install "iosApp"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
--
Could not inspect the application package.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
DVTRadarComponentKey = 282703;
MobileDeviceErrorCode = "(0xE8000051)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000011a39b3b8 DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x000000011a3d9ae1 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x0000000104f4fbac DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x000000011a3d9822 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4 IDEiOSSupportCore 0x00000001146d1999 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.294 + 3534
5 DVTFoundation 0x0000000105082921 __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x000000010508454b __DVTDispatchAsync_block_invoke + 1191
7 libdispatch.dylib 0x00007fff201635dd _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff201647c7 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff2016a5fe _dispatch_lane_serial_drain + 606
10 libdispatch.dylib 0x00007fff2016b0cb _dispatch_lane_invoke + 375
11 libdispatch.dylib 0x00007fff20174c5d _dispatch_workloop_worker_thread + 819
12 libsystem_pthread.dylib 0x00007fff2030c499 _pthread_wqthread + 314
13 libsystem_pthread.dylib 0x00007fff2030b467 start_wqthread + 15
);
}
--
System Information
macOS Version 11.0.1 (Build 20B29)
Xcode 12.5.1 (18212) (Build 12E507)
Timestamp: 2021-07-25T19:23:09-07:00
Out of nowhere the app can't be installed any longer. I restarted xcode, rebooted the computer, rebooted the ipod, uninstalled the app, un-paired the ipod, re-paired the ipod, clean build, deleted cache and still same problem.
So I thought, maybe the ipod has a problem so I attempted to run this on an iphone and the same, in the simulator it acts a bit different, it then gives me this error details
Failed to install the requested application
Domain: NSPOSIXErrorDomain
Code: 22
Failure Reason: The bundle identifier of the application could not be determined.
Recovery Suggestion: Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
User Info: {
bundleURL = "file:///Users/tlacaelel-ramon-luis/Library/Developer/Xcode/DerivedData/iosApp-bgzddjaiahuysehfxtamviqbsuph/Build/Products/Debug-iphonesimulator/iosApp.app/";
}
--
System Information
macOS Version 11.0.1 (Build 20B29)
Xcode 12.5.1 (18212) (Build 12E507)
Timestamp: 2021-07-25T19:30:10-07:00
So I went to check the build info.plist and the CFBundleIdentifier is there. I really don't know where to go from here as I can't test the app.
Has anyone any ideas of what can be causing this issue and how to fix it?

Xcode Unable to install "Runner" Code: -402620392 (Flutter app)

XCode Version 11.1 (11A1027)
Flutter version 1.17.5
I try to run my Flutter App on IPad (12.4.6). It builds without errors, but on installing step shows the message
Unable to install "Runner"
Domain: com.apple.dtdevicekit
Code: -402620392
Recovery Suggestion: The certificate used to sign "Runner" has either expired or has been revoked. An updated certificate is required to sign and install the application.
--
The identity used to sign the executable is no longer valid.
Domain: com.apple.dtdevicekit
Code: -402620392
Failure Reason: Please verify that your device’s clock is properly set, and that your signing certificate is not expired. (0xE8008018).
User Info: {
DVTRadarComponentKey = 487927;
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000012a648047 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x000000012a648749 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x000000012a687824 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 158
3 DVTFoundation 0x000000010fd3d756 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x000000012a6875c1 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x000000012a521f6c __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x000000010fe6e9ba __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x000000010fe70092 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff6e35e5f8 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff6e35f63d _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff6e3658e0 _dispatch_lane_serial_drain + 602
11 libdispatch.dylib 0x00007fff6e366396 _dispatch_lane_invoke + 385
12 libdispatch.dylib 0x00007fff6e36e6ed _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff6e59f611 _pthread_wqthread + 421
14 libsystem_pthread.dylib 0x00007fff6e59f3fd start_wqthread + 13
);
}
--
I tried to run this under my personal developer license (not paid acc) and under my company license (paid acc). All sertificates are valid 100%.
I recreated them all at some point but still no luck :(
Also was done:
Library/MobileDevice/Provisioning\ Profiles/ were cleared
Library/Developer/Xcode/DerivedData was cleared
Bundle Id - I`ve tried to change it
Tried to create new project and run it - successfully runs, but only first time, when it has almost no code inside. When I add some extra code and run pod install - it fails.
and the strange thing is that I have another Flutter project with no extra dependencies and I can delivery it to the same device.
Could it be that some packages or Info.plist settings like io.flutter.embedded_views_preview ruin everything?
Can't find any interconnection...
I was stuck with this problem for about a week, and finally just tried everything i could think of... What ended up working for me, was deleting the "code signing entitlements" that was generated for the project, because i notices that my other projects didn't have them.
Go to the runner in Targets -> Build Settings -> Scroll down to "Code Signing Entitlements" and delete them by pressing backspace on the keyboard!
After you have deleted them, it should look something like this image.
Image of my Code Signing Entitlements
Let me know if this worked for anyone else :)
For everyone with the same issue, i tried for so long to fix that with all the others comments around the internet, but the mistake was more simple than looks like.
My pods_runner was in Embed & Sign, but it have to be by default on "Do not embed".
You can change it in : Runner > General > Frameworks, Libraries, and Embeded Content > Pods_Runner.framework.
Maybe is not a solution for everyone, but it was the one for me, good luck (:

Flutter Unresolved Error: Unable to install runner (issue that only physical device)

Before I open the question, i research all of similar questions and try that solution advices but i do not solve it.
My flutter app does work on iOS Simulator and Android Simulator but when i want to launch it on my physical device (iPhone X), i take error massage about maximum numbers of app for free profiles.
I clean all of apps, provisioning profiles but this is not solved.
Error message form Xcode:
Unable to install "Runner"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620383
--
The maximum number of apps for free development profiles has been reached.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620383
User Info: {
DVTRadarComponentKey = 487925;
MobileDeviceErrorCode = "(0xE8008021)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000012771381a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x0000000127754f70 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x000000010e201155 DVTInvokeWithStrongOwnership + 73
3 DTDeviceKitBase 0x0000000127754ca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654
4 IDEiOSSupportCore 0x00000001275cbe91 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165
5 DVTFoundation 0x000000010e3347f4 __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x000000010e336436 __DVTDispatchAsync_block_invoke + 1194
7 libdispatch.dylib 0x00007fff69e426c4 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff69e43658 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff69e48c44 _dispatch_lane_serial_drain + 597
10 libdispatch.dylib 0x00007fff69e495d6 _dispatch_lane_invoke + 363
11 libdispatch.dylib 0x00007fff69e52c09 _dispatch_workloop_worker_thread + 596
12 libsystem_pthread.dylib 0x00007fff6a09da3d _pthread_wqthread + 290
13 libsystem_pthread.dylib 0x00007fff6a09cb77 start_wqthread + 15
);
}
--
System Information
macOS Version 10.15.4 (Build 19E287)
Xcode 11.5 (16139)
and Flutter message:
2020-06-06 18:05:07.469 ios-deploy[10781:107643] [ !! ] Error 0xe8008021: The maximum number of apps for free development profiles has been reached. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Could not run build/ios/iphoneos/Runner.app on c2e128563bf0d17be5554ecaf3ed00de53b4b2ec.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Installing and launching... 16,3s
Error launching application on Ata Batuhan iPhone’u.
I am waiting for your advices. Thank you.

Xcode 11.5 not installing app on iPhone running iOS13.5

An app I was developing was running fine on my iPhone then after updating iOS, the app builds but does not install to the phone but works in the simulator. A message pops up saying unable to install "app name".
What I have tried
-Reinstalling Xcode
-Deleting and adding provisioning profiles
-restarting Mac and iPhone
-Create a new blank app
It still fails to install after all that I've done
Below is the details of why it fails:
Details
Unable to install "CharliNote" Domain:
com.apple.dt.MobileDeviceErrorDomain Code: -402653081
-- 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 0x000000012830881a DTDKCreateNSErrorFromAMDErrorCode + 233 1
DTDeviceKitBase 0x0000000128349f70
90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke
+ 155 2 DVTFoundation 0x000000010ef11155 DVTInvokeWithStrongOwnership + 73 3 DTDeviceKitBase
0x0000000128349ca8 -[DTDKMobileDeviceToken
installApplicationBundleAtPath:withOptions:andError:withCallback:] +
1654 4 IDEiOSSupportCore 0x00000001281c0e91
__118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352
+ 4165 5 DVTFoundation 0x000000010f0447f4 __DVT_CALLING_CLIENT_BLOCK + 7 6 DVTFoundation 0x000000010f046436 __DVTDispatchAsync_block_invoke + 1194 7
libdispatch.dylib 0x00007fff67c226c4
_dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x00007fff67c23658 _dispatch_client_callout + 8 9 libdispatch.dylib
0x00007fff67c28c44 _dispatch_lane_serial_drain + 597 10
libdispatch.dylib 0x00007fff67c295d6
_dispatch_lane_invoke + 363 11 libdispatch.dylib 0x00007fff67c32c09 _dispatch_workloop_worker_thread + 596 12
libsystem_pthread.dylib 0x00007fff67e7da3d
_pthread_wqthread + 290 13 libsystem_pthread.dylib 0x00007fff67e7cb77 start_wqthread + 15 ); }
System Information
macOS Version 10.15.4 (Build 19E287) Xcode 11.5 (16139)
I had the same issue and I solved it. In my case, I wanted to re-use a NotificationContentExtension between various projects and went one step too far, removing basically every file from the extension. I fixed that by placing one file in the extension that simply inherited from the class that I wanted to reuse but had no further content.
The reason I could figure out that this was the problem was that I tried to install to the simulator instead of my device, and it clearly stated it could not find NotificationExtension. So definitely try to install it to the Simulator in this case, to see if it yields a more detailed error message.

Flutter: unable to install "Runner" error when trying to install flutter app to real iOS device

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
);
}
--
In Xcode go to Window → Devices under Installed Apps delete some apps, and afterwords you could run your app
Removing the app from the device worked for me.
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.
Unable to Install Runner
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. Thanks.
Goto Xcode
Runner > General,
Under Identity, Change "Bundle Identifier",
Run app to the real device,
If you want, change the "Bundle Identifier" back to the original one.
I did all 5 steps , and worked perfectly , thanks to Rens.
I simply changed the build number, it worked just fine.
possible ways: (maybe one of them works)
change the build number.
change the team.
delete the app from the phone or from installed apps in window ->
Devices
unplug the usb cable.
change the bundle identifier.
https://stackoverflow.com/a/73597887/13059465
Try changing the lightning cable for another, use a certificate for more security, that's what I did and it worked
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.
Deleting the app from the device and removing any uncommitted git changes to the ios files worked for me.

Resources