I see that app like twitter has the feature to automatically hide the share extension depending on number of items selected, .ie in Photo app like:
Anybody has any idea on how to obtain something like twitter share extension
Thanks
This can be achieved by setting NSExtensionActivationSupportsImageWithMaxCount in info.plist
Use: Declaring Supported Data Types for a Share or Action Extension
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW8
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/AppExtensionKeys.html
Related
I'm using a UIActivityViewController to enable the user to share photos and videos created with my app. I attached two UIActivityItemProviders to it: one for the media and one for a default text to use ("Created with...").
This works well for all share extensions I tested—except for WhatsApp. WhatsApp only shows the text in the message dialog—no photo or video. When I leave the text blank, however, it will show the media file.
Is there any way I can share a photo or video with a default text/caption via WhatsApp?
I'm facing the same challenge. I implemented my own extension using https://github.com/sascha/SSCWhatsAppActivity. The downside is that you'll get two WhatsApp entries when sharing. WhatsApp's own one, and the custom one. I tried excluding WhatsApp's own extension using UIActivityViewController.excludedActivityTypes with the activityType net.whatsapp.WhatsApp.ShareExtension but since iOS 8.1 this is not possible anymore (on purpose or a bug). More on that here: http://johnszumski.com/blog/excluding-third-party-apps-from-ios-8-share-sheet
My conclusion, there is no way to provide both text + media to WhatApp own sharing extension. I decided to keep my custom WhatsApp sharing extension and name it "WhatsApp (+Image)" so the user can distinguish the two.
When the icon of my Safari app extension icon is touched, I want to change the URL without showing a new view. Doing this comes down to two issues:
How can I use an safari app extension without showing a new view? I just want to perform a background action when the extension icon is pressed.
How can I change the current URL in Safari?
Actually, you might be able to change the URL at the finalize function of your ExtensionPreprocessingJS file
// Note that the finalize function is only available in iOS.
finalize: function(arguments) {
// arguments contains the value the extension provides in
[NSExtensionContext completeRequestReturningItems:completion:].
// In this example, the extension provides a color as a returning item.
document.URL = arguments["newUrl"];
}
It seems like what you're describing is a bookmark, and not an app extension. I would highly doubt that app extensions would allow you to interface with Safari and update the URL, this would be wrong in many regards, including privacy and security. In short, not possible (sorry).
I would like to let users browse photos in their photo albums, tap the action button, and share/open selected photos in my app. Some apps (like Viber and WeChat) provide a custom view to handle this. This is the WeChat screen:
What is the name of this feature and which class do I have to use to achieve this behavior?
You need to do check for share option in the ioS extensions
app extensions
extension programming guide
EDIT:
Removed 3 & 4 links, which are not working. thanks to Daniel.
Share extension can be found inside the Extension programming guide(2nd link > App Extension Types > Share)
You can use UIImagePickerController for the purpose. Find Class reference here Here is a Sample code
Anybody know the linked in custom url scheme to pass the text to the create message screen of linked in iOS App?
I know that "linkedin://share" will open up the create message screen but I need to pass the text that I want to share as well.Anybody know the parameter name for that?
linkedin://messaging/compose/username
I'm trying to show apps from UIDocumentInteractionControllerDelegate , default apple apps like; sms, email or UIPasteBoard (Facebook and Twitter is optional) . Just like the similar of Dropbox app :
How can I handle this kind of situation? I've done already open apps from their UTI's, open just email or just sms but I don't how to show all of them in one sheet.
Thanx
I believe you're looking at an UIActivityController instead of a UIDocumentInteractionController, which I believe Apple is trying to phase out.
Check out the docs here https://developer.apple.com/library/ios/documentation/uikit/reference/UIActivityViewController_Class/Reference/Reference.html
You should try QLPreviewController. This will give you desired result.
https://developer.apple.com/library/ios/Documentation/NetworkingInternet/Reference/QLPreviewController_Class/Reference/Reference.html