Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark classes and methods unavailable for extensions #290

Merged
merged 7 commits into from
Jan 9, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Bolts/iOS/BFAppLinkNavigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) {
custom requests with additional navigation and app data attached to them by
creating BFAppLinkNavigations themselves.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkNavigation : NSObject

/*!
Expand Down
2 changes: 1 addition & 1 deletion Bolts/iOS/BFAppLinkResolving.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
@param url The URL to resolve into an App Link.
@returns A BFTask that will return a BFAppLink for the given URL.
*/
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url;
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension");

@end
1 change: 1 addition & 0 deletions Bolts/iOS/BFAppLinkReturnToRefererController.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
A controller class that implements default behavior for a BFAppLinkReturnToRefererView, including
the ability to display the view above the navigation bar for navigation-based apps.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkReturnToRefererController : NSObject <BFAppLinkReturnToRefererViewDelegate>

/*!
Expand Down
1 change: 1 addition & 0 deletions Bolts/iOS/BFAppLinkReturnToRefererView.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) {
rather than navigating away. If the view is provided an App Link that does not contain
referer data, it will have zero size and no UI will be displayed.
*/
NS_EXTENSION_UNAVAILABLE_IOS("Not available in app extension")
@interface BFAppLinkReturnToRefererView : UIView

/*!
Expand Down
2 changes: 1 addition & 1 deletion Bolts/iOS/BFWebViewAppLinkResolver.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ - (BFTask *)followRedirects:(NSURL *)url {
}];
}

- (BFTask *)appLinkFromURLInBackground:(NSURL *)url {
- (BFTask *)appLinkFromURLInBackground:(NSURL *)url NS_EXTENSION_UNAVAILABLE_IOS("") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this here on top of adding it to the method definition in the BFAppLinkResolving protocol otherwise it would still complain.

return [[self followRedirects:url] continueWithExecutor:[BFExecutor mainThreadExecutor]
withSuccessBlock:^id(BFTask *task) {
NSData *responseData = task.result[@"data"];
Expand Down