App installation failed: Could not write to the device

前端 未结 30 1996
误落风尘
误落风尘 2021-02-04 23:07

In Xcode 6.3, I got this error when trying to run an iOS project written in Swift on a real device.

App installation failed

c

30条回答
  •  悲哀的现实
    2021-02-04 23:37

    This error has many potential root causes, as can be seen by the large variety of suggested answers. The best approach to troubleshooting app installation issues like this one is usually to inspect the console of the iOS device itself, as that'll often provide much more specific error messages. In Xcode open the 'Devices and Simulators' window and take a peek at the logs of the device where your app is being installed.

    In my case, the "Could not write to the device" error was being caused by this:

    Feb 27 10:54:58 iPhone-7-110 installd(MobileSystemServices)[46] : 0x16f92f000 -[MIBundle _validateWithError:]: 38: Failed to load Info.plist from bundle at path /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.ebmR6U/extracted/SampleApp.app/Frameworks/SomeFramework.framework

    Which clearly hints at what's actually going on. I had forgotten to set an Info.plist file for my dynamic framework target (used by the app).

提交回复
热议问题