UnityNativeShare icon indicating copy to clipboard operation
UnityNativeShare copied to clipboard

Sharing GIF on iOS

Open hippogamesunity opened this issue 7 years ago • 20 comments

Hi! As you said me in email, "I was able to share gifs with only half of the apps in the share sheet". That's why you decided to share static images on iOS. Maybe you could add a parameter or a overriding call to unlock the feature for sharing GIFs on iOS? Having such feature would be very useful for me even if I could share it with not all apps from a list. Thanks!

hippogamesunity avatar Jul 11 '18 16:07 hippogamesunity

Thanks for opening this issue. I'll add a link to it as a workaround for this issue in README.

To support animated gif files on iOS, simply remove these 4 lines from NativeShare.mm: https://github.com/yasirkula/UnityNativeShare/blob/ae2e13d17e477f6a93016897b4fa326146fa4e1e/Plugins/NativeShare/iOS/NativeShare.mm#L20-L23

I don't want to add a parameter for this because after this change, some apps just stop accepting the gif file as an attachment. They won't even accept it as a static image whereas at its current state, they do accept gif files as static image attachments. So, I'd prefer this solution to be a "use at your own risk" workaround rather than an official part of the plugin.

yasirkula avatar Jul 11 '18 17:07 yasirkula

Cool, thanks! I'll check it!

hippogamesunity avatar Jul 11 '18 20:07 hippogamesunity

I was able to test the new build of Pixel Studio. I was not able to reproduce your issue. Can you provide the reproduction steps to the issue you are talking about? I can share GIF with Gmail and also save it to iOS Photos with Share dialog. In both cases I get animated GIF. If I share it to Facebook, it becomes a static image on my wall.

hippogamesunity avatar Jul 17 '18 17:07 hippogamesunity

It didn't work for some of these apps: Twitter, Facebook Messenger and/or the mail app. I can't remember which one(s) exactly :/

yasirkula avatar Jul 17 '18 17:07 yasirkula

Yes, it doesn't work with Messenger as I suppose it doesn't support GIF. But it works wit Facebook, but Facebook will contert it to static image. Didn't try Twitter yet.

hippogamesunity avatar Jul 17 '18 17:07 hippogamesunity

hello , sorry for my noob question but

UnityNativeShare/Plugins/NativeShare/iOS/NativeShare.mm i dint find that in my project

Rajat-Parihar avatar Aug 16 '18 12:08 Rajat-Parihar

@Rajat-Parihar why no to use search?) Assets\GifAssets\NativeShare\Plugins\iOS\NativeShare.mm

PS. This question relates to my asset GIF Replay.

hippogamesunity avatar Aug 16 '18 12:08 hippogamesunity

NativeShare.mm is located at Assets/Plugins/NativeShare/iOS/NativeShare.mm, if you import NativeShare.unitypackage to your project.

yasirkula avatar Aug 16 '18 18:08 yasirkula

Thanks for your support guys, I remove those 4 lines for NativeShare.mm file but still can not share gif file through whats app

Rajat-Parihar avatar Aug 17 '18 05:08 Rajat-Parihar

Hi! Can you explain more about the issue of gif share only as static images? Is this due to the format that NativeGallery writes it in?

yosun avatar Oct 24 '18 00:10 yosun

While trying to share an animated gif file, as far as I remember, sharing on Facebook and/or Twitter didn't work for me. But using a UIImage to share the gif as a static image did work for those social platforms. So I used UIImage for maximum compatibility in NativeShare.

yasirkula avatar Oct 24 '18 19:10 yasirkula

Hi Yasirkula, Thanks for sharing your plugin. I just wondering, is there a way I can get a callback if the sharing was successful? so I can give a reward if the users really shared the content. Thanks.

magnitocorp avatar Jan 03 '19 03:01 magnitocorp

@magnitocorp Please see https://github.com/yasirkula/UnityNativeShare/issues/5

yasirkula avatar Jan 03 '19 09:01 yasirkula

Hi, I hope you are fine. first of all thanks for sharing a very good work. I am using this. but I faced a problem. As I can share images on very media. but it is not same with text. I can share text(URL) on WhatsApp, SMS, MMS, Gmail, Twitter(Direct message) and on yahoo mail. But can not share on Facebook Messenger, Instagram message, Skype, and Viber. i have read about Facebook in you documentation. Instagram may have save explanation like FB Messenger. but there is a need of description about Skype sharing. Kindly guide me. i need your help.

I will be waiting for your response.

MuhammadGhilman avatar Jun 25 '21 11:06 MuhammadGhilman

Is the image shared successfully after removing the text(URL)?

yasirkula avatar Jun 25 '21 11:06 yasirkula

yes we can share image. with text and URL. there is no problem with image sharing. problem with the text and URL sharing. we can only share image on Facebook messenger, Instagram Message, Skye an Viber but not with text and URL. I am giving image, Text and URL, as you give the code on git. But and the end receiver only receives image but not text and URL. I want to share Text and URL. image is not important for me right now.

MuhammadGhilman avatar Jun 25 '21 12:06 MuhammadGhilman

Since images aren't as important as the text, does removing all AddFile calls not work?

yasirkula avatar Jun 25 '21 14:06 yasirkula

Yes with out picture I can share text and URLs. its woring fine. with picture is can not send.

MuhammadGhilman avatar Aug 13 '21 10:08 MuhammadGhilman

There is an othere problem. When i am tring to share Text and URL (working with every media on android), its not working with skype on iOS. 104 error is being displaye, when i try to share with skype on iOS. can you guide me. image is attached bellow.

IMG_06221

MuhammadGhilman avatar Aug 13 '21 10:08 MuhammadGhilman

Please create a new Issue if it isn't related to this issue (Sharing GIF on iOS9) the next time. Does logging out of Skype and then logging back in help? For testing purposes, does omitting url or text help? How about appending url to text?

yasirkula avatar Aug 13 '21 12:08 yasirkula