commit | author | age
|
13e53a
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
H |
2 |
// |
|
3 |
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
|
4 |
// copy, modify, and distribute this software in source code or binary form for use |
|
5 |
// in connection with the web services and APIs provided by Facebook. |
|
6 |
// |
|
7 |
// As with any software that integrates with the Facebook platform, your use of |
|
8 |
// this software is subject to the Facebook Developer Principles and Policies |
|
9 |
// [http://developers.facebook.com/policy/]. This copyright notice shall be |
|
10 |
// included in all copies or substantial portions of the software. |
|
11 |
// |
|
12 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
14 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
15 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
16 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
17 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
18 |
|
|
19 |
#import <Foundation/Foundation.h> |
|
20 |
|
|
21 |
NS_ASSUME_NONNULL_BEGIN |
|
22 |
|
|
23 |
@class FBSDKAppLink; |
|
24 |
|
|
25 |
/*! |
|
26 |
Provides a set of utilities for working with NSURLs, such as parsing of query parameters |
|
27 |
and handling for App Link requests. |
|
28 |
*/ |
|
29 |
@interface FBSDKURL : NSObject |
|
30 |
|
|
31 |
/*! |
|
32 |
Creates a link target from a raw URL. |
|
33 |
On success, this posts the FBSDKAppLinkParseEventName measurement event. If you are constructing the FBSDKURL within your application delegate's |
|
34 |
application:openURL:sourceApplication:annotation:, you should instead use URLWithInboundURL:sourceApplication: |
|
35 |
to support better FBSDKMeasurementEvent notifications |
|
36 |
@param url The instance of `NSURL` to create FBSDKURL from. |
|
37 |
*/ |
|
38 |
+ (FBSDKURL *)URLWithURL:(NSURL *)url; |
|
39 |
|
|
40 |
/*! |
|
41 |
Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's |
|
42 |
application:openURL:sourceApplication:annotation: and will post the FBSDKAppLinkNavigateInEventName measurement event. |
|
43 |
@param url The instance of `NSURL` to create FBSDKURL from. |
|
44 |
@param sourceApplication the bundle ID of the app that is requesting your app to open the URL. The same sourceApplication in application:openURL:sourceApplication:annotation: |
|
45 |
*/ |
|
46 |
+ (FBSDKURL *)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication; |
|
47 |
|
|
48 |
/*! |
|
49 |
Gets the target URL. If the link is an App Link, this is the target of the App Link. |
|
50 |
Otherwise, it is the url that created the target. |
|
51 |
*/ |
|
52 |
@property (nonatomic, strong, readonly) NSURL *targetURL; |
|
53 |
|
|
54 |
/*! |
|
55 |
Gets the query parameters for the target, parsed into an NSDictionary. |
|
56 |
*/ |
|
57 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *targetQueryParameters; |
|
58 |
|
|
59 |
/*! |
|
60 |
If this link target is an App Link, this is the data found in al_applink_data. |
|
61 |
Otherwise, it is nil. |
|
62 |
*/ |
|
63 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *appLinkData; |
|
64 |
|
|
65 |
/*! |
|
66 |
If this link target is an App Link, this is the data found in extras. |
|
67 |
*/ |
|
68 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *appLinkExtras; |
|
69 |
|
|
70 |
/*! |
|
71 |
The App Link indicating how to navigate back to the referer app, if any. |
|
72 |
*/ |
|
73 |
@property (nonatomic, strong, readonly) FBSDKAppLink *appLinkReferer; |
|
74 |
|
|
75 |
/*! |
|
76 |
The URL that was used to create this FBSDKURL. |
|
77 |
*/ |
|
78 |
@property (nonatomic, strong, readonly) NSURL *inputURL; |
|
79 |
|
|
80 |
/*! |
|
81 |
The query parameters of the inputURL, parsed into an NSDictionary. |
|
82 |
*/ |
|
83 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *inputQueryParameters; |
|
84 |
|
|
85 |
@end |
|
86 |
|
|
87 |
NS_ASSUME_NONNULL_END |