Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve "error: Failed to read Info.plist of app (Couldn't load Info dictionary for DVTFilePath)"

Tags:

xcode

ios

I'm using Xcode Version 7.1.1 (7B1005)

The iOS app I'm trying to build was produced by duplicating an existing Mac version of the app, and changing the pertinent target OS settings. I've done this before successfully with another app without any major issues. However, the Info.plist file for this app (which was directly copied from the working app) is possibly causing some kind of issue.

  • The "Info.plist file" setting in the Xcode Build Settings for the iOS version is set to the correct path. If I set it to a non-working path, I get a different error (ProcessInfoPlistFile reports an error)
  • I checked the built app bundle, and it did contain an Info.plist file.

Here are the errors that my issue produced:

replacing existing signature
bundle format unrecognized, invalid, or unsuitable

Command /usr/bin/codesign failed with exit code 1

I worked around the first error by adding --deep to the codesign flags. After adding that I would get this error:

Validate /Users/me/Library/Developer/Xcode/DerivedData/long string of characters/Build/Products/Debug-iphoneos/my\ app\ name.app
    cd /Users/me/Perforce/workspace/project/Platforms/OSX
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export PRODUCT_TYPE=com.apple.product-type.application
    builtin-validationUtility /Users/me/Library/Developer/Xcode/DerivedData/long string of characters/Build/Products/Debug-iphoneos/my\ app\ name.app

error: Failed to read Info.plist of app /Users/me/Library/Developer/Xcode/DerivedData/long string of characters/Build/Products/Debug-iphoneos/my app name.app (Couldn't load Info dictionary for <DVTFilePath:0x7f97125bb4b0:'/Users/me/Library/Developer/Xcode/DerivedData/long string of characters/Build/Products/Debug-iphoneos/my app name.app'>)
like image 712
Tim R. Avatar asked Dec 15 '15 02:12

Tim R.


3 Answers

This issue was occurring because I had a folder named "resources" in my app's root directory. Renaming this folder to "stuff" resolved this error, but is pretty inconvenient because of the way our resources are set up.

I'm guessing iOS has an undocumented "resources" folder in the app folder structure, and adding a "resources" folder to your app conflicts and overwrites some metadata in there.

The original error I was getting started appearing after I added --deep to my codesign flags, which was not actually needed.

like image 115
Tim R. Avatar answered Oct 22 '22 11:10

Tim R.


The same issue always happens after creating a folder such as the very common one supporting files or any other folderName and put your info.plist file in there. Here is how to fix it: - Project -> Targets -> Select your app -> Build Settings -> Packaging -> Info.plist -> Double tap the old file path and change it to the new file path.

for example, if you created a folder named Supporting Files and moved your info.plist file in there, the new file path should be: - YourAppName/Supporting Files/Info.plist

like image 33
Mussa Charles Avatar answered Oct 22 '22 12:10

Mussa Charles


For me, restarting my computer fixed the issue. Nothing else worked.

=/

like image 31
William henderson Avatar answered Oct 22 '22 12:10

William henderson