Take the 2-minute tour ×

When using the NSSharingService popup, searching for a solution to know when the NSSharingService is closed when canceling the action. If the popup is closed when posting (button Post on NSSharingServiceNamePostOnFacebook or Tweet on NSSharingServiceNamePostOnTwitter) you can use the delegate:

- (void)sharingService:(NSSharingService *)sharingService didShareItems:(NSArray *)items

or the will share items one:

- (void)sharingService:(NSSharingService *)sharingService willShareItems:(NSArray *)items

but how to know when is being closed using the Close button ?

share|improve this question

1 Answer 1

it should trigger

- (void)sharingService:(NSSharingService *)sharingService didFailToShareItems:(NSArray *)items error:(NSError *)error

with an error value indicating that the user cancelled.

share|improve this answer

Your Answer


