Classes
The following classes are available globally.
-
Provider client for user API keys.
See moreDeclaration
Objective-C
@interface RLMAPIKeyAuth : RLMProviderClientSwift
@_nonSendable(_assumed) class RLMAPIKeyAuth : RLMProviderClient, @unchecked Sendable
-
Properties representing the configuration of a client that communicate with a particular Realm application.
See moreRLMAppConfigurationoptions cannot be modified once theRLMAppusing it is created. App’s configuration values are cached when the App is created so any modifications after it will not have any effect.Declaration
Objective-C
@interface RLMAppConfiguration : NSObject <NSCopying>Swift
@_nonSendable(_assumed) class RLMAppConfiguration : NSObject, NSCopying
-
The
RLMApphas the fundamental set of methods for communicating with a Realm application backend.This interface provides access to login and authentication.
See moreDeclaration
Objective-C
@interface RLMApp : NSObjectSwift
@_nonSendable(_assumed) class RLMApp : NSObject, @unchecked Sendable -
RLMArrayis the container type in Realm used to define to-many relationships.Unlike an
NSArray,RLMArrays hold a single type, specified by theobjectClassNameproperty. This is referred to in these docs as the “type” of the array.When declaring an
RLMArrayproperty, the type must be marked as conforming to a protocol by the same name as the objects it should contain (see theRLM_COLLECTION_TYPEmacro). In addition, the property can be declared using Objective-C generics for better compile-time type safety.RLM_COLLECTION_TYPE(ObjectType) ... @property RLMArray<ObjectType *><ObjectType> *arrayOfObjectTypes;RLMArrays can be queried with the same predicates asRLMObjectandRLMResults.RLMArrays cannot be created directly.RLMArrayproperties onRLMObjects are lazily created when accessed, or can be obtained by querying a Realm.Key-Value Observing
RLMArraysupports array key-value observing onRLMArrayproperties onRLMObjectsubclasses, and theinvalidatedproperty onRLMArrayinstances themselves is key-value observing compliant when theRLMArrayis attached to a managedRLMObject(RLMArrays on unmanagedRLMObjects will never become invalidated).Because
See moreRLMArrays are attached to the object which they are a property of, they do not require using the mutable collection proxy objects from-mutableArrayValueForKey:or KVC-compatible mutation methods on the containing object. Instead, you can call the mutation methods on theRLMArraydirectly.Declaration
Objective-C
@interface RLMArray<RLMObjectType> : NSObject <RLMCollection>Swift
@_nonSendable(_assumed) class RLMArray<RLMObjectType> : NSObject, RLMCollection where RLMObjectType : AnyObject -
RLMAsymmetricObjectis a base class used to define asymmetric Realm objects.Asymmetric objects can only be created using the
createInRealm:function, and cannot be added, removed or queried. When created, asymmetric objects will be synced unidirectionally to the MongoDB database and cannot be accessed locally.Linking an asymmetric object within an
Objectis not allowed and will throw an error.The property types supported on
See moreRLMAsymmetricObjectare the same as forRLMObject, except for that asymmetric objects can only link to embedded objects, soRLMObjectandRLMArray<RLMObject>properties are not supported (RLMEmbeddedObjectandRLMArray<RLEmbeddedObject>are).Declaration
Objective-C
@interface RLMAsymmetricObject : RLMObjectBaseSwift
@_nonSendable(_assumed) class RLMAsymmetricObject : RLMObjectBase -
A task object which can be used to observe or cancel an async open.
When a synchronized Realm is opened asynchronously, the latest state of the Realm is downloaded from the server before the completion callback is invoked. This task object can be used to observe the state of the download or to cancel it. This should be used instead of trying to observe the download via the sync session as the sync session itself is created asynchronously, and may not exist yet when -[RLMRealm asyncOpenWithConfiguration:completion:] returns.
See moreDeclaration
Objective-C
@interface RLMAsyncOpenTask : NSObjectSwift
@_nonSendable(_assumed) class RLMAsyncOpenTask : NSObject, @unchecked Sendable
-
MaxKey will always be the greatest value when comparing to other BSON types
Declaration
Objective-C
@interface RLMMaxKey : NSObjectSwift
class RLMMaxKey : NSObject, @unchecked Sendable -
MinKey will always be the smallest value when comparing to other BSON types
Declaration
Objective-C
@interface RLMMinKey : NSObjectSwift
class RLMMinKey : NSObject, @unchecked Sendable -
An
RLMSortDescriptorstores a property name and a sort order for use withsortedResultsUsingDescriptors:. It is similar toNSSortDescriptor, but supports only the subset of functionality which can be efficiently run by Realm’s query engine.
See moreRLMSortDescriptorinstances are immutable.Declaration
Objective-C
@interface RLMSortDescriptor : NSObjectSwift
@_nonSendable(_assumed) class RLMSortDescriptor : NSObject, @unchecked Sendable -
A
RLMCollectionChangeobject encapsulates information about changes to collections that are reported by Realm notifications.RLMCollectionChangeis passed to the notification blocks registered with-addNotificationBlockonRLMArrayandRLMResults, and reports what rows in the collection changed since the last time the notification block was called.The change information is available in two formats: a simple array of row indices in the collection for each type of change, and an array of index paths in a requested section suitable for passing directly to
UITableView‘s batch update methods. A complete example of updating aUITableViewnamedtv:[tv beginUpdates]; [tv deleteRowsAtIndexPaths:[changes deletionsInSection:0] withRowAnimation:UITableViewRowAnimationAutomatic]; [tv insertRowsAtIndexPaths:[changes insertionsInSection:0] withRowAnimation:UITableViewRowAnimationAutomatic]; [tv reloadRowsAtIndexPaths:[changes modificationsInSection:0] withRowAnimation:UITableViewRowAnimationAutomatic]; [tv endUpdates];All of the arrays in an
See moreRLMCollectionChangeare always sorted in ascending order.Declaration
Objective-C
@interface RLMCollectionChange : NSObjectSwift
@_nonSendable(_assumed) class RLMCollectionChange : NSObject -
Opaque credentials representing a specific Realm App user.
See moreDeclaration
Objective-C
@interface RLMCredentials : NSObjectSwift
@_nonSendable(_assumed) class RLMCredentials : NSObject, @unchecked Sendable -
A 128-bit IEEE 754-2008 decimal floating point number.
This type is similar to Swift’s built-in Decimal type, but allocates bits differently, resulting in a different representable range. (NS)Decimal stores a significand of up to 38 digits long and an exponent from -128 to 127, while this type stores up to 34 digits of significand and an exponent from -6143 to 6144.
See moreDeclaration
Objective-C
@interface RLMDecimal128 : NSObject <NSCopying>Swift
@_nonSendable(_assumed) class RLMDecimal128 : NSObject, NSCopying, @unchecked Sendable -
RLMDictionaryis a container type in Realm representing a dynamic collection of key-value pairs.Unlike
NSDictionary,RLMDictionarys hold a single key and value type. This is referred to in these docs as the “type” and “keyType” of the dictionary.When declaring an
RLMDictionaryproperty, the object type and keyType must be marked as conforming to a protocol by the same name as the objects it should contain.RLM_COLLECTION_TYPE(ObjectType) ... @property RLMDictionary<NSString *, ObjectType *><RLMString, ObjectType> *objectTypeDictionary;RLMDictionarys can be queried with the same predicates asRLMObjectandRLMResults.RLMDictionarys cannot be created directly.RLMDictionaryproperties onRLMObjects are lazily created when accessed, or can be obtained by querying a Realm.RLMDictionaryonly supportsNSStringas a key. Realm disallows the use of.or$characters within a dictionary key.Key-Value Observing
See moreRLMDictionarysupports dictionary key-value observing onRLMDictionaryproperties onRLMObjectsubclasses, and theinvalidatedproperty onRLMDictionaryinstances themselves is key-value observing compliant when theRLMDictionaryis attached to a managedRLMObject(RLMDictionarys on unmanagedRLMObjects will never become invalidated).Declaration
Objective-C
@interface RLMDictionary<RLMKeyType, RLMObjectType> : NSObject <RLMCollection>Swift
@_nonSendable(_assumed) class RLMDictionary<RLMKeyType, RLMObjectType> : NSObject, RLMCollection where RLMKeyType : AnyObject, RLMObjectType : AnyObject -
A
RLMDictionaryChangeobject encapsulates information about changes to dictionaries that are reported by Realm notifications.
See moreRLMDictionaryChangeis passed to the notification blocks registered with-addNotificationBlockonRLMDictionary, and reports what keys in the dictionary changed since the last time the notification block was called.Declaration
Objective-C
@interface RLMDictionaryChange : NSObjectSwift
@_nonSendable(_assumed) class RLMDictionaryChange : NSObject -
A client for the email/password authentication provider which can be used to obtain a credential for logging in, and to perform requests specifically related to the email/password provider.
See moreDeclaration
Objective-C
@interface RLMEmailPasswordAuth : RLMProviderClientSwift
@_nonSendable(_assumed) class RLMEmailPasswordAuth : RLMProviderClient, @unchecked Sendable -
RLMEmbeddedObjectis a base class used to define Realm model objects.Embedded objects work similarly to normal objects, but are owned by a single parent Object (which itself may be embedded). Unlike normal top-level objects, embedded objects cannot be directly created in or added to a Realm. Instead, they can only be created as part of a parent object, or by assigning an unmanaged object to a parent object’s property. Embedded objects are automatically deleted when the parent object is deleted or when the parent is modified to no longer point at the embedded object, either by reassigning an RLMObject property or by removing the embedded object from the array containing it.
Embedded objects can only ever have a single parent object which links to them, and attempting to link to an existing managed embedded object will throw an exception.
The property types supported on
RLMEmbeddedObjectare the same as forRLMObject, except for that embedded objects cannot link to top-level objects, soRLMObjectandRLMArray<RLMObject>properties are not supported (RLMEmbeddedObjectandRLMArray<RLMEmbeddedObject>are).Embedded objects cannot have primary keys or indexed properties.
See moreDeclaration
Objective-C
@interface RLMEmbeddedObject : RLMObjectBase <RLMThreadConfined>Swift
@_nonSendable(_assumed) class RLMEmbeddedObject : RLMObjectBase, RLMThreadConfined
-
Extended information about a write which was rejected by the server.
The server will sometimes reject writes made by the client for reasons such as permissions, additional server-side validation failing, or because the object didn’t match any flexible sync subscriptions. When this happens, a
RLMSyncErrorWriteRejectederror is reported which contains an array ofRLMCompensatingWriteInfoobjects in theRLMCompensatingWriteInfoKeyuserInfo key with information about what writes were rejected and why.This information is intended for debugging and logging purposes only. The
See morereasonstrings are generated by the server and are not guaranteed to be stable, so attempting to programmatically do anything with them will break without warning.Declaration
Objective-C
@interface RLMCompensatingWriteInfo : NSObjectSwift
class RLMCompensatingWriteInfo : NSObject, @unchecked Sendable -
Options to use when executing a
See morefindOneAndUpdate,findOneAndReplace, orfindOneAndDeletecommand on aRLMMongoCollection.Declaration
Objective-C
@interface RLMFindOneAndModifyOptions : NSObjectSwift
@_nonSendable(_assumed) class RLMFindOneAndModifyOptions : NSObject -
Options to use when executing a
See morefindcommand on aRLMMongoCollection.Declaration
Objective-C
@interface RLMFindOptions : NSObjectSwift
@_nonSendable(_assumed) class RLMFindOptions : NSObject -
A class that represents the coordinates of a point formed by a latitude and a longitude value.
- Latitude ranges between -90 and 90 degrees, inclusive.
- Longitude ranges between -180 and 180 degrees, inclusive.
- Altitude cannot have negative values.
Values outside this ranges will return nil when trying to create a
RLMGeospatialPoint.Note
There is no dedicated type to store Geospatial points, instead points should be stored as GeoJson-shaped embedded object, as explained below. Geospatial queries (geoWithin) can only be executed in such a type of objects and will throw otherwise.Persisting geo points in Realm is currently done using duck-typing, which means that any model class with a specific shape can be queried as though it contained a geographical location. The recommended approach is using an embedded object.
Warning
This structure cannot be persisted and can only be used to build other geospatial shapes such as (
RLMGeospatialBox,RLMGeospatialPolygonandRLMGeospatialCircle).See moreWarning
Altitude is not used in any of the query calculations.
Declaration
Objective-C
@interface RLMGeospatialPoint : NSObjectSwift
class RLMGeospatialPoint : NSObject, @unchecked Sendable -
A class that represents a rectangle, that can be used in a geospatial
geoWithinquery.See moreWarning
This class cannot be persisted and can only be use within a geospatialgeoWithinquery.Declaration
Objective-C
@interface RLMGeospatialBox : NSObject <RLMGeospatial>Swift
class RLMGeospatialBox : NSObject, RLMGeospatial, @unchecked Sendable -
A class that represents a polygon, that can be used in a geospatial
geoWithinquery.A
RLMGeospatialPolygondescribes a shape conformed of and outerPolygon, calledouterRing, and 0 or more innerPolygons, calledholes, which represents an unlimited number of internal holes inside the outerPolygon. APolygondescribes a shape conformed by at least three segments, where the last and the firstRLMGeospatialPointmust be the same to indicate a closed polygon (meaning you need at least 4 points to define a polygon). Inner holes in aRLMGeospatialPolygonmust be entirely inside the outer ringA
holehas the following restrictions:- Holes may not cross, i.e. the boundary of a hole may not intersect both the interior and the exterior of any other hole.
- Holes may not share edges, i.e. if a hole contains and edge AB, the no other hole may contain it.
- Holes may share vertices, however no vertex may appear twice in a single hole.
- No hole may be empty.
Only one nesting is allowed.
See moreWarning
This class cannot be persisted and can only be use within a geospatial
geoWithinquery.Declaration
Objective-C
@interface RLMGeospatialPolygon : NSObject <RLMGeospatial>Swift
class RLMGeospatialPolygon : NSObject, RLMGeospatial, @unchecked Sendable -
This structure is a helper to represent/convert a distance. It can be used in geospatial queries like those represented by a
RLMGeospatialCircleSee moreWarning
This structure cannot be persisted and can only be used to build other geospatial shapesDeclaration
Objective-C
@interface RLMDistance : NSObjectSwift
class RLMDistance : NSObject, @unchecked Sendable -
A class that represents a circle, that can be used in a geospatial
geoWithinquery.See moreWarning
This class cannot be persisted and can only be use within a geospatialgeoWithinquery.Declaration
Objective-C
@interface RLMGeospatialCircle : NSObject <RLMGeospatial>Swift
class RLMGeospatialCircle : NSObject, RLMGeospatial, @unchecked Sendable -
A configuration controlling how the initial subscriptions are populated when a Realm file is first opened.
See moreSee
RLMSubscriptionSetDeclaration
Objective-C
@interface RLMInitialSubscriptionsConfiguration : NSObjectSwift
@_nonSendable(_assumed) class RLMInitialSubscriptionsConfiguration : NSObject, @unchecked Sendable -
RLMLoggeris used for creating your own custom logging logic.You can define your own logger creating an instance of
RLMLoggerand define the log function which will be invoked whenever there is a log message. Set this custom logger as you default logger usingsetDefaultLogger.RLMLogger.defaultLogger = [[RLMLogger alloc] initWithLevel:RLMLogLevelDebug logFunction:^(RLMLogLevel level, NSString * message) { NSLog(@"Realm Log - %lu, %@", (unsigned long)level, message); }];See moreNote
By default default log threshold level isRLMLogLevelInfo, and logging strings are output to Apple System Logger.Declaration
Objective-C
@interface RLMLogger : NSObjectSwift
class RLMLogger : NSObject -
RLMMigrationinstances encapsulate information intended to facilitate a schema migration.A
See moreRLMMigrationinstance is passed into a user-definedRLMMigrationBlockblock when updating the version of a Realm. This instance provides access to the old and new database schemas, the objects in the Realm, and provides functionality for modifying the Realm during the migration.Declaration
Objective-C
@interface RLMMigration : NSObjectSwift
@_nonSendable(_assumed) class RLMMigration : NSObject -
The
RLMMongoClientenables reading and writing on a MongoDB database via the Realm Cloud service.It provides access to instances of
RLMMongoDatabase, which in turn provide access to specificRLMMongoCollections that hold your data.Note
Before you can read or write data, a user must log in.
See moreSee also
Declaration
Objective-C
@interface RLMMongoClient : NSObjectSwift
@_nonSendable(_assumed) class RLMMongoClient : NSObject, @unchecked Sendable -
Acts as a middleman and processes events with WatchStream
See moreDeclaration
Objective-C
@interface RLMChangeStream : NSObject <RLMEventDelegate>Swift
@_nonSendable(_assumed) class RLMChangeStream : NSObject, RLMEventDelegate, @unchecked Sendable -
The
RLMMongoCollectionrepresents a MongoDB collection.You can get an instance from a
RLMMongoDatabase.Create, read, update, and delete methods are available.
Operations against the Realm Cloud server are performed asynchronously.
Note
Before you can read or write data, a user must log in.Usage: RLMMongoClient *client = [self.app mongoClient:@“mongodb1”]; RLMMongoDatabase *database = [client databaseWithName:@“test_data”]; RLMMongoCollection *collection = [database collectionWithName:@“Dog”]; [collection insertOneDocument:@{@“name”: @“fido”, @“breed”: @“cane corso”} completion:…];
See moreSee also
Declaration
Objective-C
@interface RLMMongoCollection : NSObjectSwift
@_nonSendable(_assumed) class RLMMongoCollection : NSObject, @unchecked Sendable -
The
RLMMongoDatabaserepresents a MongoDB database, which holds a group of collections that contain your data.It can be retrieved from the
RLMMongoClient.Use it to get
RLMMongoCollections for reading and writing data.Note
Before you can read or write data, a user must log in`.
See moreSee also
Declaration
Objective-C
@interface RLMMongoDatabase : NSObjectSwift
@_nonSendable(_assumed) class RLMMongoDatabase : NSObject, @unchecked Sendable -
An HTTP request that can be made to an arbitrary server.
See moreDeclaration
Objective-C
@interface RLMRequest : NSObjectSwift
@_nonSendable(_assumed) class RLMRequest : NSObject -
The contents of an HTTP response.
See moreDeclaration
Objective-C
@interface RLMResponse : NSObjectSwift
@_nonSendable(_assumed) class RLMResponse : NSObject -
Transporting protocol for foreign interfaces. Allows for custom request/response handling.
See moreDeclaration
Objective-C
@interface RLMNetworkTransport : NSObject <RLMNetworkTransport>Swift
@_nonSendable(_assumed) class RLMNetworkTransport : NSObject, RLMNetworkTransportProtocol, @unchecked Sendable -
RLMObjectis a base class for model objects representing data stored in Realms.Define your model classes by subclassing
RLMObjectand adding properties to be managed. Then instantiate and use your custom subclasses instead of using theRLMObjectclass directly.// Dog.h @interface Dog : RLMObject @property NSString *name; @property BOOL adopted; @end // Dog.m @implementation Dog @end //none neededSupported property types
NSStringNSInteger,int,long,float, anddoubleBOOLorboolNSDateNSDataNSNumber<X>, whereXis one ofRLMInt,RLMFloat,RLMDoubleorRLMBool, for optional number propertiesRLMObjectsubclasses, to model many-to-one relationships.RLMArray<X>, whereXis anRLMObjectsubclass, to model many-to-many relationships.
Querying
You can initiate queries directly via the class methods:
allObjects,objectsWhere:, andobjectsWithPredicate:. These methods allow you to easily query a custom subclass for instances of that class in the default Realm.To search in a Realm other than the default Realm, use the
allObjectsInRealm:,objectsInRealm:where:, andobjectsInRealm:withPredicate:class methods.See
RLMRealmRelationships
See our Realm Swift Documentation for more details.
Key-Value Observing
All
RLMObjectproperties (including properties you create in subclasses) are Key-Value Observing compliant, except forrealmandobjectSchema.Keep the following tips in mind when observing Realm objects:
- Unlike
NSMutableArrayproperties,RLMArrayproperties do not require using the proxy object returned from-mutableArrayValueForKey:, or defining KVC mutation methods on the containing class. You can simply call methods on theRLMArraydirectly; any changes will be automatically observed by the containing object. - Unmanaged
RLMObjectinstances cannot be added to a Realm while they have any observed properties. - Modifying managed
RLMObjects within-observeValueForKeyPath:ofObject:change:context:is not recommended. Properties may change even when the Realm is not in a write transaction (for example, when-[RLMRealm refresh]is called after changes are made on a different thread), and notifications sent prior to the change being applied (whenNSKeyValueObservingOptionPrioris used) may be sent at times when you cannot begin a write transaction.
Declaration
Objective-C
@interface RLMObject : RLMObjectBase <RLMThreadConfined>Swift
@_nonSendable(_assumed) class RLMObject : RLMObjectBase, RLMThreadConfined -
Declaration
Objective-C
@interface RLMPropertyChange : NSObjectSwift
@_nonSendable(_assumed) class RLMPropertyChange : NSObject -
A 12-byte (probably) unique object identifier.
ObjectIds are similar to a GUID or a UUID, and can be used to uniquely identify objects without a centralized ID generator. An ObjectID consists of:
- A 4 byte timestamp measuring the creation time of the ObjectId in seconds since the Unix epoch.
- A 5 byte random value
- A 3 byte counter, initialized to a random value.
ObjectIds are intended to be fast to generate. Sorting by an ObjectId field will typically result in the objects being sorted in creation order.
See moreDeclaration
Objective-C
@interface RLMObjectId : NSObject <NSCopying>Swift
@_nonSendable(_assumed) class RLMObjectId : NSObject, NSCopying, @unchecked Sendable -
This class represents Realm model object schemas.
When using Realm,
RLMObjectSchemainstances allow performing migrations and introspecting the database’s schema.Object schemas map to tables in the core database.
See moreDeclaration
Objective-C
@interface RLMObjectSchema : NSObject <NSCopying>Swift
@_nonSendable(_assumed) class RLMObjectSchema : NSObject, NSCopying, @unchecked Sendable -
RLMPropertyinstances represent properties managed by a Realm in the context of an object schema. Such properties may be persisted to a Realm file or computed from other data from the Realm.When using Realm,
RLMPropertyinstances allow performing migrations and introspecting the database’s schema.These property instances map to columns in the core database.
See moreDeclaration
Objective-C
@interface RLMProperty : NSObjectSwift
@_nonSendable(_assumed) class RLMProperty : NSObject, @unchecked Sendable -
An
See moreRLMPropertyDescriptorinstance represents a specific property on a given class.Declaration
Objective-C
@interface RLMPropertyDescriptor : NSObjectSwift
@_nonSendable(_assumed) class RLMPropertyDescriptor : NSObject, @unchecked Sendable -
Base provider client interface.
See moreDeclaration
Objective-C
@interface RLMProviderClient : NSObjectSwift
@_nonSendable(_assumed) class RLMProviderClient : NSObject, @unchecked Sendable -
A client which can be used to register devices with the server to receive push notificatons
See moreDeclaration
Objective-C
@interface RLMPushClient : NSObjectSwift
@_nonSendable(_assumed) class RLMPushClient : NSObject, @unchecked Sendable -
An
RLMRealminstance (also referred to as “a Realm”) represents a Realm database.Realms can either be stored on disk (see
+[RLMRealm realmWithURL:]) or in memory (seeRLMRealmConfiguration).RLMRealminstances are cached internally, and constructing equivalentRLMRealmobjects (for example, by using the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the sameRLMRealmobject.If you specifically want to ensure an
RLMRealminstance is destroyed (for example, if you wish to open a Realm, check some property, and then possibly delete the Realm file and re-open it), place the code which uses the Realm within an@autoreleasepool {}and ensure you have no other strong references to it.See moreWarning
Non-frozenRLMRealminstances are thread-confined and cannot be shared across threads or dispatch queues. Trying to do so will cause an exception to be thrown. You must call this method on each thread you want to interact with the Realm on. For dispatch queues, this means that you must call it in each block which is dispatched, as a queue is not guaranteed to run all of its blocks on the same thread.Declaration
Objective-C
@interface RLMRealm : NSObjectSwift
@_nonSendable(_assumed) class RLMRealm : NSObject -
A token which is returned from methods which subscribe to changes to a Realm.
Change subscriptions in Realm return an
See moreRLMNotificationTokeninstance, which can be used to unsubscribe from the changes. You must store a strong reference to the token for as long as you want to continue to receive notifications. When you wish to stop, call the-invalidatemethod. Notifications are also stopped if the token is deallocated.Declaration
Objective-C
@interface RLMNotificationToken : NSObjectSwift
@_nonSendable(_assumed) class RLMNotificationToken : NSObject, @unchecked Sendable -
An
RLMRealmConfigurationinstance describes the different options used to create an instance of a Realm.RLMRealmConfigurationinstances are just plainNSObjects. UnlikeRLMRealms andRLMObjects, they can be freely shared between threads as long as you do not mutate them.Creating configuration objects for class subsets (by setting the
See moreobjectClassesproperty) can be expensive. Because of this, you will normally want to cache and reuse a single configuration object for each distinct configuration rather than creating a new object each time you open a Realm.Declaration
Objective-C
@interface RLMRealmConfiguration : NSObject <NSCopying>Swift
@_nonSendable(_assumed) class RLMRealmConfiguration : NSObject, NSCopying -
RLMResultsis an auto-updating container type in Realm returned from object queries. It represents the results of the query in the form of a collection of objects.RLMResultscan be queried using the same predicates asRLMObjectandRLMArray, and you can chain queries to further filter results.RLMResultsalways reflect the current state of the Realm on the current thread, including during write transactions on the current thread. The one exception to this is when usingfor...infast enumeration, which will always enumerate over the objects which matched the query when the enumeration is begun, even if some of them are deleted or modified to be excluded by the filter during the enumeration.RLMResultsare lazily evaluated the first time they are accessed; they only run queries when the result of the query is requested. This means that chaining several temporaryRLMResultsto sort and filter your data does not perform any extra work processing the intermediate state.Once the results have been evaluated or a notification block has been added, the results are eagerly kept up-to-date, with the work done to keep them up-to-date done on a background thread whenever possible.
See moreRLMResultscannot be directly instantiated.Declaration
Objective-C
@interface RLMResults<RLMObjectType> : NSObject <RLMCollection, NSFastEnumeration>Swift
@_nonSendable(_assumed) class RLMResults<RLMObjectType> : NSObject, RLMCollection, NSFastEnumeration where RLMObjectType : AnyObject -
RLMLinkingObjectsis an auto-updating container type. It represents a collection of objects that link to its parent object.For more information, please see the “Inverse Relationships” section in the documentation.
Declaration
Objective-C
@interface RLMLinkingObjects<RLMObjectType : RLMObject *> : RLMResultsSwift
@_nonSendable(_assumed) class RLMLinkingObjects<RLMObjectType> : RLMResults<AnyObject> where RLMObjectType : RLMObject -
RLMSchemainstances represent collections of model object schemas managed by a Realm.When using Realm,
RLMSchemainstances allow performing migrations and introspecting the database’s schema.Schemas map to collections of tables in the core database.
See moreDeclaration
Objective-C
@interface RLMSchema : NSObject <NSCopying>Swift
@_nonSendable(_assumed) class RLMSchema : NSObject, NSCopying, @unchecked Sendable -
A
RLMSectionedResultsChangeobject encapsulates information about changes to sectioned results that are reported by Realm notifications.RLMSectionedResultsChangeis passed to the notification blocks registered with-addNotificationBlockonRLMSectionedResults, and reports what sections and rows in the collection changed since the last time the notification block was called.A complete example of updating a
UITableViewnamedtv:[tv beginUpdates]; [tv deleteRowsAtIndexPaths:changes.deletions withRowAnimation:UITableViewRowAnimationAutomatic]; [tv insertRowsAtIndexPaths:changes.insertions withRowAnimation:UITableViewRowAnimationAutomatic]; [tv reloadRowsAtIndexPaths:changes.modifications withRowAnimation:UITableViewRowAnimationAutomatic]; [tv insertSections:changes.sectionsToInsert withRowAnimation:UITableViewRowAnimationAutomatic]; [tv deleteSections:changes.sectionsToRemove withRowAnimation:UITableViewRowAnimationAutomatic]; [tv endUpdates];All of the arrays in an
See moreRLMSectionedResultsChangeare always sorted in ascending order.Declaration
Objective-C
@interface RLMSectionedResultsChange : NSObjectSwift
@_nonSendable(_assumed) class RLMSectionedResultsChange : NSObject -
An RLMSection contains the objects which belong to a specified section key.
See moreDeclaration
Objective-C
@interface RLMSection<RLMKeyType : id <RLMValue>, RLMObjectType> : NSObject <RLMSectionedResult>Swift
@_nonSendable(_assumed) class RLMSection<RLMKeyType, RLMObjectType> : NSObject, RLMSectionedResult where RLMKeyType : RLMValue, RLMObjectType : AnyObject -
A lazily evaluated collection that holds elements in sections determined by a section key.
See moreDeclaration
Objective-C
@interface RLMSectionedResults<RLMKeyType : id <RLMValue>, RLMObjectType : id <RLMValue>> : NSObject <RLMSectionedResult>Swift
@_nonSendable(_assumed) class RLMSectionedResults<RLMKeyType, RLMObjectType> : NSObject, RLMSectionedResult where RLMKeyType : RLMValue, RLMObjectType : RLMValue -
A collection datatype used for storing distinct objects.
See moreNote
RLMSetsupports storing primitive andRLMObjecttypes.RLMSetdoes not support storing Embedded Realm Objects.Declaration
Objective-C
@interface RLMSet<RLMObjectType> : NSObject <RLMCollection>Swift
@_nonSendable(_assumed) class RLMSet<RLMObjectType> : NSObject, RLMCollection where RLMObjectType : AnyObject -
A configuration object representing configuration state for a Realm which is intended to sync with a Realm Object Server.
See moreDeclaration
Objective-C
@interface RLMSyncConfiguration : NSObjectSwift
@_nonSendable(_assumed) class RLMSyncConfiguration : NSObject -
A manager which serves as a central point for sync-related configuration.
See moreDeclaration
Objective-C
@interface RLMSyncManager : NSObjectSwift
@_nonSendable(_assumed) class RLMSyncManager : NSObject, @unchecked Sendable -
Options for configuring timeouts and intervals in the sync client.
See moreDeclaration
Objective-C
@interface RLMSyncTimeoutOptions : NSObjectSwift
@_nonSendable(_assumed) class RLMSyncTimeoutOptions : NSObject -
A token object corresponding to a progress notification block on a session object.
To stop notifications manually, call
-invalidateon it. Notifications should be stopped before the token goes out of scope or is destroyed.Declaration
Objective-C
@interface RLMProgressNotificationToken : RLMNotificationTokenSwift
@_nonSendable(_assumed) class RLMProgressNotificationToken : RLMNotificationToken, @unchecked Sendable -
An object encapsulating an Atlas App Services “session”. Sessions represent the communication between the client (and a local Realm file on disk), and the server (and a remote Realm with a given partition value stored on Atlas App Services).
Sessions are always created by the SDK and vended out through various APIs. The lifespans of sessions associated with Realms are managed automatically. Session objects can be accessed from any thread.
See moreDeclaration
Objective-C
@interface RLMSyncSession : NSObjectSwift
@_nonSendable(_assumed) class RLMSyncSession : NSObject, @unchecked Sendable
-
An opaque token returned as part of certain errors. It can be passed into certain APIs to perform certain actions.
See
RLMSyncErrorClientResetError,RLMSyncErrorPermissionDeniedErrorDeclaration
Objective-C
@interface RLMSyncErrorActionToken : NSObjectSwift
@_nonSendable(_assumed) class RLMSyncErrorActionToken : NSObject, @unchecked Sendable
-
See moreRLMSyncSubscriptionis used to define a Flexible Sync subscription obtained from querying a subscription set, which can be used to read or remove/update a committed subscription.Declaration
Objective-C
@interface RLMSyncSubscription : NSObjectSwift
@_nonSendable(_assumed) class RLMSyncSubscription : NSObject -
See moreRLMSyncSubscriptionSetis a collection ofRLMSyncSubscriptions. This is the entry point for adding and removingRLMSyncSubscriptions.Declaration
Objective-C
@interface RLMSyncSubscriptionSet : NSObject <NSFastEnumeration>Swift
@_nonSendable(_assumed) class RLMSyncSubscriptionSet : NSObject, NSFastEnumeration -
An object intended to be passed between threads containing a thread-safe reference to its thread-confined object.
To resolve a thread-safe reference on a target Realm on a different thread, pass to
-[RLMRealm resolveThreadSafeReference:].Warning
A
RLMThreadSafeReferenceobject must be resolved at most once. Failing to resolve aRLMThreadSafeReferencewill result in the source version of the Realm being pinned until the reference is deallocated.See moreNote
Prefer short-lived
RLMThreadSafeReferences as the data for the version of the source Realm will be retained until all references have been resolved or deallocated.Declaration
Objective-C
@interface RLMThreadSafeReference<__covariant Confined : id <RLMThreadConfined>> : NSObjectSwift
@_nonSendable(_assumed) class RLMThreadSafeReference<Confined> : NSObject, @unchecked Sendable where Confined : RLMThreadConfined -
The result of an
See moreupdateOneorupdateManyoperation aRLMMongoCollection.Declaration
Objective-C
@interface RLMUpdateResult : NSObjectSwift
@_nonSendable(_assumed) class RLMUpdateResult : NSObject, @unchecked Sendable -
A
RLMUserinstance represents a single Realm App user account.A user may have one or more credentials associated with it. These credentials uniquely identify the user to the authentication provider, and are used to sign into an Atlas App Services user account.
Note that user objects are only vended out via SDK APIs, and cannot be directly initialized. User objects can be accessed from any thread.
See moreDeclaration
Objective-C
@interface RLMUser : NSObjectSwift
@_nonSendable(_assumed) class RLMUser : NSObject, @unchecked Sendable
-
An identity of a user. A user can have multiple identities, usually associated with multiple providers. Note this is different from a user’s unique identifier string. @seeAlso
See moreRLMUser.identifierDeclaration
Objective-C
@interface RLMUserIdentity : NSObjectSwift
@_nonSendable(_assumed) class RLMUserIdentity : NSObject, @unchecked Sendable -
A profile for a given User.
See moreDeclaration
Objective-C
@interface RLMUserProfile : NSObjectSwift
@_nonSendable(_assumed) class RLMUserProfile : NSObject, @unchecked Sendable -
UserAPIKey model for APIKeys recevied from the server.
See moreDeclaration
Objective-C
@interface RLMUserAPIKey : NSObjectSwift
@_nonSendable(_assumed) class RLMUserAPIKey : NSObject, @unchecked Sendable
View on GitHub
Install in Dash
Classes Reference