Reputation: 6900
So I'm using UIActivityController for its share features and have been rather perplexed that certain features aren't more readily available. One such feature is the ability to exclude "Notes" from the activity controller options.
Currently when I create my ActivityController I do the following:
self.activityViewController = UIActivityViewController(activityItems: ["Hello"], applicationActivities: nil)
self.activityViewController.excludedActivityTypes = [UIActivityTypeCopyToPasteboard, UIActivityTypeAirDrop, UIActivityTypePrint]
As you can see I put some items into the excluded items, but one item I have not been able to exclude is the "Notes" app. According to the docs there are many activity types, but none that I read can remove the notes. The main reason for sharing is Facebook, and Twitter, and notes is pushing Facebook and twitter off the visible screen. Being able to order these would also be a desirable outcome.
Upvotes: 3
Views: 1780
Reputation: 6369
With many tests, the activity type of Notes is
com.apple.mobilenotes.SharingExtension
I made many efforts but no luck, so I think you can't do this.
Upvotes: 3
Reputation: 5188
I looked through the docs thoroughly, and agree that there doesn't seem to be a direct way. The user is able to re-order activities on their own, but that's not ideal.
One thing you might try to do is through debugger / logging find the activityType()
of the offending Notes ActivityType
and then try to exclude that string.
Upvotes: 2