commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
#import <UIKit/UIKit.h> |
|
11 |
|
|
12 |
#import <FBSDKCoreKit/FBSDKAppAvailabilityChecker.h> |
|
13 |
#import <FBSDKCoreKit/FBSDKAppURLSchemeProviding.h> |
|
14 |
#import <FBSDKCoreKit/FBSDKInternalUtilityProtocol.h> |
|
15 |
|
|
16 |
#if !TARGET_OS_TV |
|
17 |
#import <FBSDKCoreKit/FBSDKURLHosting.h> |
|
18 |
#endif |
|
19 |
|
|
20 |
NS_ASSUME_NONNULL_BEGIN |
|
21 |
|
|
22 |
FOUNDATION_EXPORT NSString *const FBSDK_CANOPENURL_FACEBOOK |
|
23 |
DEPRECATED_MSG_ATTRIBUTE("`FBSDK_CANOPENURL_FACEBOOK` is deprecated and will be removed in the next major release; please use `URLScheme.facebookAPI` instead"); |
|
24 |
FOUNDATION_EXPORT NSString *const FBSDK_CANOPENURL_FBAPI |
|
25 |
DEPRECATED_MSG_ATTRIBUTE("`FBSDK_CANOPENURL_FBAPI` is deprecated and will be removed in the next major release; please use `URLScheme.facebookAPI` instead"); |
|
26 |
FOUNDATION_EXPORT NSString *const FBSDK_CANOPENURL_MESSENGER |
|
27 |
DEPRECATED_MSG_ATTRIBUTE("`FBSDK_CANOPENURL_MESSENGER` is deprecated and will be removed in the next major release; please use `URLScheme.messengerApp` instead"); |
|
28 |
FOUNDATION_EXPORT NSString *const FBSDK_CANOPENURL_MSQRD_PLAYER |
|
29 |
DEPRECATED_MSG_ATTRIBUTE("`FBSDK_CANOPENURL_MSQRD_PLAYER` is deprecated and will be removed in the next major release"); |
|
30 |
FOUNDATION_EXPORT NSString *const FBSDK_CANOPENURL_SHARE_EXTENSION |
|
31 |
DEPRECATED_MSG_ATTRIBUTE("`FBSDK_CANOPENURL_SHARE_EXTENSION` is deprecated and will be removed in the next major release; please use `URLScheme.facebookAPI`"); |
|
32 |
|
|
33 |
NS_SWIFT_NAME(InternalUtility) |
|
34 |
@interface FBSDKInternalUtility : NSObject |
|
35 |
#if !TARGET_OS_TV |
|
36 |
<FBSDKAppAvailabilityChecker, FBSDKAppURLSchemeProviding, FBSDKInternalUtility, FBSDKURLHosting> |
|
37 |
#else |
|
38 |
<FBSDKAppAvailabilityChecker, FBSDKAppURLSchemeProviding, FBSDKInternalUtility> |
|
39 |
#endif |
|
40 |
|
|
41 |
#if !FBTEST |
|
42 |
- (instancetype)init NS_UNAVAILABLE; |
|
43 |
+ (instancetype)new NS_UNAVAILABLE; |
|
44 |
#endif |
|
45 |
|
|
46 |
@property (class, nonnull, readonly) FBSDKInternalUtility *sharedUtility; |
|
47 |
|
|
48 |
/** |
|
49 |
Returns bundle for returning localized strings |
|
50 |
|
|
51 |
We assume a convention of a bundle named FBSDKStrings.bundle, otherwise we |
|
52 |
return the main bundle. |
|
53 |
*/ |
|
54 |
@property (nonatomic, readonly, strong) NSBundle *bundleForStrings; |
|
55 |
|
|
56 |
/** |
|
57 |
Tests whether the supplied URL is a valid URL for opening in the browser. |
|
58 |
@param URL The URL to test. |
|
59 |
@return YES if the URL refers to an http or https resource, otherwise NO. |
|
60 |
*/ |
|
61 |
- (BOOL)isBrowserURL:(NSURL *)URL; |
|
62 |
|
|
63 |
/** |
|
64 |
Checks equality between 2 objects. |
|
65 |
|
|
66 |
Checks for pointer equality, nils, isEqual:. |
|
67 |
@param object The first object to compare. |
|
68 |
@param other The second object to compare. |
|
69 |
@return YES if the objects are equal, otherwise NO. |
|
70 |
*/ |
|
71 |
- (BOOL)object:(id)object isEqualToObject:(id)other; |
|
72 |
|
|
73 |
/** |
|
74 |
Attempts to find the first UIViewController in the view's responder chain. Returns nil if not found. |
|
75 |
*/ |
|
76 |
- (nullable UIViewController *)viewControllerForView:(UIView *)view; |
|
77 |
|
|
78 |
/** |
|
79 |
returns true if the url scheme is registered in the CFBundleURLTypes |
|
80 |
*/ |
|
81 |
- (BOOL)isRegisteredURLScheme:(NSString *)urlScheme; |
|
82 |
|
|
83 |
/** |
|
84 |
returns currently displayed top view controller. |
|
85 |
*/ |
|
86 |
- (nullable UIViewController *)topMostViewController; |
|
87 |
|
|
88 |
/** |
|
89 |
returns the current key window |
|
90 |
*/ |
|
91 |
- (nullable UIWindow *)findWindow; |
|
92 |
|
|
93 |
#pragma mark - FB Apps Installed |
|
94 |
|
|
95 |
@property (nonatomic, readonly, assign) BOOL isMessengerAppInstalled; |
|
96 |
|
|
97 |
- (BOOL)isRegisteredCanOpenURLScheme:(NSString *)urlScheme; |
|
98 |
|
|
99 |
@end |
|
100 |
|
|
101 |
NS_ASSUME_NONNULL_END |