Skip to content

Commit

Permalink
Mark classes and methods unavailable for extensions (BoltsFramework#290)
Browse files Browse the repository at this point in the history
* mark classes and methods unavailable for extensions

* Add BFVoid macro.

* Update BFTask.taskWithDelay to use BFVoid.

* Update xctoolchain to latest.

* Update projects to Xcode 8.2.

* Use Xcode 8.2 for Travis-CI.

* Remove automatic exception catching. (BoltsFramework#294)
  • Loading branch information
felix-dumit authored and laptobbe committed Apr 28, 2017
1 parent aadc36e commit 0c775f3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
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("") {
return [[self followRedirects:url] continueWithExecutor:[BFExecutor mainThreadExecutor]
withSuccessBlock:^id(BFTask *task) {
NSData *responseData = task.result[@"data"];
Expand Down

0 comments on commit 0c775f3

Please sign in to comment.