GifItemProvider
An extended UIActivityItemProvider to share GIF in Twitter and Facebook with UIActivityViewController
Install / Use
/learn @Sweaty-Chair/GifItemProviderREADME
GifItemProvider
An extended UIActivityItemProvider to share GIF in Twitter and Facebook with UIActivityViewController
Twitter: The default UIActivityViewController Twitter share doesn't support it yet which it will "scale down" it as a still JPG. However somehow it works for GIF less than 100kb (tested in iOS 9) and I don't know why. Therefore, I have to use SLRequest to upload the GIF. When the SLRequest is done and return, dismiss the UIActivityViewController The downside of that is no preview share sheet and users cannot type their own message anymore.
Facebook: Upload to Giphy first, and provide the giphy URL to UIActivityViewController instead of the file contents, Facebook with recognize it and show the animated GIF
Usage:
// Init the GifItemProvider
GifItemProvider *gifItem = [[GifItemProvider alloc] initWithPlaceholderItem:@"file://myGIFfilePath"];
// Includess the gifItem in an array
NSArray *items = [NSArray arrayWithObjects: gifItem, @"some string", @"http://some.url", nil];
// Use it in UIActivityViewController
UIActivityViewController *activityController = [[[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil] autorelease];
[UnityGetGLViewController() presentViewController:activityController animated:YES completion:NULL];
P.S. I am a iOS newb and code may be messy and hard coded, will come back for it when I getting better in Objective-C
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
