ERROR: Identical key for two renditions (Xcode 10.1, Mojave 10.14.1)

Viewed 1328

I am trying to convert a macos app from High Sierra Xcode 9.x to Mojave with Xcode 10.1

I am getting an error on my Asset.xcassets. ERROR: Identical key for two renditions

I did have some warnings on icon sizes in the Asset.xcassets folder, which i fixed. That wasn't the issue. I have removed the Asset.xcassets folder and copied my information back in. That wasn't the issue.

I have searched and had little luck. This is the error (Revealed in Log)

(M)Key element: Named Element part: Artwork Image size: (null) direction: 0 - Horizontal value: (null) identifier: 795 dimension1: 0 dimension2: 0 state: (null) presentationState: (null) previousState: (null) previousValue: (null) layer: (null) scale: 1 gamut: sRGB target: (null) appearance: (null)

Rendition1 TDRenditionEntry: 0x7fb08c854170

/* com.apple.actool.errors */ ../MacApp/Asset.xcassets: error: ERROR: Identical key for two renditions

(M)Key element: Named Element part: Artwork Image size: (null) direction: 0 - Horizontal value: (null) identifier: 795 dimension1: 0 dimension2: 0 state: (null) presentationState: (null) previousState: (null) previousValue: (null) layer: (null) scale: 1 gamut: sRGB target: (null) appearance: (null)

Rendition1 TDRenditionEntry: 0x7fb08c854170

I'm not sure how to determine which ones are identical or needless to say, what is identical? New to swift and xcode.

2 Answers

I had this same error. I accidentally imported the same asset file for both the 3x individual scale and the All Scales images in one of my image sets.

The app compiled and ran fine, but gave me this error when I trued to archive it. I didn't need both individual and single scales, so I changed the scales to individual, deleted the extra file, and that solved it.

I had the same issue. In my case, it was because of the duplicate asset name in the asset catalog. Once, renamed the duplicate file. It got archived successfully. It is very frustrating to find out that this sort of issue is being picked up by the compiler during a normal build/run process.

Related