commit | author | age
|
e0ec42
|
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 |
#import <FBSDKCoreKit/_FBSDKWindowFinding.h> |
|
16 |
|
|
17 |
#if !TARGET_OS_TV |
|
18 |
#import <FBSDKCoreKit/FBSDKURLHosting.h> |
|
19 |
#endif |
|
20 |
|
|
21 |
@protocol FBSDKErrorCreating; |
|
22 |
@protocol FBSDKInfoDictionaryProviding; |
|
23 |
@protocol FBSDKSettings; |
|
24 |
@protocol __FBSDKLoggerCreating; |
|
25 |
|
|
26 |
NS_ASSUME_NONNULL_BEGIN |
|
27 |
|
|
28 |
NS_SWIFT_NAME(InternalUtility) |
|
29 |
@interface FBSDKInternalUtility : NSObject |
|
30 |
#if !TARGET_OS_TV |
|
31 |
<FBSDKAppAvailabilityChecker, FBSDKAppURLSchemeProviding, FBSDKInternalUtility, FBSDKURLHosting, _FBSDKWindowFinding> |
|
32 |
#else |
|
33 |
<FBSDKAppAvailabilityChecker, FBSDKAppURLSchemeProviding, FBSDKInternalUtility> |
|
34 |
#endif |
|
35 |
|
|
36 |
#if !DEBUG |
|
37 |
- (instancetype)init NS_UNAVAILABLE; |
|
38 |
+ (instancetype)new NS_UNAVAILABLE; |
|
39 |
#endif |
|
40 |
|
|
41 |
@property (class, nonnull, readonly) FBSDKInternalUtility *sharedUtility; |
|
42 |
|
|
43 |
/** |
|
44 |
Returns bundle for returning localized strings |
|
45 |
|
|
46 |
We assume a convention of a bundle named FBSDKStrings.bundle, otherwise we |
|
47 |
return the main bundle. |
|
48 |
*/ |
|
49 |
@property (nonatomic, readonly, strong) NSBundle *bundleForStrings; |
|
50 |
|
|
51 |
/** |
|
52 |
Tests whether the supplied URL is a valid URL for opening in the browser. |
|
53 |
@param URL The URL to test. |
|
54 |
@return YES if the URL refers to an http or https resource, otherwise NO. |
|
55 |
*/ |
|
56 |
- (BOOL)isBrowserURL:(NSURL *)URL; |
|
57 |
|
|
58 |
/** |
|
59 |
Checks equality between 2 objects. |
|
60 |
|
|
61 |
Checks for pointer equality, nils, isEqual:. |
|
62 |
@param object The first object to compare. |
|
63 |
@param other The second object to compare. |
|
64 |
@return YES if the objects are equal, otherwise NO. |
|
65 |
*/ |
|
66 |
- (BOOL)object:(id)object isEqualToObject:(id)other; |
|
67 |
|
|
68 |
/// Attempts to find the first UIViewController in the view's responder chain. Returns nil if not found. |
|
69 |
- (nullable UIViewController *)viewControllerForView:(UIView *)view; |
|
70 |
|
|
71 |
/// returns true if the url scheme is registered in the CFBundleURLTypes |
|
72 |
- (BOOL)isRegisteredURLScheme:(NSString *)urlScheme; |
|
73 |
|
|
74 |
/// returns currently displayed top view controller. |
|
75 |
- (nullable UIViewController *)topMostViewController; |
|
76 |
|
|
77 |
/// returns the current key window |
|
78 |
- (nullable UIWindow *)findWindow; |
|
79 |
|
|
80 |
#pragma mark - FB Apps Installed |
|
81 |
|
|
82 |
@property (nonatomic, readonly, assign) BOOL isMessengerAppInstalled; |
|
83 |
|
|
84 |
- (BOOL)isRegisteredCanOpenURLScheme:(NSString *)urlScheme; |
|
85 |
|
|
86 |
/** |
|
87 |
Internal method exposed to facilitate transition to Swift. |
|
88 |
API Subject to change or removal without warning. Do not use. |
|
89 |
|
|
90 |
@warning INTERNAL - DO NOT USE |
|
91 |
*/ |
|
92 |
- (void)configureWithInfoDictionaryProvider:(id<FBSDKInfoDictionaryProviding>)infoDictionaryProvider |
|
93 |
loggerFactory:(id<__FBSDKLoggerCreating>)loggerFactory |
|
94 |
settings:(id<FBSDKSettings>)settings |
|
95 |
errorFactory:(id<FBSDKErrorCreating>)errorFactory |
|
96 |
NS_SWIFT_NAME(configure(infoDictionaryProvider:loggerFactory:settings:errorFactory:)); |
|
97 |
|
|
98 |
@end |
|
99 |
|
|
100 |
NS_ASSUME_NONNULL_END |