From 49b8839fda3439edc31581527e84036e58f55f0f Mon Sep 17 00:00:00 2001
From: lpw <pengwei.li@gamehollywood.com>
Date: Tue, 26 Jan 2021 09:43:00 +0800
Subject: [PATCH] 3.9.2

---
 frameworks/FBSDKLoginKit.framework/Headers/FBSDKLoginManager.h |   79 ++++++++++++++++++++++-----------------
 1 files changed, 45 insertions(+), 34 deletions(-)

diff --git a/frameworks/FBSDKLoginKit.framework/Headers/FBSDKLoginManager.h b/frameworks/FBSDKLoginKit.framework/Headers/FBSDKLoginManager.h
index 78a7b06..7e8de23 100644
--- a/frameworks/FBSDKLoginKit.framework/Headers/FBSDKLoginManager.h
+++ b/frameworks/FBSDKLoginKit.framework/Headers/FBSDKLoginManager.h
@@ -16,10 +16,41 @@
 // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-#import <Foundation/Foundation.h>
 #import <UIKit/UIKit.h>
 
 NS_ASSUME_NONNULL_BEGIN
+
+#if TARGET_OS_TV
+
+// This is an unfortunate hack for Swift Package Manager support.
+// SPM does not allow us to conditionally exclude Swift files for compilation by platform.
+//
+// So to support tvOS with SPM we need to use runtime availability checks in the Swift files.
+// This means that even though the code in `LoginManager.swift` will never be run for tvOS
+// targets, it still needs to be able to compile. Hence we need to declare it here.
+//
+// The way to fix this is to remove extensions of ObjC types in Swift.
+
+@class LoginManagerLoginResult;
+
+typedef NS_ENUM(NSUInteger, LoginBehavior) { LoginBehaviorBrowser };
+typedef NS_ENUM(NSUInteger, DefaultAudience) { DefaultAudienceFriends };
+typedef void (^LoginManagerLoginResultBlock)(LoginManagerLoginResult *_Nullable result,
+                                             NSError *_Nullable error);
+
+@interface LoginManager : NSObject
+
+@property (assign, nonatomic) LoginBehavior loginBehavior;
+@property (assign, nonatomic) DefaultAudience defaultAudience;
+
+- (void)logInWithPermissions:(NSArray<NSString *> *)permissions
+              fromViewController:(nullable UIViewController *)fromViewController
+                         handler:(nullable LoginManagerLoginResultBlock)handler
+NS_SWIFT_NAME(logIn(permissions:from:handler:));
+
+@end
+
+#else
 
 @class FBSDKLoginManagerLoginResult;
 
@@ -65,33 +96,6 @@
 } NS_SWIFT_NAME(DefaultAudience);
 
 /**
- FBSDKLoginBehavior enum
-
-  Passed to the \c FBSDKLoginManager to indicate how Facebook Login should be attempted.
-
-
-
- Facebook Login authorizes the application to act on behalf of the user, using the user's
- Facebook account. Usually a Facebook Login will rely on an account maintained outside of
- the application, by the native Facebook application, the browser, or perhaps the device
- itself. This avoids the need for a user to enter their username and password directly, and
- provides the most secure and lowest friction way for a user to authorize the application to
- interact with Facebook.
-
- The \c FBSDKLoginBehavior enum specifies which log-in methods may be used. The SDK
-  will determine the best behavior based on the current device (such as iOS version).
- */
-typedef NS_ENUM(NSUInteger, FBSDKLoginBehavior)
-{
-  /**
-    This is the default behavior, and indicates logging in via ASWebAuthenticationSession (iOS 12+) or SFAuthenticationSession (iOS 11),
-    which present specialized SafariViewControllers. Falls back to plain SFSafariViewController (iOS 9 and 10) or Safari (iOS 8).
-   */
-  FBSDKLoginBehaviorBrowser = 0,
-} NS_SWIFT_NAME(LoginBehavior)
-DEPRECATED_MSG_ATTRIBUTE("All login flows utilize the browser. This will be removed in the next major release");
-
-/**
   `FBSDKLoginManager` provides methods for logging the user in and out.
 
  `FBSDKLoginManager` works directly with `[FBSDKAccessToken currentAccessToken]` and
@@ -118,12 +122,6 @@
 @property (assign, nonatomic) FBSDKDefaultAudience defaultAudience;
 
 /**
-  the login behavior
- */
-@property (assign, nonatomic) FBSDKLoginBehavior loginBehavior
-DEPRECATED_MSG_ATTRIBUTE("All login flows utilize the browser. This will be removed in the next major release");
-
-/**
  Logs the user in or authorizes additional permissions.
  @param permissions the optional array of permissions. Note this is converted to NSSet and is only
  an NSArray for the convenience of literal syntax.
@@ -145,6 +143,17 @@
               fromViewController:(nullable UIViewController *)fromViewController
                          handler:(nullable FBSDKLoginManagerLoginResultBlock)handler
 NS_SWIFT_NAME(logIn(permissions:from:handler:));
+
+/**
+ Logs the user in with the given deep link url. Will only log user in if the given url contains valid login data.
+ @param url the deep link url
+ @param handler the callback.
+
+ This method should be called with the url from the openURL method.
+ */
+- (void)logInWithURL:(NSURL *)url
+             handler:(nullable FBSDKLoginManagerLoginResultBlock)handler
+NS_SWIFT_NAME(logIn(url:handler:));
 
 /**
   Requests user's permission to reathorize application's data access, after it has expired due to inactivity.
@@ -170,4 +179,6 @@
 
 @end
 
+#endif
+
 NS_ASSUME_NONNULL_END

--
Gitblit v1.8.0