Manifest

@interface Manifest : NSObject

Class representing a GameService manifest.

  • Undocumented

    Declaration

    Swift

    @property (nonatomic) BOOL updatesEnabled
  • Undocumented

    Declaration

    Swift

    @property (nonatomic) BOOL autoCheckOnLaunch
  • Undocumented

    Declaration

    Swift

    @property (nonatomic, strong, readonly, nullable) NSDate* timeOfLastCheck
  • Undocumented

    Declaration

    Swift

    @property (nonatomic, strong, readonly, nullable) NSDate* lastServerTimestamp
  • Undocumented

    Declaration

    Swift

    @property (nonatomic, strong, readonly, nullable) NSDate* currentServerTimestamp
  • Undocumented

    Declaration

    Swift

    @property (nonatomic, strong, readonly, nullable) NSArray<NSString*>* userTypes
  • Undocumented

    Declaration

    Swift

    + (nonnull Manifest*)sharedInstance;
  • Undocumented

    Declaration

    Swift

    + (void)reset;
  • Undocumented

    Declaration

    Swift

    + (BOOL)verbose;
  • Undocumented

    Declaration

    Swift

    + (void)setVerbose:(BOOL)value;
  • Triggered prior to initialization, currently the main function of this call is to load the last locally saved manifest.

    Declaration

    Swift

    - (void)preInitialize;
  • Undocumented

    Declaration

    Swift

    - (void)initialize;
  • Initialize the service with all depended services.

    Declaration

    Swift

    - (void)initialize:(nonnull id<IUsertypes>)usertypes;

    Parameters

    usertypes
  • Returns true if the manifest service has been initialized.

    Declaration

    Swift

    - (BOOL)isInitialized;
  • Keeps the current manifest, but removes the local store of hashes so it’s forced to get an update from the server next check.

    Declaration

    Swift

    - (void)invalidateManifest;
  • True if there is a successfully saved Manifest file.

    Declaration

    Swift

    - (BOOL)hasManifest;
  • Has the last successful manifest request been longer then x time ago (default is 7 days).

    Note

    This is mostly for internal use.

    Declaration

    Swift

    - (BOOL)hasManifestExpiryElapsed;
  • Check with the server to see if the current loaded manifest is up to date for the user and requests a new manifest from the server if there is one.

    Note

    the promise will fail if there is already a CheckForUpdate call in progress.

    Declaration

    Swift

    - (id)checkForUpdate;

    Return Value

    AnyPromise Will resolve when the check is complete.

  • True if the service is in the process of checking for a manifest.

    Declaration

    Swift

    - (BOOL)isCheckingForUpdate;
  • Gets a generic value out of the manifest file.

    Declaration

    Swift

    - (nullable id)getValueWithDefault:(nullable id)defaultValue
     forKeys:(nonnull NSString *)firstKey, ...;

    Parameters

    defaultValue

    If it can’t find a key or some exception occurs (like casting exceptions) then it returns this value.

    keys

    A list of key strings used to traverse the manifest’s tree-like structure. The order goes from root node to leaf node.

  • See

    getValueWithDefault:forKeys:

    Declaration

    Swift

    - (nullable id)getValueWithDefault:(nullable id)defaultValue
     keys:(nonnull NSArray<NSString *> *)keys;
  • See

    getValueWithDefault:forKeys:

    Declaration

    Swift

    - (nullable id)getValueWithDefault:(nullable id)defaultValue
     firstKey:(nonnull NSString *)firstKey
     arguments:(struct __va_list_tag *)args;
  • Undocumented

    Declaration

    Swift

    - (void)addDelegate:(nonnull id<ManifestDelegate>)delegate;
  • Undocumented

    Declaration

    Swift

    - (void)removeDelegate:(nonnull id<ManifestDelegate>)delegate;