Pregunta

For some reason the editable property for an ALAsset object is always set to false in the following code:

ALAsset *testAsset = [[ALAsset alloc] init];

if(!testAsset.editable)
{
    NSLog(@"This always prints.");
}

I'm trying to set image data to this asset and then save it to an asset group, but can't because it's not editable. Apple documentation says I can only edit ALAsset objects that I create myself, which I'm doing in the code above. Any thoughts?

¿Fue útil?

Solución

Apparently my method above of creating a new ALAsset object is not the way to do it: How to create a new ALAsset from downloaded image

That post says it's necessary to save the image first before obtaining the ALAsset. I'll plan on doing that and then adding the asset to my custom asset group (album).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top