4

If you try to run the app on a real device
The following error appears and cannot be executed.
Why does this happen?
Are there any settings that should be reviewed?

Issue Details

Unable to install "AppName"
Domain: com.apple.dtdevicekit
Code: -402653103
--
App installation failed
Domain: com.apple.dtdevicekit
Code: -402653103
Failure Reason: Could not inspect the application package.
User Info: {
    DVTRadarComponentKey = 487927;
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x0000000122d066e7 DTDKCreateNSError + 109
    1   DTDeviceKitBase                     0x0000000122d06de9 DTDK_AMDErrorToNSError + 792
    2   DTDeviceKitBase                     0x0000000122d4656a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
    3   DVTFoundation                       0x0000000108a03156 DVTInvokeWithStrongOwnership + 73
    4   DTDeviceKitBase                     0x0000000122d46301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
    5   IDEiOSSupportCore                   0x0000000122bcea25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
    6   DVTFoundation                       0x0000000108b343ba __DVT_CALLING_CLIENT_BLOCK__ + 7
    7   DVTFoundation                       0x0000000108b35a92 __DVTDispatchAsync_block_invoke + 809
    8   libdispatch.dylib                   0x00007fff588ea5f8 _dispatch_call_block_and_release + 12
    9   libdispatch.dylib                   0x00007fff588eb63d _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x00007fff588f18e0 _dispatch_lane_serial_drain + 602
    11  libdispatch.dylib                   0x00007fff588f2396 _dispatch_lane_invoke + 385
    12  libdispatch.dylib                   0x00007fff588fa6ed _dispatch_workloop_worker_thread + 598
    13  libsystem_pthread.dylib             0x00007fff58b2b611 _pthread_wqthread + 421
    14  libsystem_pthread.dylib             0x00007fff58b2b3fd start_wqthread + 13
);
}
--

Tried

  • Provisioning profile has been recreated.
  • Installed the created profile on the device.
  • Cleaned the project.
  • Deleted data in ~ / Library / Developer / Xcode / DerivedData.

Environment

  • Xcode : 11.2.1
  • macOS : 10.14.6 Mojave
  • Device : iPhoneX
  • iOS : 13.1.2
rmaddy
  • 314,917
  • 42
  • 532
  • 579
LionKamado
  • 85
  • 1
  • 1
  • 4
  • I am not sure but you can try by enabling legacy build system in the xcode workspace and check once – guru Nov 15 '19 at 07:04
  • Thank you for answering! However, it is already set to Lagacy Build System...X-( – LionKamado Nov 15 '19 at 07:06
  • I would suggest unpair device and trust the computer again. let try it. – guru Nov 15 '19 at 07:09
  • Thank you! Window > Devices and Simulator from Run Unpair Device I trusted again. A similar error is displayed... – LionKamado Nov 15 '19 at 07:18
  • I experience the same with `Xcode 11.2.1` but with `macOS 10.15.1`. Also tried reattaching the device and restarting the OS but no luck. However trying with another device doesn't gave the error. – Laszlo Nov 15 '19 at 10:39
  • possible duplicate: https://stackoverflow.com/questions/26015194/xcode-could-not-inspect-the-application-package – christian mini Nov 15 '19 at 10:58
  • @christianmini well, possibly, but that one is 5 years old, while this one is really a present issue. – Laszlo Nov 19 '19 at 15:07
  • The answer is in the following comment: https://stackoverflow.com/a/50719379/10353503 – Magy Elias Dec 17 '19 at 13:39

6 Answers6

5

Try to build for another device, then retry with the first one.

I know this is not a real solution but that was the only what worked for me. Also I made a bug report with Apple feedback Assistant, I will update you if the gave a proper solution or response.

Update #1:

After Apple checked my sysdiagnose it was the following for me: The app is malformed. The file at "$(PRODUCT_MODULE_NAME).app/Frameworks/SwiftyJSON.framework/Info.plist" is missing. Frameworks must be valid bundles with an Info.plist.

My current fix:

  1. Clean Build Folder
  2. Remove Derived Data (use DevCleaner)
  3. Commit all changes to git
  4. Delete Xcode project folder
  5. Discard uncommitted changes
  6. Pod install
  7. Rebuild and cross fingers

As a 0. element I will insist you to make your coffee and take a snack ...

Update #2:

Now I fell into a hole where nothing above helped. But for me, it looks like the issues framework is SwiftyJSON. I made an issue, maybe someone has a proper solution.

Update #3:

I managed to build my project using Xcode Version 11.0 (11A420a) while using the latest command line tools from Xcode 11.3 (11C29).

Update #4:

I still got this mess after changing branches, this is the latest fix order for me, which works like 90% of the time ... the other 10% is due to a missed step I guess.

  1. Clean Build Folder
  2. Remove Derived Data (use DevCleaner)
  3. Pod deintegrate
  4. Pod install
  5. Rebuild and cross fingers
Laszlo
  • 2,803
  • 2
  • 28
  • 33
1

Hello rebuilding(clean) the App helped me.

1

I face same issue. I checked i was using production professional profile then i select automatically manage sign.

It's work for me.

Khurshid Ansari
  • 4,638
  • 2
  • 33
  • 52
0

I'm on Apple M1, Device iOS 14.6, xcode 12.5.1

In my case Deleting project, Derived data, clean project, deinit & init pod, Delete project folder & clone it again nothing was worked out. But when I removed SwiftyJSON pod & install pod then install app on Device it was working. Then I add SwiftyJSON pod again & install pod so it was working fine. It's strange.

Before removing SwiftyJSON I had got Firebase/Crashlytics pod error which was suggesting me to run this command pod repo update.

urvashi koladiya
  • 168
  • 1
  • 11
0

I also faced this problem at many times:

Best solution: Try to get fresh clone of the project.

Some times below steps will work:

git reset
git checkout .
git clean -fdx

pod cache clean --all
pod install
Ekambaram E
  • 1,184
  • 1
  • 11
  • 9
-2

It was an error that occurred due to a bug in the framework.
If you reinstall the problematic framework correctly
The error has disappeared.
Thank you very much.

LionKamado
  • 85
  • 1
  • 1
  • 4
  • 2
    This is not a useful answer. Please add more details about what framework caused the issue, what you did to fix the problem, steps, etc. Thank you! – Liam Bolling Jan 05 '20 at 21:38