I want to do something when the user shared to
- (void)sharingService:(NSSharingService *)sharingService didShareItems:(NSArray *)items
{
BOOL isSafariReadingList = [sharingService.description rangeOfString:NSSharingServiceNameAddToSafariReadingList].location != NSNotFound;
}
I can't find any property on NSSharingService
that I can compare to the constants. Am I missing something?!
Since it seems there's no answer to that (filed http://openradar.appspot.com/16114564), I created a category
then you can use it these ways:
I guess Apple just didn't think we'd want to know which service people picked from the Picker.
Obviously dangerous to parse that “com.apple.share.System” but it’s the only way I see to avoid a set of
rangeOfString || rangeOfString || rangeOfString….
.For more information check out https://github.com/stuffmc/SharingPicker
Also, as a reference, here are some of the values of those
NSSharingServiceName*
constants, all starting withcom.apple.share.