I am storing several .svg files in an asset catalog. To retrieve an asset I use the following code:
NSDataAsset *asset = [[NSDataAsset alloc] initWithName:@"p"];
When running this code I get the following log message:
CoreUI: attempting to lookup a named data 'p' with a type that is not a data type in the AssertCatalog
The name of the file is 'p.svg' which is stored in a folder with 'dataset' as extension. I tried using other extensions for the file but nothing works. I always get the same error and the asset is nil.
This may be related to a problem I'm having, in that the UTI I'm identifying my assets as being could run up the UTI dependancies and find public.image
, thus making CoreUI think the asset is an image type and not a data type.
SVGs inherit from public.image
, so you will need to set the File Type to something that doesn't inherit from public.image
. Having it be just public.data
will suffice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With