FConfig Class Reference

Inherits from NSObject
Declared in FConfig.h

Overview

Configuration object for Firebase. You can get the default FConfig object via [Firebase defaultConfig] and modify it. You must make all changes to it before you create your first Firebase instance.

  persistenceEnabled

By default the Firebase client will keep data in memory while your application is running, but not when it is restarted. By setting this value to YES, the data will be persisted to on-device (disk) storage and will thus be available again when the app is restarted (even when there is no network connectivity at that time). Note that this property must be set before creating your first Firebase reference and only needs to be called once per application.

@property (nonatomic) BOOL persistenceEnabled

Discussion

By default the Firebase reference will keep data in memory while your application is running, but not when it is restarted. By setting this value to YES, the data will be persisted to on-device (disk) storage and will thus be available again when the app is restarted (even when there is no network connectivity at that time). Note that this property must be set before creating your first Firebase reference and only needs to be called once per application.

If your app uses Firebase Authentication, the client will automatically persist the user’s authentication token across restarts, even without persistence enabled. But if the auth token expired while offline and you’ve enabled persistence, the client will pause write operations until you successfully re-authenticate (or explicitly unauthenticate) to prevent your writes from being sent unauthenticated and failing due to security rules.

Declared In

FConfig.h

  persistenceCacheSizeBytes

By default Firebase will use up to 10MB of disk space to cache data. If the cache grows beyond this size, Firebase will start removing data that hasn’t been recently used. If you find that your application caches too little or too much data, call this method to change the cache size. This property must be set before creating your first Firebase reference and only needs to be called once per application.

@property (nonatomic) NSUInteger persistenceCacheSizeBytes

Discussion

By default Firebase will use up to 10MB of disk space to cache data. If the cache grows beyond this size, Firebase will start removing data that hasn’t been recently used. If you find that your application caches too little or too much data, call this method to change the cache size. This property must be set before creating your first Firebase reference and only needs to be called once per application.

Note that the specified cache size is only an approximation and the size on disk may temporarily exceed it at times.

Declared In

FConfig.h

  callbackQueue

Sets the dispatch queue on which all events are raised. The default queue is the main queue.

@property (nonatomic, strong) dispatch_queue_t callbackQueue

Discussion

Sets the dispatch queue on which all events are raised. The default queue is the main queue.

Declared In

FConfig.h