Big_Mac
Big_Mac

Reputation: 3044

Crash when loading image Firebase

When loading the main view controller of my app it loads multiple images. Using the sd_setImage(with: reference) method. It has worked forever and now I am suddenly getting crashes with the exception

-[SDImageCache storeImage:forKey:]: unrecognized selector sent to instance 0x600000c60380 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SDImageCache storeImage:forKey:]: unrecognized selector sent to instance 0x600000c60380'

The stacktrace isn't showing a line in my code that's causing the problem. Is this an internal Firebase bug? How do I fix it?

Upvotes: 0

Views: 281

Answers (1)

Charles Jr
Charles Jr

Reputation: 9149

Firebase calls continuous asynchronous calls to the observer. You should always check for nil or NSNull before attempting to present data from the database. You may have a higher resolution image that takes longer to load than it does your view to appear.

Upvotes: -1

Related Questions