vdugnist / DVAssetLoaderDelegate

Loader delegate for caching AVURLAsset
MIT License
104 stars 28 forks source link

Updates scheme access to avoid meta class changes #14

Open spookyd opened 3 years ago

spookyd commented 3 years ago

I have come across an instance where a 3rd party library impacted the resource loading mechanism. Specifically, I was using the library FirebasePerformance. When this library is installed next to DVAssetLoaderDelegate the asset fails to load. This occurs because FirebasePerformance is doing some manipulation to the class meta data for tracking. The issue is due to the way that DVAssetLoaderDelegate references the scheme property differently. When referencing the class property scheme it looks correct DVAssetLoaderDelegate. However, when the scheme property is accessed by [self class] the output looks like this fir_<UUID>_DVAssetLoaderDelegate. And because of this the isEqualToString check fails.