yasirkula / UnityNativeShare

A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS
MIT License
890 stars 131 forks source link

Can't share image (without text) in Instagram with iOS 16.2 or older #167

Open daltonbr opened 1 year ago

daltonbr commented 1 year ago

Thanks for this great plugin @yasirkula !

Description of the bug

Reproduction steps

A quick video trying to share in iPhone 13 Pro. https://user-images.githubusercontent.com/10944679/220680141-9217f6e0-4951-4dff-aa2c-d7cb333d5b47.mov

Platform specs

Additional info

yasirkula commented 1 year ago

Thank you for the very detailed Issue! May I ask: does this issue occur when sharing an image from WhatsApp to Instagram or Photos to Instagram on problematic OS versions?

daltonbr commented 1 year ago

@yasirkula So on those affected devices, we can share images from WhatsApp to Instagram and Photos to Instagram.

I got a log from our QA but couldn't find anything relevant there.

insta sharing logs.txt

yasirkula commented 1 year ago

This log could be relevant:

CGImageCopyImageSource:4607: *** CGImageGetImageSource: cannot get CGImageSourceRef from CGImageRef (CGImageSourceRef was already released)

I'm not passing CGImages to the share sheet though, only UIImages. Something I'm unaware of might be happening in the background. If you wish, you can try sharing images as files instead of UIImages: https://github.com/yasirkula/UnityNativeShare/issues/22

daltonbr commented 1 year ago

Thanks for the insight, @yasirkula; I'll investigate that.