PFSession
Objective-C
@interface PFSession : PFObject <PFSubclassing>
Swift
class PFSession : PFObject, PFSubclassing
PFSession is a local representation of a session.
This class is a subclass of a PFObject,
and retains the same functionality as any other subclass of PFObject.
-
The session token string for this session.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *sessionToken;Swift
var sessionToken: String? { get } -
Asynchronously fetches a
PFSessionobject related to the current user.Declaration
Objective-C
+ (nonnull BFTask<PFSession *> *)getCurrentSessionInBackground;Swift
class func getCurrentSessionInBackground() -> Any!Return Value
A task that is
completedwith an instance ofPFSessionclass or isfaultedif the operation fails. -
Asynchronously fetches a
PFSessionobject related to the current user.Declaration
Objective-C
+ (void)getCurrentSessionInBackgroundWithBlock: (nullable PFSessionResultBlock)block;Swift
class func currentSessionInBackground() async throws -> PFSessionParameters
blockThe block to execute when the operation completes. It should have the following argument signature:
^(PFSession *session, NSError *error).
View on GitHub
Install in Dash