Print Shortlink

CUICatalog: Invalid asset name supplied: (null) on iOS

So you’re seeing CUICatalog: Invalid asset name supplied: (null) when running your project in the simulator and you want to get rid of the errors.

This happens when you call [UIImage imageNamed:fileName]; and the fileName you provide turns out to be nil.

There’s not many easy ways to fix this except using the debugger, but where in the code is you’re supplying a nil pointer can be tricky to find!

Here’s where this neat trick comes into play:

1. Go to the breakpoints tab in your Navigator pane.

Step 1


2. Press the + button and click Add Symbolic Breakpoint…

Step 2


3. Fill in the following fields, taking note to include the $arg3 == nil condition

Step 3

That condition is the secret to this magic!

Leave a Reply