Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Sharing GIF on iOS #22

Open
hippogamesunity opened this issue Jul 11, 2018 · 20 comments
Open

Sharing GIF on iOS #22

hippogamesunity opened this issue Jul 11, 2018 · 20 comments

Comments

@hippogamesunity
Copy link

hippogamesunity commented Jul 11, 2018

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!

@yasirkula
Copy link
Owner

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:

UIImage *image = [UIImage imageWithContentsOfFile:filePath];
if( image != nil )
[items addObject:image];
else

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.

@hippogamesunity
Copy link
Author

Cool, thanks! I'll check it!

@hippogamesunity
Copy link
Author

hippogamesunity commented Jul 17, 2018

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.

@yasirkula
Copy link
Owner

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 :/

@hippogamesunity
Copy link
Author

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.

@Rajat-Parihar
Copy link

hello , sorry for my noob question but

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

@hippogamesunity
Copy link
Author

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

PS. This question relates to my asset GIF Replay.

@yasirkula
Copy link
Owner

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

@Rajat-Parihar
Copy link

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

@yosun
Copy link

yosun commented Oct 24, 2018

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?

@yasirkula
Copy link
Owner

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.

@magnitocorp
Copy link

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.

@yasirkula
Copy link
Owner

@magnitocorp Please see #5

@MuhammadGhilman
Copy link

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.

@yasirkula
Copy link
Owner

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

@MuhammadGhilman
Copy link

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.

@yasirkula
Copy link
Owner

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

@MuhammadGhilman
Copy link

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

@MuhammadGhilman
Copy link

MuhammadGhilman commented Aug 13, 2021

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

@yasirkula
Copy link
Owner

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants