Placing picture into local album on iOS

NOTE: this question is also on SO.

According to expo documentation:

MediaLibrary.addAssetsToAlbumAsync(assets, album, copyAssets) this would save assets to a camera roll.
My code is here:

const photoData = await; const asset = await MediaLibrary.createAssetAsync(photoData.uri); const storeInAlbum = MediaLibrary.addAssetsToAlbumAsync(asset, 'testingRoll', false)

I can confirm the picture is taken. Also that the picture is saved to my general camera roll. However the storeInAlbum does not place the asset in album. I don’t get an error, just doesn’t do anything.

I can confirm “testingRoll” is a valid album. I’ve ran this to ensure that we have access to it:

I have even attempted to push asset into an array assets. Still no luck. What am I missing here?

Hey @impactcolor,

This may just be an omission from your forum post but you’re missing an await before you call MediaLibrary.addAssets....


I fixed that just now but still not appearing.
Is the asset being passed correct by being the uri only?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.