63 + (BOOL) isValidDatabaseName: (NSString*)name;
69 - (instancetype)
init;
75 - (
nullable instancetype) initWithDirectory: (NSString*)directory
77 error: (NSError**)outError;
80 - (instancetype)
copy;
96 #pragma mark - DATABASES: 104 error: (NSError**)outError;
111 error: (NSError**)outError;
123 error: (NSError**)outError;
126 - (BOOL) databaseExistsNamed: (NSString*)name;
132 @property (readonly)
CBLArrayOf(NSString*)* allDatabaseNames;
135 #ifdef CBL_DEPRECATED 147 - (BOOL) replaceDatabaseNamed: (NSString*)databaseName
148 withDatabaseFile: (NSString*)databasePath
149 withAttachments: (
nullable NSString*)attachmentsPath
150 error: (NSError**)outError;
162 - (BOOL) replaceDatabaseNamed: (NSString*)databaseName
163 withDatabaseDir: (NSString*)databaseDir
164 error: (NSError**)outError;
166 #pragma mark - CONCURRENCY: 178 - (void) doAsync: (
void (^)())block;
185 - (void) backgroundTellDatabaseNamed: (NSString*)dbName to: (
void (^)(
CBLDatabase*))block;
187 #pragma mark - OTHER API: 200 + (void) enableLogging: (
nullable NSString*)type;
204 + (void) redirectLogging: (
nullable void (^)(NSString* type, NSString* message))callback;
211 - (BOOL) registerEncryptionKey: (
nullable id)keyOrPassword
212 forDatabaseNamed: (NSString*)name;
instancetype copy()
Creates a copy of this CBLManager, which can be used on a different thread.
Options for opening a database.
Definition: CBLManager.h:23
#define NS_ASSUME_NONNULL_BEGIN
Definition: CBLBase.h:20
id encryptionKey
A key to encrypt the database with.
Definition: CBLManager.h:46
NSString *const kCBLSQLiteStorage
SQLite storage type used for setting CBLDatabaseOptions.storageType.
A CouchbaseLite database.
Definition: CBLDatabase.h:38
dispatch_queue_t dispatchQueue
The dispatch queue used to serialize access to the database manager (and its child objects...
Definition: CBLManager.h:173
#define __nullable
Definition: CBLBase.h:23
NSDataWritingOptions fileProtection
File protection/encryption options (iOS only)
Definition: CBLManager.h:16
BOOL readOnly
Open database read-only?
Definition: CBLManager.h:25
BOOL excludedFromBackup
Should the databases and attachments be excluded from iCloud or Time Machine backup? Defaults to NO.
Definition: CBLManager.h:94
#define nullable
Definition: CBLBase.h:22
BOOL create
Create database if it doesn't exist?
Definition: CBLManager.h:24
NSString * storageType
The underlying storage engine to use.
Definition: CBLManager.h:33
instancetype init()
Default initializer.
NSURL * internalURL
The base URL of the database manager's REST API.
Definition: CBLManager.h:193
#define NS_ASSUME_NONNULL_END
Definition: CBLBase.h:21
NSString * defaultDirectory()
The default directory to use for a CBLManager.
void close()
Releases all resources used by the CBLManager instance and closes all its databases.
Top-level Couchbase Lite object; manages a collection of databases.
Definition: CBLManager.h:56
bool readOnly
No modifications to databases are allowed.
Definition: CBLManager.h:15
Option flags for CBLManager initialization.
Definition: CBLManager.h:14
NSString *const CBLHTTPErrorDomain
NSError domain used for HTTP status codes returned by a lot of Couchbase Lite APIs – for example cod...
CBLArrayOf(NSNumber *) *CBLGeoPointToCoordPair(CBLGeoPoint pt)
Converts a point to a JSON-compatible array of two coordinates.
NSString * directory
The root directory of this manager (as specified at initialization time.)
Definition: CBLManager.h:90
NS_ASSUME_NONNULL_BEGIN struct CBLManagerOptions CBLManagerOptions
Option flags for CBLManager initialization.
NSMutableDictionary * customHTTPHeaders
Definition: CBLManager.h:207
NSString * CBLVersion(void)
Returns the version of Couchbase Lite.
instancetype sharedInstance()
A shared per-process instance.
NSString *const kCBLForestDBStorage
ForestDB storage type used for setting CBLDatabaseOptions.storageType.