Search code examples
iosobjective-cuti

Objective-C: enable "Open in..." on special condition


I have a doubt, is it possible to enable the "Open in" only for a particular condition? Let me explain... I am creating an application that will allow only some users to open in my application some files.

For a particular user, I want that tapping an item in mail app will be shown the popover "Open in MyApplication".

For the other ones, i don't want to show the pop up.

Is it possible?

I know that i can manage the situation directly on the application when retrieving the URL of the request, but i'd like to have the behaviour described above.


Solution

  • No, this is not possible. Your app either declares that it can handle files of a certain type or it doesn't. The standard "Open In" menu is based on what your app declares in the Info.plist. There is no way to make this conditional.