Merc
Merc

Reputation: 343

Asset Catalog Compiler Warning for no reason

I'm using Xcode 5.1.1

In images.xassets i'm trying to upload my launch image. It's a 640x960 launch image for iPhone portrait iOS 7 2x and i'm receiving an error stating "An iPhone Retina (4-inch) launch image for IOS7 and later is required". The thing is I created a new launch image called LaunchImage-1 and i uploaded my 640x960 launch image in the same iPhone portrait iOS 7 2x and it's NOT giving me that error. Actually i just had an image inside the regular LaunchImage folder of that size only i decided to change the launch image and now i'm getting this error. I don't know why i'm getting this error out of nowhere. Also when i put in the 640x960 image (as stated by required size) i turn on the simulator and my 4-inch simulator uploads a 3.5 inch screen with top and bottom black.

My current deployment target is for 7.1. Why am i getting this error?

Upvotes: 9

Views: 6709

Answers (5)

Rubaiyat Jahan Mumu
Rubaiyat Jahan Mumu

Reputation: 4127

In the Asset catalog Compiler - options under the Build Settings tab of your affected target, remove "Global Accent Color Name" keyValue.

Upvotes: 26

Max P
Max P

Reputation: 1

I had the same error, and I realized this warning appeared because I accidentally deleted AccentColor from assets folder. So I just opened another instance of Xcode, created blank project and copied AccentColor from there back to my project. Alternatively, you can just open Assets.xcassets folder in Finder and manually create new folder named "AccentColor.colorset" and inside this folder - create "Contents.json" file with such content:

{
  "colors" : [
    {
      "idiom" : "universal"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}

Upvotes: 0

MGY
MGY

Reputation: 8463

Xcode 12 and Later

Steps:

  • Open Assets.xcassets
  • Add a new Color Set and use the name AccentColor

How to add a new color set AccentColor xcode

  • Pick any color you wish

How to add a new color set AccentColor in xcode xcode12 xcode13

The Warning will disappear.

Tested on the Xcode 13 too

For more information please check the official Apple documentation.

Upvotes: 13

Jay
Jay

Reputation: 6638

BTW, you can turn the Asset Compiler warnings off if they just annoy you and don't provide anything helpful (as they often seem to do in my experience).

Just go to the Build Settings, to the Asset Catalog Compiler - Options section and turn them off:

enter image description here

Upvotes: 7

ZAZ
ZAZ

Reputation: 593

Try cleaning it using Option+Shift+Cmd+K

Upvotes: -1

Related Questions