Skip to content

Commit

Permalink
Handlers can explicitly disallow the 'Remember my choice' toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
lazerwalker committed Apr 21, 2014
1 parent 1e67f05 commit 38780a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions IntentKit/Core/INKHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ typedef NS_ENUM(NSInteger, INKHandlerCategory) {
to handle all actions; in that case, a fallback activity view will be shown. */
@property (readonly) NSString *defaultApp;

/** If YES, when this handler is presented as an activity sheet, it will never
show the "Remember My Choice" toggle. */
@property (assign, nonatomic) BOOL disableSettingDefault;

/** By default, if a handler has both a first-party app and an in-app modal view
(e.g. Safari and an in-app UIWebView), the first-party app won't be displayed.
Expand Down
2 changes: 1 addition & 1 deletion IntentKit/Core/INKHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ - (void)addDefault:(INKActivity *)activity {
}

- (BOOL)canSetDefault {
return (self.defaultApp == nil);
return (self.defaultApp == nil) && !self.disableSettingDefault;
}
@end

0 comments on commit 38780a9

Please sign in to comment.