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.
Related
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 have a requirement to download a pdf file from my app and to store it either in iBooks or in iPhone. I don't know which one is the best approach. Could someone please suggest the best option and also I need to open it to the user.
You can store it in iPhone and then display it in UIWebView if you wan to display in application.
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/
My app is PDF Reader and i want to support Open in feature like when open PDF in Safari , We can open PDF in another PDF Reader app with Open in Feature.
So my app support for (.PDF) file and want to show my app on the lists of Open in App like following pic.
I don't know what is that and how to use it?
Please explain or guide me to good tutorials.
Sorry if my question is duplicated.
It's very simple, you only need to register the file types that your app supports. You can check more on
https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1
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.