UserManager

@interface UserManager : NSObject <VOUserManagerProtocol>

This is the default implementation of the VOUserManagerProtocol. The UserManager performs all User related requests.

  • RACSignal that will trigger anytime a user is updated (saved to cache) with the updated user. To receive notifications anytime a user updates, subscribe to this signal.

    Declaration

    Objective-C

    @property (readonly, nonatomic) RACSignal *_Nonnull userUpdatedSignal;

    Swift

    var userUpdatedSignal: RACSignal { get }
  • RACSignal that will trigger anytime friends is updated (saved to cache) with the list of friends that updated. To receive notifications anytime a user’s friends list updates, subscribe to this signal.

    Declaration

    Objective-C

    @property (readonly, nonatomic) RACSignal *_Nonnull friendsUpdatedSignal;

    Swift

    var friendsUpdatedSignal: RACSignal { get }
  • RACSignal that will trigger anytime a user logs in. To receive notifications anytime a user logs in, subscribe to this signal.

    Declaration

    Objective-C

    @property (readonly, nonatomic) RACSignal *_Nonnull loginSignal;

    Swift

    var loginSignal: RACSignal { get }
  • RACSignal that will trigger anytime a user logs out. To receive notifications anytime a user logs out, subscribe to this signal.

    Declaration

    Objective-C

    @property (readonly, nonatomic) RACSignal *_Nonnull logoutSignal;

    Swift

    var logoutSignal: RACSignal { get }
  • Default initializer for UserManager.

    Declaration

    Objective-C

    - (nonnull instancetype)
    initWithCacheManager:(nullable id<VOCacheProtocol>)cacheManager
          networkManager:(nonnull id<VONetworkManagerProtocol>)networkManager
          persistManager:(nullable id<VOPersistManagerProtocol>)persistManager
        analyticsManager:(nullable id<VOAnalyticsManagerProtocol>)analyticsManager;

    Parameters

    cacheManager

    - Used to cache friends, user profile. If this is nil, nothing will be cached.

    networkManager

    - Used to make user related network requests.

    persistManager

    - Used to save login authToken so the user will be logged in subsequent startups. If no persistManager is passed, the user will be logged out on each app startup.

    Return Value

    Instance of UserManager.