I am assuming it is not possible to add apps to the native share dialog, like the one used in the Camera Roll. However I see screenshots around with different apps in the dialog.
Is it only apps that are integrated in the OS that can be in this dialog? Or is it possible with some scheme or something?
I have researched the possibilities of UIDocumentInteractionController mentioned by 'The Tiger' and came to the conclusion that it is not possible.
I have looked at the Apple Documentation, declaring the Document Types in the info.plist works for other apps but not for Mail, Images / Camera Roll / etc; the native share dialogs.
Edit:
I really don't get the downvotes....
Here are some references that say it is not possible:
https://devforums.apple.com/thread/140939?tstart=0
why-cant-i-register-my-ios-application-to-handle-the-image-file-type
register-app-to-open-image-files
associate-audio-and-video-types-with-iphone-app
add-a-file-association-with-tiff-files-on-ios
associate-image-file-types-utis-with-ios-app-doesnt-show-open-in-in-m
You need to subclass UIActivity to achieve this.
Theres an example for Dropbox:
https://github.com/goosoftware/GSDropboxActivity
Register your app as supporting the file types that you want to open and add the code to open them. See Document Interaction Programming Topics.
Related
I've never written any code with Objective-C and I'm as lost as you can be.
My App is in React Native but I couldn't find a way to achieve this so I had to start to search for a solution using Native Code.
What I basically need to do is taking a file I downloaded in my app's sandbox and open it in other app (PowerPoint) without actually showing the Share Screen Modal where the user selects the other App.
I know that when "Sharing" the file is copied into the PowerPoint's folder but I'm not sure if I'm able to do this kind of actions.
I was told to use this -> UIDocumentInteractionController but like I said, I'm not sure if it allows me to do that.
Any suggestion is welcome !
Thanks in advance !
I would like to add my app to the UIActivityViewController in other apps. How can I add/register my app to allow other apps to send content to my app? How should I receive this content?
Thank you very much to all of you that answered to my question.
With your answers I realized I have to use a Shared Extension. I have found a really nice video that explains how I have to handle the received information: https://www.youtube.com/watch?v=TBC2m8BbcCE. Maybe it could be useful for somewhere in the future.
In your Xcode project, go to file > new > target and select "Share Extension".
Your Share Extension is the extension that will provide an option in the share sheet inside other apps.
To learn more about share extensions, check out Apple's guide.
I' using an UIDocumentationInteractionController to show all compatible apps which can open the files stored in my app. It has always worked well, however I have noticed that with iOS 8 it shows only the apps and not the App Extensions. In the official documentation I can't find anything about that. Is it a bug or a deliberate thing? Do we need to use the UIActivityViewController instead?
As far as IOS 8.1 UIActivityViewController is the only extension point for the share & action extensions. so yes, if you wish to allow share extensions you must switch to UIActivityViewController.
You can read about it in this blog post:
http://getnotebox.com/developer/uiactivityviewcontroller-ios-8/
Here is a pretty good guide on using UIActivityViewController:
http://nshipster.com/uiactivityviewcontroller/
I'm creating a messaging app and I would like to enable other apps to share text to my app via the share menu option.
How do I get my app listed in there?
This is the menu I would like to get listed in:
In iOS 8, Apple has now enabled a way for you to add your application to a user's Share Sheet as one of many features of Extensibility, which aims to make your app available to the user even when closed.
You can read a lot more about share extensions here, or go straight to Apple's pre-release documentation to dive into the code.
Update: Above link of Apple documentation is not working, check here App Extension Programming Guide: Share
You can do this by adding a few entries into your apps info.plist.
Here's a post that should answer this for you.
slashdot post
also here another link
You can't automatically be added to the UIActivityViewController in other apps. The only things that appear on that "share menu" are a few predefined apps that Apple has added support for, as well as any other app specific activities an app decides to add.
You can setup your app to appear in a list of apps for opening a file but that is not the same as what you are asking for here.
I create a UIActivictyController in my app, but i want to give the option to open in dropbox, pages and other programs installed.
I know that UIDocumentInteractionController give this options, but how can i give this options in UIActivityController?
REActivityViewController is probably what you are looking for. It also allows color icon images as well :)
Using UIDocumentInteractionController, ios gives you an interface similar to UIActivityController, but also with Open In apps option enabled according to the file extension.