xcodevalidationarchive

Xcode's archive validation error "Missing Info.plist value" for a "Hello world" project


I'm able to reproduce the errors with an untouched "Hello world" proj created from Xcode (File -> New -> Project). I then follow some instructions, making suggested changes, as seen below, from google search, but the same problem occurs:

  1. Expand AppIcon set to include All sizes for iOS.
  2. Add Icon Name = AppIcon to Info.plist.

Below are the errors:

Asset validation failed
Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'alodotad.test-1'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7. (ID: b9c6bcae-6ea1-4343-b173-e2c3c71f2ec9)

Asset validation failed
Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface (ID: 02055686-c98c-4823-8041-9a77e46af895)

Xcode: Version 15.2 (15C500b)

Based on my understanding, I already have the key CFBundleIconName in Info.plist, and that my AppIcon file has 120x120.png icon. What else do I need to check?


Solution

  • Below is a solution

    1. In the Info.plist file, add key Icon Name, with the value of AppIcon.
    2. Select the icon file, AppIcon, and then in the Inspector (on the right), for the iOS option, change from Single size to All sizes.
    3. Generate icon files for the reported missing sizes, and copy them to AppIcon.appiconset folder. You can go to this folder by right-clicking the name of AppIcon in the listing of Assets entry (in the Project navigator). Then modify the JSON file, Contents.json (also in the same folder) to include the entries for the new icon files.
    4. Create a new archive and validate again, Product -> Archive (Clear the build folder if needed). It should work now.

    I've pushed the changes to the github repo, "Hello world" proj.