#iOS Media Services not working

1 messages ยท Page 1 of 1 (latest)

brisk light
#

We're having problems with media not being saved on iOS
Essentialkit v3.2.0
cc @elder blade

river hull
#

Can you please update to latest version and confirm?

brisk light
brisk light
river hull
#

The code seems to be proper from your end. I will double check on my end and update after the test.

brisk light
river hull
#

@brisk light @elder blade
I was able to reproduce with only your code and realized only later after spending several hours that it was the issue with the filename passed.

It's always good to use Date.Now.Ticks instead of Date.Now for random name as the later changes based on the locale.
While locale is not a concern here, but having the special chars not allowed in the filename is the issue.

Unfortunately, ios just throws random "PHExternalAssetResource: Unable to issue sandbox extension for ..." error description leading to further delay.

Anyways, I additionally handled some edge cases too by revisiting this specific code. The fixes will be in 3.3.1 and also sharing here the latest code if you need it.

Summary
Make sure there are not / or special chars in the filename being passed.
DateTime.Now => DateTime.Now.Ticks

#

Also, Note that passing directory(album) name may need additonal permissions (full access to photo library!) instead of just add.
If your game really needs to have a separate album, go for it. But else, just add permission would suffice.

elder blade
#

ah got it

#

to be safe that should be applied for android platform too right?

river hull
#

Yep!

river hull
#

๐Ÿ‘

#

If you like our plugin, please recommend and rate us on asset store. It helps us a lot ๐Ÿ™‚