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 |
|
88188e
|
25 |
/** |
13e53a
|
26 |
Provides a set of utilities for working with NSURLs, such as parsing of query parameters |
H |
27 |
and handling for App Link requests. |
|
28 |
*/ |
e81c27
|
29 |
NS_SWIFT_NAME(AppLinkURL) |
13e53a
|
30 |
@interface FBSDKURL : NSObject |
e81c27
|
31 |
|
H |
32 |
- (instancetype)init NS_UNAVAILABLE; |
|
33 |
+ (instancetype)new NS_UNAVAILABLE; |
13e53a
|
34 |
|
88188e
|
35 |
/** |
13e53a
|
36 |
Creates a link target from a raw URL. |
H |
37 |
On success, this posts the FBSDKAppLinkParseEventName measurement event. If you are constructing the FBSDKURL within your application delegate's |
|
38 |
application:openURL:sourceApplication:annotation:, you should instead use URLWithInboundURL:sourceApplication: |
|
39 |
to support better FBSDKMeasurementEvent notifications |
|
40 |
@param url The instance of `NSURL` to create FBSDKURL from. |
|
41 |
*/ |
e81c27
|
42 |
+ (instancetype)URLWithURL:(NSURL *)url |
H |
43 |
NS_SWIFT_NAME(init(url:)); |
13e53a
|
44 |
|
88188e
|
45 |
/** |
13e53a
|
46 |
Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's |
H |
47 |
application:openURL:sourceApplication:annotation: and will post the FBSDKAppLinkNavigateInEventName measurement event. |
|
48 |
@param url The instance of `NSURL` to create FBSDKURL from. |
|
49 |
@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: |
|
50 |
*/ |
e81c27
|
51 |
+ (instancetype)URLWithInboundURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication |
H |
52 |
NS_SWIFT_NAME(init(inboundURL:sourceApplication:)); |
13e53a
|
53 |
|
88188e
|
54 |
/** |
13e53a
|
55 |
Gets the target URL. If the link is an App Link, this is the target of the App Link. |
H |
56 |
Otherwise, it is the url that created the target. |
|
57 |
*/ |
|
58 |
@property (nonatomic, strong, readonly) NSURL *targetURL; |
|
59 |
|
88188e
|
60 |
/** |
13e53a
|
61 |
Gets the query parameters for the target, parsed into an NSDictionary. |
H |
62 |
*/ |
|
63 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *targetQueryParameters; |
|
64 |
|
88188e
|
65 |
/** |
13e53a
|
66 |
If this link target is an App Link, this is the data found in al_applink_data. |
H |
67 |
Otherwise, it is nil. |
|
68 |
*/ |
88188e
|
69 |
@property (nonatomic, strong, readonly, nullable) NSDictionary<NSString *, id> *appLinkData; |
13e53a
|
70 |
|
88188e
|
71 |
/** |
13e53a
|
72 |
If this link target is an App Link, this is the data found in extras. |
H |
73 |
*/ |
88188e
|
74 |
@property (nonatomic, strong, readonly, nullable) NSDictionary<NSString *, id> *appLinkExtras; |
13e53a
|
75 |
|
88188e
|
76 |
/** |
13e53a
|
77 |
The App Link indicating how to navigate back to the referer app, if any. |
H |
78 |
*/ |
88188e
|
79 |
@property (nonatomic, strong, readonly, nullable) FBSDKAppLink *appLinkReferer; |
13e53a
|
80 |
|
88188e
|
81 |
/** |
13e53a
|
82 |
The URL that was used to create this FBSDKURL. |
H |
83 |
*/ |
|
84 |
@property (nonatomic, strong, readonly) NSURL *inputURL; |
|
85 |
|
88188e
|
86 |
/** |
13e53a
|
87 |
The query parameters of the inputURL, parsed into an NSDictionary. |
H |
88 |
*/ |
|
89 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *inputQueryParameters; |
|
90 |
|
|
91 |
@end |
|
92 |
|
|
93 |
NS_ASSUME_NONNULL_END |