michaelderiso
michaelderiso

Reputation: 163

Why is my app crashing at launch because of an ibShadowedLargeTitleTextAttributes error?

I'm building an app for iOS and using Storyboard for the UI. I am using the traditional UINavigationController and it's classes. The title is prefersLargeTitles and the title color is a named color I have created. The app is working perfectly fine when I run it on iOS 13, but then when I run it on iOS 12, it crashes on launch and returns the error:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ valueForUndefinedKey:]: this class is not key value coding-compliant for the key ibShadowedLargeTitleTextAttributes.'

I have not messed with the ibShadowedLargeTitleTextAttributes.

I tried some of the solutions that are provided in this Stack Overflow question, however, none of them are working. The problem still occurs even when I delete the navigation controller and when I set the title to standard (not large titles).

I expected the app to run smoothly on all operating systems because I haven't really changed any options in Storyboard. I do experience a pop-up when I launch Xcode though:

Title: The document "Main.storyboard" had an internal inconsistency that was found and repaired.

Body: This may be due to an SCM operation such as merging. Please save the document to fix the inconsistency.

Details: Multiple resources have the same name: POBlue ← That is the name of my named color.

What could the crashing be caused by? Could it be because of the named color or something else I'm not realizing?

Upvotes: 1

Views: 656

Answers (1)

Ashley Mills
Ashley Mills

Reputation: 53171

I had the same problem and solved it like this…

Open the .storyboard file in a text editor, and and the bottom you'll see a <resources> tag

Within <resources>, you'll probably find something like

<namedColor name="POBlue">
    <color red="xxx" green="yyy" blue="zzz" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="POBlue">
    <color red="xxx" green="yyy" blue="zzz" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

Remove one of the POBlue entries and save the file.

Open again in Xcode and the error should be gone

Upvotes: 1

Related Questions