AppIcon is not being found

白昼怎懂夜的黑 提交于 2021-02-11 15:02:33

问题


I have an old app I'm trying to promote and I'm hitting a wall on what should be something simple, the App Icon

It's a super simple web-based app so I remade the project using a more updated template and it build fine and everything but the app icon is not getting in.

When I try to upload my ipa to the store I get these messages:

ERROR ITMS-90022: "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"

ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/."

Here is what my Contents.json file looks like:

{
    "images":[
        {
            "idiom":"iphone",
            "size":"20x20",
            "scale":"2x",
            "filename":"Icon-App-20x20@2x.png"
        },
        {
            "idiom":"iphone",
            "size":"20x20",
            "scale":"3x",
            "filename":"Icon-App-20x20@3x.png"
        },
        {
            "idiom":"iphone",
            "size":"29x29",
            "scale":"1x",
            "filename":"Icon-App-29x29@1x.png"
        },
        {
            "idiom":"iphone",
            "size":"29x29",
            "scale":"2x",
            "filename":"Icon-App-29x29@2x.png"
        },
        {
            "idiom":"iphone",
            "size":"29x29",
            "scale":"3x",
            "filename":"Icon-App-29x29@3x.png"
        },
        {
            "idiom":"iphone",
            "size":"40x40",
            "scale":"2x",
            "filename":"Icon-App-40x40@2x.png"
        },
        {
            "idiom":"iphone",
            "size":"40x40",
            "scale":"3x",
            "filename":"Icon-App-40x40@3x.png"
        },
        {
            "idiom":"iphone",
            "size":"60x60",
            "scale":"2x",
            "filename":"Icon-App-60x60@2x.png"
        },
        {
            "idiom":"iphone",
            "size":"60x60",
            "scale":"3x",
            "filename":"Icon-App-60x60@3x.png"
        },
        {
          "size" : "1024x1024",
          "idiom" : "ios-marketing",
          "scale" : "1x",
          "filename" : "ItunesArtwork@2x.png"
        }
    ],
    "info":{
        "version":1,
        "author":"xcode"
    }
}

This is how that looks in my csproj file:

    <ItemGroup>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@1x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@2x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@3x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@1x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@2x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@3x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@1x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@2x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@3x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-60x60@2x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-60x60@3x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-76x76@1x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-76x76@2x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-App-83.5x83.5@2x.png">
        <Visible>false</Visible>
      </ImageAsset>
      <ImageAsset Include="Assets.xcassets\AppIcon.appiconset\ItunesArtwork@2x.png">
        <Visible>false</Visible>
      </ImageAsset>
    </ItemGroup>

The files are where they should be and I'm simply at a loss. I also tried renaming the images without the dashes and that didn't work either.

I have all of the required images so I'm not sure why the app can't find it.

I even used an app icon set from another app that is working and still nothing.


回答1:


I found that there are some wrongs with filename.

Generally, the filename defined by Icon-scale*size.png, however your filename contains wrod @3x/@2x more is shown.

Therefore, you could modify the filename as follows:

{
  "images": [
    {
      "filename": "Icon-App-40.png",
      "size": "20x20",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-60.png",
      "size": "20x20",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-58.png",
      "size": "29x29",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-87.png",
      "size": "29x29",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-80.png",
      "size": "40x40",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-120.png",
      "size": "40x40",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-120.png",
      "size": "60x60",
      "scale": "2x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-180.png",
      "size": "60x60",
      "scale": "3x",
      "idiom": "iphone"
    },
    {
      "filename": "Icon-App-1024.png",
      "size": "1024x1024",
      "scale": "1x",
      "idiom": "ios-marketing"
    }
  ],
  "info": {
    "version": 1,
    "author": "xcode"
  }
}

Note: Also can define the filename without -, such as Icon40.png.

=================================Update================================

<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
  <Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon180.png">
  <Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon167.png">
  <Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon152.png">
  <Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon120.png">



回答2:


After a lot of hair ripping and choice words I got it working.

The issue was, I'm using a shared layer that has all the view controllers and business logic and inside of that project was an Assets.xcassets folder that had some shared graphics, when I deleted that folder and did a rebuild, my app icon came back and transporter uploaded the app.

so for anyone who's using a shared layer for storing business logic, don't have multiple Assets.xcassets folders as they'll overlap on you.



来源:https://stackoverflow.com/questions/64469773/appicon-is-not-being-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!