diff --git a/Bolts.xcodeproj/project.pbxproj b/Bolts.xcodeproj/project.pbxproj index 1ed4b7991..373ae6069 100644 --- a/Bolts.xcodeproj/project.pbxproj +++ b/Bolts.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 0937F9431BE577F1008C38BA /* BFAppLinkNavigationType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0937F9401BE576BE008C38BA /* BFAppLinkNavigationType.h */; }; + 0937F9441BE577F1008C38BA /* BFAppLinkReturnToRefererViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0937F93F1BE575FF008C38BA /* BFAppLinkReturnToRefererViewDelegate.h */; }; 1E9BF8DC18EA0CAD00514B1E /* test.html in Resources */ = {isa = PBXBuildFile; fileRef = 1E9BF8DB18EA0CAD00514B1E /* test.html */; }; 1EC3016118CDAA8400D06D07 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E9C3CEC17DE9DE000427E62 /* Foundation.framework */; }; 1EC3016318CDAA8400D06D07 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EC3016218CDAA8400D06D07 /* CoreGraphics.framework */; }; @@ -155,6 +157,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 0937F93F1BE575FF008C38BA /* BFAppLinkReturnToRefererViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFAppLinkReturnToRefererViewDelegate.h; sourceTree = ""; }; + 0937F9401BE576BE008C38BA /* BFAppLinkNavigationType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFAppLinkNavigationType.h; sourceTree = ""; }; 1E9BF8DB18EA0CAD00514B1E /* test.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = test.html; sourceTree = ""; }; 1EC3016018CDAA8400D06D07 /* BoltsTestUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BoltsTestUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1EC3016218CDAA8400D06D07 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -371,6 +375,7 @@ 8103FA5A19900A84000BAE3F /* BFAppLinkNavigation.h */, 8103FA5B19900A84000BAE3F /* BFAppLinkNavigation.m */, 8103FA5C19900A84000BAE3F /* BFAppLinkResolving.h */, + 0937F9401BE576BE008C38BA /* BFAppLinkNavigationType.h */, 8103FA6619900A84000BAE3F /* BFWebViewAppLinkResolver.h */, 8103FA6719900A84000BAE3F /* BFWebViewAppLinkResolver.m */, 8103FA5D19900A84000BAE3F /* BFAppLinkReturnToRefererController.h */, @@ -378,6 +383,7 @@ 8103FA5F19900A84000BAE3F /* BFAppLinkReturnToRefererView.h */, 8103FA6019900A84000BAE3F /* BFAppLinkReturnToRefererView.m */, 8103FA6119900A84000BAE3F /* BFAppLinkReturnToRefererView_Internal.h */, + 0937F93F1BE575FF008C38BA /* BFAppLinkReturnToRefererViewDelegate.h */, 8103FA6219900A84000BAE3F /* BFAppLinkTarget.h */, 8103FA6319900A84000BAE3F /* BFAppLinkTarget.m */, B242FAC019A599CD0097ECAE /* BFMeasurementEvent_Internal.h */, @@ -592,6 +598,8 @@ 81ED943A1BE1481900795F05 /* BFMeasurementEvent_Internal.h in Headers */, 81ED943B1BE1481900795F05 /* BFMeasurementEvent.h in Headers */, 81ED942B1BE1481900795F05 /* BFAppLink_Internal.h in Headers */, + 0937F9431BE577F1008C38BA /* BFAppLinkNavigationType.h in Headers */, + 0937F9441BE577F1008C38BA /* BFAppLinkReturnToRefererViewDelegate.h in Headers */, 81ED94241BE147CF00795F05 /* Bolts.h in Headers */, 81ED94251BE147CF00795F05 /* BFCancellationToken.h in Headers */, 81ED942C1BE1481900795F05 /* BFAppLink.h in Headers */, diff --git a/Bolts/Common/BFCancellationToken.h b/Bolts/Common/BFCancellationToken.h index 4d7dec0ed..b1d9222aa 100644 --- a/Bolts/Common/BFCancellationToken.h +++ b/Bolts/Common/BFCancellationToken.h @@ -10,7 +10,7 @@ #import -#import +@class BFCancellationTokenRegistration; NS_ASSUME_NONNULL_BEGIN diff --git a/Bolts/Common/Bolts.h b/Bolts/Common/Bolts.h index 89c7c3e07..22a05b716 100644 --- a/Bolts/Common/Bolts.h +++ b/Bolts/Common/Bolts.h @@ -8,7 +8,6 @@ * */ -#import #import #import #import diff --git a/Bolts/Common/Bolts.m b/Bolts/Common/Bolts.m index 9a3e75cca..ff7358e73 100644 --- a/Bolts/Common/Bolts.m +++ b/Bolts/Common/Bolts.m @@ -9,6 +9,7 @@ */ #import "Bolts.h" +#import "BoltsVersion.h" NSInteger const kBFMultipleErrorsError = 80175001; diff --git a/Bolts/iOS/BFAppLinkNavigation.h b/Bolts/iOS/BFAppLinkNavigation.h index d459f7227..84cf31ec9 100644 --- a/Bolts/iOS/BFAppLinkNavigation.h +++ b/Bolts/iOS/BFAppLinkNavigation.h @@ -9,20 +9,8 @@ */ #import - #import - -/*! - The result of calling navigate on a BFAppLinkNavigation - */ -typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) { - /*! Indicates that the navigation failed and no app was opened */ - BFAppLinkNavigationTypeFailure, - /*! Indicates that the navigation succeeded by opening the URL in the browser */ - BFAppLinkNavigationTypeBrowser, - /*! Indicates that the navigation succeeded by opening the URL in an app on the device */ - BFAppLinkNavigationTypeApp -}; +#import @protocol BFAppLinkResolving; @class BFTask; diff --git a/Bolts/iOS/BFAppLinkNavigationType.h b/Bolts/iOS/BFAppLinkNavigationType.h new file mode 100644 index 000000000..4eed826c0 --- /dev/null +++ b/Bolts/iOS/BFAppLinkNavigationType.h @@ -0,0 +1,19 @@ +// +// BFAppLinkNavigationType.h +// Bolts +// +// Created by Marcel Bradea on 2015-10-31. +// Copyright © 2015 Parse Inc. All rights reserved. +// + +/*! + The result of calling navigate on a BFAppLinkNavigation + */ +typedef NS_ENUM(NSInteger, BFAppLinkNavigationType) { + /*! Indicates that the navigation failed and no app was opened */ + BFAppLinkNavigationTypeFailure, + /*! Indicates that the navigation succeeded by opening the URL in the browser */ + BFAppLinkNavigationTypeBrowser, + /*! Indicates that the navigation succeeded by opening the URL in an app on the device */ + BFAppLinkNavigationTypeApp +}; diff --git a/Bolts/iOS/BFAppLinkReturnToRefererController.h b/Bolts/iOS/BFAppLinkReturnToRefererController.h index d19465ee9..a3e181f76 100644 --- a/Bolts/iOS/BFAppLinkReturnToRefererController.h +++ b/Bolts/iOS/BFAppLinkReturnToRefererController.h @@ -10,9 +10,10 @@ #import #import +#import +#import -#import - +@class BFAppLinkReturnToRefererView; @class BFAppLink; @class BFAppLinkReturnToRefererController; diff --git a/Bolts/iOS/BFAppLinkReturnToRefererController.m b/Bolts/iOS/BFAppLinkReturnToRefererController.m index d38063549..add281893 100644 --- a/Bolts/iOS/BFAppLinkReturnToRefererController.m +++ b/Bolts/iOS/BFAppLinkReturnToRefererController.m @@ -9,7 +9,7 @@ */ #import "BFAppLinkReturnToRefererController.h" - +#import "BFAppLinkReturnToRefererView.h" #import "BFAppLink.h" #import "BFAppLinkReturnToRefererView_Internal.h" #import "BFURL_Internal.h" diff --git a/Bolts/iOS/BFAppLinkReturnToRefererView.h b/Bolts/iOS/BFAppLinkReturnToRefererView.h index d20f73a2d..a0056eeb2 100644 --- a/Bolts/iOS/BFAppLinkReturnToRefererView.h +++ b/Bolts/iOS/BFAppLinkReturnToRefererView.h @@ -13,6 +13,8 @@ #import +#import "BFAppLinkReturnToRefererViewDelegate.h" + @class BFAppLinkReturnToRefererView; @class BFURL; @@ -22,25 +24,6 @@ typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) { BFIncludeStatusBarInSizeAlways, }; -/*! - Protocol that a class can implement in order to be notified when the user has navigated back - to the referer of an App Link. - */ -@protocol BFAppLinkReturnToRefererViewDelegate - -/*! - Called when the user has tapped inside the close button. - */ -- (void)returnToRefererViewDidTapInsideCloseButton:(BFAppLinkReturnToRefererView *)view; - -/*! - Called when the user has tapped inside the App Link portion of the view. - */ -- (void)returnToRefererViewDidTapInsideLink:(BFAppLinkReturnToRefererView *)view - link:(BFAppLink *)link; - -@end - /*! Provides a UIView that displays a button allowing users to navigate back to the application that launched the App Link currently being handled, if the App Link diff --git a/Bolts/iOS/BFAppLinkReturnToRefererViewDelegate.h b/Bolts/iOS/BFAppLinkReturnToRefererViewDelegate.h new file mode 100644 index 000000000..552cf77bf --- /dev/null +++ b/Bolts/iOS/BFAppLinkReturnToRefererViewDelegate.h @@ -0,0 +1,29 @@ +// +// BFAppLinkReturnToRefererViewDelegate.h +// Bolts +// +// Created by Marcel Bradea on 2015-10-31. +// Copyright © 2015 Parse Inc. All rights reserved. +// + +@class BFAppLinkReturnToRefererView; +@class BFAppLink; + +/*! + Protocol that a class can implement in order to be notified when the user has navigated back + to the referer of an App Link. + */ +@protocol BFAppLinkReturnToRefererViewDelegate + +/*! + Called when the user has tapped inside the close button. + */ +- (void)returnToRefererViewDidTapInsideCloseButton:(BFAppLinkReturnToRefererView *)view; + +/*! + Called when the user has tapped inside the App Link portion of the view. + */ +- (void)returnToRefererViewDidTapInsideLink:(BFAppLinkReturnToRefererView *)view + link:(BFAppLink *)link; + +@end