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 |
*/ |
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 |
|
H |
35 |
/*! |
|
36 |
Creates a link target from a raw URL. |
|
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 |
|
H |
45 |
/*! |
|
46 |
Creates a link target from a raw URL received from an external application. This is typically called from the app delegate's |
|
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 |
|
H |
54 |
/*! |
|
55 |
Gets the target URL. If the link is an App Link, this is the target of the App Link. |
|
56 |
Otherwise, it is the url that created the target. |
|
57 |
*/ |
|
58 |
@property (nonatomic, strong, readonly) NSURL *targetURL; |
|
59 |
|
|
60 |
/*! |
|
61 |
Gets the query parameters for the target, parsed into an NSDictionary. |
|
62 |
*/ |
|
63 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *targetQueryParameters; |
|
64 |
|
|
65 |
/*! |
|
66 |
If this link target is an App Link, this is the data found in al_applink_data. |
|
67 |
Otherwise, it is nil. |
|
68 |
*/ |
|
69 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *appLinkData; |
|
70 |
|
|
71 |
/*! |
|
72 |
If this link target is an App Link, this is the data found in extras. |
|
73 |
*/ |
|
74 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *appLinkExtras; |
|
75 |
|
|
76 |
/*! |
|
77 |
The App Link indicating how to navigate back to the referer app, if any. |
|
78 |
*/ |
|
79 |
@property (nonatomic, strong, readonly) FBSDKAppLink *appLinkReferer; |
|
80 |
|
|
81 |
/*! |
|
82 |
The URL that was used to create this FBSDKURL. |
|
83 |
*/ |
|
84 |
@property (nonatomic, strong, readonly) NSURL *inputURL; |
|
85 |
|
|
86 |
/*! |
|
87 |
The query parameters of the inputURL, parsed into an NSDictionary. |
|
88 |
*/ |
|
89 |
@property (nonatomic, strong, readonly) NSDictionary<NSString *, id> *inputQueryParameters; |
|
90 |
|
|
91 |
@end |
|
92 |
|
|
93 |
NS_ASSUME_NONNULL_END |