UnityNativeShare icon indicating copy to clipboard operation
UnityNativeShare copied to clipboard

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

Open daltonbr opened this issue 2 years ago • 4 comments

Thanks for this great plugin @yasirkula !

Description of the bug

  • When trying to share a single image (no text) on Instagram in iOS 16.2 or older, we get a quick dimmed screen, and no share happens (the app doesn't crash, at least)
  • Issue not present in Android.
  • Sharing through other apps works as usual.
  • This is a minor issue since it doesn't happen in iOS 16.3

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

  • Unity version: 2019.3.9f1 LTS
  • Platform: iOS 13.1 until 16.2 (on 16.3 and onwards, the issue went away)
  • Device: reproduced in
    • iPhone 13 Pro - iOS 16.2
    • iPhone 11 - iOS 16.1.1
  • How did you download the plugin: The asset was downloaded through GitHub, and we are currently using the latest v1.4.9

Additional info

  • I'll try to gather some specific logs from the devices and add them later.
  • We are also using BeeByte Obfuscator (as I see another issue regarding Android)

daltonbr avatar Feb 22 '23 15:02 daltonbr

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?

yasirkula avatar Feb 24 '23 20:02 yasirkula

@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

daltonbr avatar Feb 28 '23 16:02 daltonbr

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

yasirkula avatar Mar 01 '23 09:03 yasirkula

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

daltonbr avatar Mar 06 '23 08:03 daltonbr