-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
243 changed files
with
12,755 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github "mobgen/halo-ios" "2.2.0" | ||
github "facebook/facebook-sdk-swift" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
github "Quick/Quick" "v1.0.0" | ||
github "Quick/Nimble" "v5.1.1" | ||
github "AliSoftware/OHHTTPStubs" "5.2.3-swift3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
github "BoltsFramework/Bolts-ObjC" "1.8.4" | ||
github "Quick/Nimble" "v5.1.1" | ||
github "AliSoftware/OHHTTPStubs" "5.2.3-swift3" | ||
github "Quick/Quick" "v1.0.0" | ||
github "mobgen/halo-ios" "2.2.0" | ||
github "facebook/facebook-ios-sdk" "sdk-version-4.19.0" | ||
github "facebook/facebook-sdk-swift" "0.2.0" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2014, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
/*! The version of the App Link protocol that this library supports */ | ||
FOUNDATION_EXPORT NSString *const BFAppLinkVersion; | ||
|
||
/*! | ||
Contains App Link metadata relevant for navigation on this device | ||
derived from the HTML at a given URL. | ||
*/ | ||
@interface BFAppLink : NSObject | ||
|
||
/*! | ||
Creates a BFAppLink with the given list of BFAppLinkTargets and target URL. | ||
Generally, this will only be used by implementers of the BFAppLinkResolving protocol, | ||
as these implementers will produce App Link metadata for a given URL. | ||
@param sourceURL the URL from which this App Link is derived | ||
@param targets an ordered list of BFAppLinkTargets for this platform derived | ||
from App Link metadata. | ||
@param webURL the fallback web URL, if any, for the app link. | ||
*/ | ||
+ (instancetype)appLinkWithSourceURL:(NSURL *)sourceURL | ||
targets:(NSArray *)targets | ||
webURL:(NSURL *)webURL; | ||
|
||
/*! The URL from which this BFAppLink was derived */ | ||
@property (nonatomic, strong, readonly) NSURL *sourceURL; | ||
|
||
/*! | ||
The ordered list of targets applicable to this platform that will be used | ||
for navigation. | ||
*/ | ||
@property (nonatomic, copy, readonly) NSArray *targets; | ||
|
||
/*! The fallback web URL to use if no targets are installed on this device. */ | ||
@property (nonatomic, strong, readonly) NSURL *webURL; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/* | ||
* Copyright (c) 2014, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#import <Bolts/BFAppLink.h> | ||
|
||
/*! | ||
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 | ||
}; | ||
|
||
@protocol BFAppLinkResolving; | ||
@class BFTask; | ||
|
||
/*! | ||
Represents a pending request to navigate to an App Link. Most developers will | ||
simply use navigateToURLInBackground: to open a URL, but developers can build | ||
custom requests with additional navigation and app data attached to them by | ||
creating BFAppLinkNavigations themselves. | ||
*/ | ||
@interface BFAppLinkNavigation : NSObject | ||
|
||
/*! | ||
The extras for the AppLinkNavigation. This will generally contain application-specific | ||
data that should be passed along with the request, such as advertiser or affiliate IDs or | ||
other such metadata relevant on this device. | ||
*/ | ||
@property (nonatomic, copy, readonly) NSDictionary *extras; | ||
|
||
/*! | ||
The al_applink_data for the AppLinkNavigation. This will generally contain data common to | ||
navigation attempts such as back-links, user agents, and other information that may be used | ||
in routing and handling an App Link request. | ||
*/ | ||
@property (nonatomic, copy, readonly) NSDictionary *appLinkData; | ||
|
||
/*! The AppLink to navigate to */ | ||
@property (nonatomic, strong, readonly) BFAppLink *appLink; | ||
|
||
/*! Creates an AppLinkNavigation with the given link, extras, and App Link data */ | ||
+ (instancetype)navigationWithAppLink:(BFAppLink *)appLink | ||
extras:(NSDictionary *)extras | ||
appLinkData:(NSDictionary *)appLinkData; | ||
|
||
/*! | ||
Creates an NSDictionary with the correct format for iOS callback URLs, | ||
to be used as 'appLinkData' argument in the call to navigationWithAppLink:extras:appLinkData: | ||
*/ | ||
+ (NSDictionary *)callbackAppLinkDataForAppWithName:(NSString *)appName url:(NSString *)url; | ||
|
||
/*! Performs the navigation */ | ||
- (BFAppLinkNavigationType)navigate:(NSError **)error; | ||
|
||
/*! Returns a BFAppLink for the given URL */ | ||
+ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination; | ||
|
||
/*! Returns a BFAppLink for the given URL using the given App Link resolution strategy */ | ||
+ (BFTask *)resolveAppLinkInBackground:(NSURL *)destination resolver:(id<BFAppLinkResolving>)resolver; | ||
|
||
/*! Navigates to a BFAppLink and returns whether it opened in-app or in-browser */ | ||
+ (BFAppLinkNavigationType)navigateToAppLink:(BFAppLink *)link error:(NSError **)error; | ||
|
||
/*! | ||
Returns a BFAppLinkNavigationType based on a BFAppLink. | ||
It's essentially a no-side-effect version of navigateToAppLink:error:, | ||
allowing apps to determine flow based on the link type (e.g. open an | ||
internal web view instead of going straight to the browser for regular links.) | ||
*/ | ||
+ (BFAppLinkNavigationType)navigationTypeForLink:(BFAppLink *)link; | ||
|
||
/*! | ||
Return navigation type for current instance. | ||
No-side-effect version of navigate: | ||
*/ | ||
- (BFAppLinkNavigationType)navigationType; | ||
|
||
/*! Navigates to a URL (an asynchronous action) and returns a BFNavigationType */ | ||
+ (BFTask *)navigateToURLInBackground:(NSURL *)destination; | ||
|
||
/*! | ||
Navigates to a URL (an asynchronous action) using the given App Link resolution | ||
strategy and returns a BFNavigationType | ||
*/ | ||
+ (BFTask *)navigateToURLInBackground:(NSURL *)destination resolver:(id<BFAppLinkResolving>)resolver; | ||
|
||
/*! | ||
Gets the default resolver to be used for App Link resolution. If the developer has not set one explicitly, | ||
a basic, built-in resolver will be used. | ||
*/ | ||
+ (id<BFAppLinkResolving>)defaultResolver; | ||
|
||
/*! | ||
Sets the default resolver to be used for App Link resolution. Setting this to nil will revert the | ||
default resolver to the basic, built-in resolver provided by Bolts. | ||
*/ | ||
+ (void)setDefaultResolver:(id<BFAppLinkResolving>)resolver; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2014, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@class BFTask; | ||
|
||
/*! | ||
Implement this protocol to provide an alternate strategy for resolving | ||
App Links that may include pre-fetching, caching, or querying for App Link | ||
data from an index provided by a service provider. | ||
*/ | ||
@protocol BFAppLinkResolving <NSObject> | ||
|
||
/*! | ||
Asynchronously resolves App Link data for a given URL. | ||
@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; | ||
|
||
@end |
87 changes: 87 additions & 0 deletions
87
Facebook/Bolts.framework/Headers/BFAppLinkReturnToRefererController.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
* Copyright (c) 2014, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
#import <Bolts/BFAppLinkReturnToRefererView.h> | ||
|
||
@class BFAppLink; | ||
@class BFAppLinkReturnToRefererController; | ||
|
||
/*! | ||
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 BFAppLinkReturnToRefererControllerDelegate <NSObject> | ||
|
||
@optional | ||
|
||
/*! Called when the user has tapped to navigate, but before the navigation has been performed. */ | ||
- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller | ||
willNavigateToAppLink:(BFAppLink *)appLink; | ||
|
||
/*! Called after the navigation has been attempted, with an indication of whether the referer | ||
app link was successfully opened. */ | ||
- (void)returnToRefererController:(BFAppLinkReturnToRefererController *)controller | ||
didNavigateToAppLink:(BFAppLink *)url | ||
type:(BFAppLinkNavigationType)type; | ||
|
||
@end | ||
|
||
/*! | ||
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. | ||
*/ | ||
@interface BFAppLinkReturnToRefererController : NSObject <BFAppLinkReturnToRefererViewDelegate> | ||
|
||
/*! | ||
The delegate that will be notified when the user navigates back to the referer. | ||
*/ | ||
@property (nonatomic, weak) id<BFAppLinkReturnToRefererControllerDelegate> delegate; | ||
|
||
/*! | ||
The BFAppLinkReturnToRefererView this controller is controlling. | ||
*/ | ||
@property (nonatomic, strong) BFAppLinkReturnToRefererView *view; | ||
|
||
/*! | ||
Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed | ||
contained within another UIView (i.e., not displayed above the navigation bar). | ||
*/ | ||
- (instancetype)init; | ||
|
||
/*! | ||
Initializes a controller suitable for controlling a BFAppLinkReturnToRefererView that is to be displayed | ||
displayed above the navigation bar. | ||
*/ | ||
- (instancetype)initForDisplayAboveNavController:(UINavigationController *)navController; | ||
|
||
/*! | ||
Removes the view entirely from the navigation controller it is currently displayed in. | ||
*/ | ||
- (void)removeFromNavController; | ||
|
||
/*! | ||
Shows the BFAppLinkReturnToRefererView with the specified referer information. If nil or missing data, | ||
the view will not be displayed. */ | ||
- (void)showViewForRefererAppLink:(BFAppLink *)refererAppLink; | ||
|
||
/*! | ||
Shows the BFAppLinkReturnToRefererView with referer information extracted from the specified URL. | ||
If nil or missing referer App Link data, the view will not be displayed. */ | ||
- (void)showViewForRefererURL:(NSURL *)url; | ||
|
||
/*! | ||
Closes the view, possibly animating it. | ||
*/ | ||
- (void)closeViewAnimated:(BOOL)animated; | ||
|
||
@end |
77 changes: 77 additions & 0 deletions
77
Facebook/Bolts.framework/Headers/BFAppLinkReturnToRefererView.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Copyright (c) 2014, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
#import <Bolts/BFAppLinkNavigation.h> | ||
|
||
@class BFAppLinkReturnToRefererView; | ||
@class BFURL; | ||
|
||
typedef NS_ENUM(NSUInteger, BFIncludeStatusBarInSize) { | ||
BFIncludeStatusBarInSizeNever, | ||
BFIncludeStatusBarInSizeIOS7AndLater, | ||
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 <NSObject> | ||
|
||
/*! | ||
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 | ||
contained referer data. The user can also close the view by clicking a close button | ||
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. | ||
*/ | ||
@interface BFAppLinkReturnToRefererView : UIView | ||
|
||
/*! | ||
The delegate that will be notified when the user navigates back to the referer. | ||
*/ | ||
@property (nonatomic, weak) id<BFAppLinkReturnToRefererViewDelegate> delegate; | ||
|
||
/*! | ||
The color of the text label and close button. | ||
*/ | ||
@property (nonatomic, strong) UIColor *textColor; | ||
|
||
@property (nonatomic, strong) BFAppLink *refererAppLink; | ||
|
||
/*! | ||
Indicates whether to extend the size of the view to include the current status bar | ||
size, for use in scenarios where the view might extend under the status bar on iOS 7 and | ||
above; this property has no effect on earlier versions of iOS. | ||
*/ | ||
@property (nonatomic, assign) BFIncludeStatusBarInSize includeStatusBarInSize; | ||
|
||
/*! | ||
Indicates whether the user has closed the view by clicking the close button. | ||
*/ | ||
@property (nonatomic, assign) BOOL closed; | ||
|
||
@end |
Oops, something went wrong.