Re: To subclass or not to subclass, that is the question
Gerriet M. Denkmann
On 9 Oct 2018, at 10:47, Gerriet M. Denkmann <g@...> wrote:
Maybe it works like this:
NSArray *activityItems = @[ someUrl ];
UIActivityViewController *vc = [ [UIActivityViewController alloc] initWithActivityItems: activityItems
// If (and only if) one wants to provide custom services to the user, then applicationActivities must *not* be nil, but contain one or more subclasses of UIActivity
vc.excludedActivityTypes = @[ everything except UIActivityTypeAirDrop ];
[ self presentViewController: vc …];
My current problem:
The UIActivityViewController has AirDrop (as it should) but it also has some other things, which do *not* make sense for my app at all:
One row with:
Copy to Documents
Copy to Files
Copy to PDF Expert
… More (Where one can switch on “Add to Notes”)
and another row with:
… More (Where one can switch on “Save to Files” and “Save in LINE Keep”)
I really just want AirDrop and nothing else.
How can this be accomplished?
One final point:
iOS → macOS:
My iOS device can copy “someUrl” to the Downloads folder of the recipient. Which is kind of ok.
But is there a way to specify a more specific destination?
Like the Application Support Folder of some app?
iOS → iOS
Here the AirDrop should only be done to another copy of my app.
Can this somehow be specified?