iOS 13 PHImageManager requestImageForAsset Crash

Exception/crash upon calling PHImageManager requestImageForAsset:targetSize:contentMode:options:resultHandler:


"uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity."

Happens 100% of the time when requesting images for assets that are not yet loaded locally on the phone.

Made sure PHAsset is not nil. Also tried with a variety of options/modes.


This is a new crash on iOS 13.


Similar assets don't load on apps like Instagram either (only load properly on Apple's photo app), so something off on iOS13. However, Instagram manages not to crash in this case. While loading the image properly would be ideal, I'm trying to at least handle this gracefully and not crash, like Instagram does. Unfortunately try/catch doesn't catch this exception somehow. Any tips on how to handle this?