Forum Xamarin.iOS

How to add my app. to Open With.. (Activities) menu in Photos

KeskinOnurKeskinOnur USMember ✭✭

When you click on any photo in Photos,you'll see there is a button for sharing (you can see in this image: ). So, i want my users to be able to send images through my app directly from Photos, like how Whatsapp or Messenger does. Currently my app can send photos from it's own messenger, has access to user's Photos. While trying, i managed to add my app to open Pdf from Safari but i couldn't add to open an image from Photos. I tried to do it from Xamarin Studio (v6.2 -- Xamarin.iOS v10.4.0.123) and Xcode(v8.2.1), nothing happened. I also looked at the info.plist of Whatsapp and dropbox, tried to do like them but again i failed. I tried with the types; public.image, I am trying on the Simulator(v10.0) and i deleted the app everytime from simulator when i changed info.plist.



  • PaoloLevaPaoloLeva USMember ✭✭

    I have a similar question. In my case I want my app to show up in "Share..." when a user highlight some text. Any suggestion on how to register a Xamarin app to be listed among the iOS Activities?

  • TedRogersTedRogers USMember ✭✭✭✭
    edited June 2017


    Since you are using standard types you will want to specify "Imported UTIs" for you apps.

    See here:

    You'll need to support this method on your AppDelegate:

    public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)

    You might also want to write a Share Extension for getting material into your app. This is nice because people can share to your app while remaining in the context of their own app.


  • PaoloLevaPaoloLeva USMember ✭✭

    Thanks Ted, I find this article useful and it seems that this solution works good enough for me:

  • TedRogersTedRogers USMember ✭✭✭✭

    @PaoloLeva no problem. As I said Share Extension is really the best way to do it. I have written a fully custom share extension so if you run into any issues, ping me.

  • Hi, Ted.
    In my case I need to send shared files from my extension to the containing (main) iOS application where they will be processed (uploaded to server). I was able to open my containing app via custom URL scheme (override OpenUrl method in AppDelegate) and send shared file URLs through NSUserDefaults object. Everithing works fine in simulator but on real device reading data fails (for images/videos shared from Photos app). I was getting 'Access denied' error for URL 'file:///...Photos/...OutgoingTemp/...RenderedPhotos/image.jpeg'.
    Thanks in advance,

Sign In or Register to comment.