PFSession

@interface 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 (readonly, copy, nonatomic, nullable) NSString *sessionToken;
  • Asynchronously fetches a PFSession object related to the current user.

    Declaration

    Objective-C

    + (id)getCurrentSessionInBackground;

    Return Value

    A task that is completed with an instance of PFSession class or is faulted if the operation fails.

  • Asynchronously fetches a PFSession object related to the current user.

    Declaration

    Objective-C

    + (void)getCurrentSessionInBackgroundWithBlock:
            (nullable PFSessionResultBlock)block;

    Parameters

    block

    The block to execute when the operation completes. It should have the following argument signature: ^(PFSession *session, NSError *error).