From 13e53a03f4d50169d0cf7f72d414753ae6b421ce Mon Sep 17 00:00:00 2001
From: hank <hank.zhang@proficientcity.com>
Date: Tue, 22 Jan 2019 11:04:39 +0800
Subject: [PATCH] 添加V3.8.0

---
 frameworks/FBSDKCoreKit.framework/Headers/FBSDKAccessToken.h |  108 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 91 insertions(+), 17 deletions(-)

diff --git a/frameworks/FBSDKCoreKit.framework/Headers/FBSDKAccessToken.h b/frameworks/FBSDKCoreKit.framework/Headers/FBSDKAccessToken.h
index ef54b15..ff73de5 100644
--- a/frameworks/FBSDKCoreKit.framework/Headers/FBSDKAccessToken.h
+++ b/frameworks/FBSDKCoreKit.framework/Headers/FBSDKAccessToken.h
@@ -20,7 +20,8 @@
 
 #import <FBSDKCoreKit/FBSDKCopying.h>
 #import <FBSDKCoreKit/FBSDKGraphRequestConnection.h>
-#import <FBSDKCoreKit/FBSDKMacros.h>
+
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
 
 /**
   Notification indicating that the `currentAccessToken` has changed.
@@ -29,7 +30,20 @@
  `FBSDKAccessTokenChangeOldKey` and
  `FBSDKAccessTokenChangeNewKey`.
  */
-FBSDK_EXTERN NSString *const FBSDKAccessTokenDidChangeNotification;
+FOUNDATION_EXPORT NSNotificationName const FBSDKAccessTokenDidChangeNotification;
+
+#else
+
+/**
+  Notification indicating that the `currentAccessToken` has changed.
+
+ the userInfo dictionary of the notification will contain keys
+ `FBSDKAccessTokenChangeOldKey` and
+ `FBSDKAccessTokenChangeNewKey`.
+ */
+FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidChangeNotification;
+
+#endif
 
 /**
   A key in the notification's userInfo that will be set
@@ -44,21 +58,33 @@
   of an access token, this key will also exist since the access token
   is moving from a null state (no user) to a non-null state (user).
  */
-FBSDK_EXTERN NSString *const FBSDKAccessTokenDidChangeUserID;
+FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidChangeUserIDKey;
+
+FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidChangeUserID
+DEPRECATED_MSG_ATTRIBUTE("Renamed `FBSDKAccessTokenDidChangeUserIDKey`");
 
 /*
   key in notification's userInfo object for getting the old token.
 
  If there was no old token, the key will not be present.
  */
-FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeOldKey;
+FOUNDATION_EXPORT NSString *const FBSDKAccessTokenChangeOldKey;
 
 /*
   key in notification's userInfo object for getting the new token.
 
  If there is no new token, the key will not be present.
  */
-FBSDK_EXTERN NSString *const FBSDKAccessTokenChangeNewKey;
+FOUNDATION_EXPORT NSString *const FBSDKAccessTokenChangeNewKey;
+
+/*
+ A key in the notification's userInfo that will be set
+ if and only if the token has expired.
+ */
+FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidExpireKey;
+
+FOUNDATION_EXPORT NSString *const FBSDKAccessTokenDidExpire
+DEPRECATED_MSG_ATTRIBUTE("Renamed `FBSDKAccessTokenDidExpireKey`");
 
 
 /**
@@ -70,6 +96,11 @@
   Returns the app ID.
  */
 @property (readonly, copy, nonatomic) NSString *appID;
+
+/**
+ Returns the expiration date for data access
+ */
+@property (readonly, copy, nonatomic) NSDate *dataAccessExpirationDate;
 
 /**
   Returns the known declined permissions.
@@ -101,20 +132,56 @@
  */
 @property (readonly, copy, nonatomic) NSString *userID;
 
+/**
+ Returns whether the access token is expired by checking its expirationDate property
+ */
+@property (readonly, assign, nonatomic, getter = isExpired) BOOL expired;
+
+/**
+ Returns whether user data access is still active for the given access token
+ */
+@property (readonly, assign, nonatomic, getter = isDataAccessExpired) BOOL dataAccessExpired;
+
 - (instancetype)init NS_UNAVAILABLE;
 + (instancetype)new NS_UNAVAILABLE;
 
 /**
+ Initializes a new instance.
+ @param tokenString the opaque token string.
+ @param permissions the granted permissions. Note this is converted to NSSet and is only
+ an NSArray for the convenience of literal syntax.
+ @param declinedPermissions the declined permissions. Note this is converted to NSSet and is only
+ an NSArray for the convenience of literal syntax.
+ @param appID the app ID.
+ @param userID the user ID.
+ @param expirationDate the optional expiration date (defaults to distantFuture).
+ @param refreshDate the optional date the token was last refreshed (defaults to today).
+
+ This initializer should only be used for advanced apps that
+ manage tokens explicitly. Typical login flows only need to use `FBSDKLoginManager`
+ along with `+currentAccessToken`.
+ */
+- (instancetype)initWithTokenString:(NSString *)tokenString
+                        permissions:(NSArray *)permissions
+                declinedPermissions:(NSArray *)declinedPermissions
+                              appID:(NSString *)appID
+                             userID:(NSString *)userID
+                     expirationDate:(NSDate *)expirationDate
+                        refreshDate:(NSDate *)refreshDate;
+
+/**
   Initializes a new instance.
- - Parameter tokenString: the opaque token string.
- - Parameter permissions: the granted permissions. Note this is converted to NSSet and is only
+ @param tokenString the opaque token string.
+ @param permissions the granted permissions. Note this is converted to NSSet and is only
  an NSArray for the convenience of literal syntax.
- - Parameter declinedPermissions: the declined permissions. Note this is converted to NSSet and is only
+ @param declinedPermissions the declined permissions. Note this is converted to NSSet and is only
  an NSArray for the convenience of literal syntax.
- - Parameter appID: the app ID.
- - Parameter userID: the user ID.
- - Parameter expirationDate: the optional expiration date (defaults to distantFuture).
- - Parameter refreshDate: the optional date the token was last refreshed (defaults to today).
+ @param appID the app ID.
+ @param userID the user ID.
+ @param expirationDate the optional expiration date (defaults to distantFuture).
+ @param refreshDate the optional date the token was last refreshed (defaults to today).
+ @param dataAccessExpirationDate the date which data access will expire for the given user
+ (defaults to distantFuture).
 
  This initializer should only be used for advanced apps that
  manage tokens explicitly. Typical login flows only need to use `FBSDKLoginManager`
@@ -127,18 +194,19 @@
                              userID:(NSString *)userID
                      expirationDate:(NSDate *)expirationDate
                         refreshDate:(NSDate *)refreshDate
+                 dataAccessExpirationDate:(NSDate *)dataAccessExpirationDate
 NS_DESIGNATED_INITIALIZER;
 
 /**
   Convenience getter to determine if a permission has been granted
- - Parameter permission:  The permission to check.
+ @param permission  The permission to check.
  */
 - (BOOL)hasGranted:(NSString *)permission;
 
 /**
   Compares the receiver to another FBSDKAccessToken
- - Parameter token: The other token
- - Returns: YES if the receiver's values are equal to the other token's values; otherwise NO
+ @param token The other token
+ @return YES if the receiver's values are equal to the other token's values; otherwise NO
  */
 - (BOOL)isEqualToAccessToken:(FBSDKAccessToken *)token;
 
@@ -151,8 +219,14 @@
 + (FBSDKAccessToken *)currentAccessToken;
 
 /**
+ Returns YES if currentAccessToken is not nil AND currentAccessToken is not expired
+
+ */
++ (BOOL)currentAccessTokenIsActive;
+
+/**
   Sets the "global" access token that represents the currently logged in user.
- - Parameter token: The access token to set.
+ @param token The access token to set.
 
  This will broadcast a notification and save the token to the app keychain.
  */
@@ -161,7 +235,7 @@
 /**
   Refresh the current access token's permission state and extend the token's expiration date,
   if possible.
- - Parameter completionHandler: an optional callback handler that can surface any errors related to permission refreshing.
+ @param completionHandler an optional callback handler that can surface any errors related to permission refreshing.
 
  On a successful refresh, the currentAccessToken will be updated so you typically only need to
   observe the `FBSDKAccessTokenDidChangeNotification` notification.

--
Gitblit v1.8.0