Skip to content

Instantly share code, notes, and snippets.

@jpsim
Created January 13, 2015 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpsim/e438fe9833e8711a0005 to your computer and use it in GitHub Desktop.
Save jpsim/e438fe9833e8711a0005 to your computer and use it in GitHub Desktop.
SourceKitten 0.3.0 Realm Objective-C Docs
This file has been truncated, but you can view the full file.
<?xml version="1.0"?>
<sourcekitten>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="37">
<Name>RLMArray</Name>
<USR>c:objc(cs)RLMArray</USR>
<Declaration>@interface RLMArray : NSObject &lt;RLMCollection, NSFastEnumeration&gt;
@end</Declaration>
<Abstract>
<Para>RLMArray is the container type in Realm used to define to-many relationships.</Para>
</Abstract>
<Discussion>
<Para>Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. This is referred to in these docs as the “type” of the array.</Para>
<Para>RLMArrays can be queried with the same predicates as RLMObject and RLMResults.</Para>
<Para>RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Discussion>
</Other>
<Other column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="47">
<Name>count</Name>
<USR>c:objc(cs)RLMArray(py)count</USR>
<Declaration>@property(readonly, assign, nonatomic) NSUInteger count;</Declaration>
<Abstract>
<Para>Number of objects in the array.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="52">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMArray(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMArray.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="57">
<Name>realm</Name>
<USR>c:objc(cs)RLMArray(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this array is persisted. Returns nil for standalone arrays.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="73">
<Name>objectAtIndex:</Name>
<USR>c:objc(cs)RLMArray(im)objectAtIndex:</USR>
<Declaration>- (id)objectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Returns the object at the index specified.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The index to look up.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="82">
<Name>firstObject</Name>
<USR>c:objc(cs)RLMArray(im)firstObject</USR>
<Declaration>- (id)firstObject;</Declaration>
<Abstract>
<Para>Returns the first object in the array.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="91">
<Name>lastObject</Name>
<USR>c:objc(cs)RLMArray(im)lastObject</USR>
<Declaration>- (id)lastObject;</Declaration>
<Abstract>
<Para>Returns the last object in the array.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="109">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMArray(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds an object to the end of the array.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="119">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMArray(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)objects;</Declaration>
<Abstract>
<Para>Adds an array of objects at the end of the array.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>objects</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects of the same class as this RLMArray.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="131">
<Name>insertObject:atIndex:</Name>
<USR>c:objc(cs)RLMArray(im)insertObject:atIndex:</USR>
<Declaration>- (void)insertObject:(RLMObject *)anObject atIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Inserts an object at the given index.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>anObject</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector). </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>index</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index at which the object is inserted.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="142">
<Name>removeObjectAtIndex:</Name>
<USR>c:objc(cs)RLMArray(im)removeObjectAtIndex:</USR>
<Declaration>- (void)removeObjectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Removes an object at a given index.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index identifying the object to be removed.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="149">
<Name>removeLastObject</Name>
<USR>c:objc(cs)RLMArray(im)removeLastObject</USR>
<Declaration>- (void)removeLastObject;</Declaration>
<Abstract>
<Para>Removes the last object in an RLMArray.</Para>
</Abstract>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="156">
<Name>removeAllObjects</Name>
<USR>c:objc(cs)RLMArray(im)removeAllObjects</USR>
<Declaration>- (void)removeAllObjects;</Declaration>
<Abstract>
<Para>Removes all objects from an RLMArray.</Para>
</Abstract>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="168">
<Name>replaceObjectAtIndex:withObject:</Name>
<USR>c:objc(cs)RLMArray(im)replaceObjectAtIndex:withObject:</USR>
<Declaration>- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(RLMObject *)anObject;</Declaration>
<Abstract>
<Para>Replaces an object at the given index with a new object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index of the object to be replaced. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>anObject</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="185">
<Name>indexOfObject:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObject:</USR>
<Declaration>- (NSUInteger)indexOfObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Querying an Array</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Gets the index of an object.</Para>
<Para>Returns NSNotFound if the object is not found in this RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="194">
<Name>indexOfObjectWhere:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObjectWhere:</USR>
<Declaration>- (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="203">
<Name>indexOfObjectWithPredicate:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObjectWithPredicate:</USR>
<Declaration>- (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="212">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMArray(im)objectsWhere:</USR>
<Declaration>- (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMArray.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="221">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMArray(im)objectsWithPredicate:</USR>
<Declaration>- (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMArray.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="231">
<Name>sortedResultsUsingProperty:ascending:</Name>
<USR>c:objc(cs)RLMArray(im)sortedResultsUsingProperty:ascending:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingProperty:(NSString *)property
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Get a sorted RLMResults from an RLMArray</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name to sort by. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>ascending</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The direction to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="240">
<Name>sortedResultsUsingDescriptors:</Name>
<USR>c:objc(cs)RLMArray(im)sortedResultsUsingDescriptors:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingDescriptors:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Get a sorted RLMResults from an RLMArray</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>properties</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array of `RLMSortDescriptor`s to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified properties.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="258">
<Name>init</Name>
<USR>c:objc(cs)RLMArray(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>-[RLMArray init] is not available because RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMArrays cannot be created directly</Unavailable>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isClassMethod="1" line="264">
<Name>new</Name>
<USR>c:objc(cs)RLMArray(cm)new</USR>
<Declaration>+ (instancetype) new;</Declaration>
<Abstract>
<Para>+[RLMArray new] is not available because RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMArrays cannot be created directly</Unavailable>
</Function>
<Function column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="47">
<Name>count</Name>
<USR>c:objc(cs)RLMArray(py)count</USR>
<Declaration>- (NSUInteger)count;</Declaration>
<Abstract>
<Para>Number of objects in the array.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="52">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMArray(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMArray.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="57">
<Name>realm</Name>
<USR>c:objc(cs)RLMArray(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this array is persisted. Returns nil for standalone arrays.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="274">
<Name>RLMSortDescriptor</Name>
<USR>c:objc(cs)RLMSortDescriptor</USR>
<Declaration>@interface RLMSortDescriptor : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMSortDescriptor stores a property name and a sort order for use with `sortedResultsUsingDescriptors:`. It is similar to NSSortDescriptor, but supports only the subset of functionality which can be efficiently run by the query engine. RLMSortDescriptor instances are immutable.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="279">
<Name>property</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)property</USR>
<Declaration>@property(readonly, nonatomic) NSString *property;</Declaration>
<Abstract>
<Para>The name of the property which this sort descriptor orders results by.</Para>
</Abstract>
</Other>
<Other column="38" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="284">
<Name>ascending</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)ascending</USR>
<Declaration>@property(readonly, nonatomic) BOOL ascending;</Declaration>
<Abstract>
<Para>Whether this descriptor sorts in ascending or descending order.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isClassMethod="1" line="289">
<Name>sortDescriptorWithProperty:ascending:</Name>
<USR>c:objc(cs)RLMSortDescriptor(cm)sortDescriptorWithProperty:ascending:</USR>
<Declaration>+ (instancetype)sortDescriptorWithProperty:(NSString *)propertyName
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Returns a new sort descriptor for the given property name and order.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="294">
<Name>reversedSortDescriptor</Name>
<USR>c:objc(cs)RLMSortDescriptor(im)reversedSortDescriptor</USR>
<Declaration>- (instancetype)reversedSortDescriptor;</Declaration>
<Abstract>
<Para>Returns a copy of the receiver with the sort order reversed.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="279">
<Name>property</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)property</USR>
<Declaration>- (NSString *)property;</Declaration>
<Abstract>
<Para>The name of the property which this sort descriptor orders results by.</Para>
</Abstract>
</Function>
<Function column="38" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="284">
<Name>ascending</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)ascending</USR>
<Declaration>- (BOOL)ascending;</Declaration>
<Abstract>
<Para>Whether this descriptor sorts in ascending or descending order.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="299">
<Name>RLMArray</Name>
<USR>c:objc(cs)RLMArray</USR>
<Declaration>@interface RLMArray (Private)
@end</Declaration>
<Abstract>
<Para>RLMArray is the container type in Realm used to define to-many relationships.</Para>
</Abstract>
<Discussion>
<Para>Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. This is referred to in these docs as the “type” of the array.</Para>
<Para>RLMArrays can be queried with the same predicates as RLMObject and RLMResults.</Para>
<Para>RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Discussion>
</Other>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="37">
<Name>RLMMigration</Name>
<USR>c:objc(cs)RLMMigration</USR>
<Declaration>@interface RLMMigration : NSObject
@end</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Realm Migrations</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>RLMMigration is the object passed into a user defined RLMMigrationBlock when updating the version of an RLMRealm instance.</Para>
<Para>This object provides access to the RLMSchema current to this migration.</Para>
</Discussion>
</Other>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="43">
<Name>oldSchema</Name>
<USR>c:objc(cs)RLMMigration(py)oldSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *oldSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm before the migration is applied.</Para>
</Abstract>
</Other>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="49">
<Name>newSchema</Name>
<USR>c:objc(cs)RLMMigration(py)newSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *newSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm after applying a migration.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="66">
<Name>enumerateObjects:block:</Name>
<USR>c:objc(cs)RLMMigration(im)enumerateObjects:block:</USR>
<Declaration>- (void)enumerateObjects:(NSString *)className
block:(__strong RLMObjectMigrationBlock)block;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject class to enumerate.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Altering Objects during a Migration</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Enumerates objects of a given type in this Realm, providing both the old and new versions of each object. Objects properties can be accessed using keyed subscripting.</Para>
<Para kind="warning">All objects returned are of a type specific to the current migration and should not be casted to className. Instead you should access them as RLMObjects and use keyed subscripting to access properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="79">
<Name>createObject:withObject:</Name>
<USR>c:objc(cs)RLMMigration(im)createObject:withObject:</USR>
<Declaration>- (RLMObject *)createObject:(NSString *)className withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject of type `className` in the Realm being migrated.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject class to create. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The value used to populate the created object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="86">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMMigration(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from a Realm during a migration. This can be called within `enumerateObjects:block:`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from the Realm being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="43">
<Name>oldSchema</Name>
<USR>c:objc(cs)RLMMigration(py)oldSchema</USR>
<Declaration>- (RLMSchema *)oldSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm before the migration is applied.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="37">
<Name>RLMMigration</Name>
<USR>c:objc(cs)RLMMigration</USR>
<Declaration>@interface RLMMigration : NSObject
@end</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Realm Migrations</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>RLMMigration is the object passed into a user defined RLMMigrationBlock when updating the version of an RLMRealm instance.</Para>
<Para>This object provides access to the RLMSchema current to this migration.</Para>
</Discussion>
</Other>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="43">
<Name>oldSchema</Name>
<USR>c:objc(cs)RLMMigration(py)oldSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *oldSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm before the migration is applied.</Para>
</Abstract>
</Other>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="49">
<Name>newSchema</Name>
<USR>c:objc(cs)RLMMigration(py)newSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *newSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm after applying a migration.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="66">
<Name>enumerateObjects:block:</Name>
<USR>c:objc(cs)RLMMigration(im)enumerateObjects:block:</USR>
<Declaration>- (void)enumerateObjects:(NSString *)className
block:(__strong RLMObjectMigrationBlock)block;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject class to enumerate.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Altering Objects during a Migration</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Enumerates objects of a given type in this Realm, providing both the old and new versions of each object. Objects properties can be accessed using keyed subscripting.</Para>
<Para kind="warning">All objects returned are of a type specific to the current migration and should not be casted to className. Instead you should access them as RLMObjects and use keyed subscripting to access properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="79">
<Name>createObject:withObject:</Name>
<USR>c:objc(cs)RLMMigration(im)createObject:withObject:</USR>
<Declaration>- (RLMObject *)createObject:(NSString *)className withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject of type `className` in the Realm being migrated.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject class to create. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The value used to populate the created object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="86">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMMigration(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from a Realm during a migration. This can be called within `enumerateObjects:block:`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from the Realm being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="43">
<Name>oldSchema</Name>
<USR>c:objc(cs)RLMMigration(py)oldSchema</USR>
<Declaration>- (RLMSchema *)oldSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm before the migration is applied.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="46">
<Name>RLMRealm</Name>
<USR>c:objc(cs)RLMRealm</USR>
<Declaration>@interface RLMRealm : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMRealm instance (also referred to as &quot;a realm&quot;) represents a Realm database.</Para>
</Abstract>
<Discussion>
<Para>Realms can either be stored on disk (see +[RLMRealm realmWithPath:]) or in memory (see +[RLMRealm inMemoryRealmWithIdentifier:]).</Para>
<Para>RLMRealm instances are cached internally, and constructing equivalent RLMRealm objects (with the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the same RLMRealm object. If you specifically want to ensure a RLMRealm object 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 ` {}` and ensure you have no other strong references to it.</Para>
<Para kind="warning">RLMRealm instances are not thread safe and can not be shared across threads or dispatch queues. 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 on a consistent thread.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="62">
<Name>defaultRealm</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealm</USR>
<Declaration>+ (instancetype)defaultRealm;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>The default `RLMRealm` instance for the current thread.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Creating &amp; Initializing a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Obtains an instance of the default Realm.</Para>
<Para>The default Realm is used by the `RLMObject` class methods which do not take a `RLMRealm` parameter, but is otherwise not special. The default Realm is persisted as default.realm under the Documents directory of your Application on iOS, and in your application's Application Support directory on OS X.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="71">
<Name>realmWithPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted at a specific file path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="94">
<Name>realmWithPath:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance with persistence to a specific file path with options.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Like `realmWithPath:`, but with the ability to open read-only realms and get errors as an `NSError` inout parameter rather than exceptions.</Para>
<Para kind="warning">Read-only Realms do not support changes made to the file while the `RLMRealm` exists. This means that you cannot open a Realm as both read-only and read-write at the same time. Read-only Realms should normally only be used on files which cannot be opened in read-write mode, and not just for enforcing correctness in code that should not need to write to the Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="116">
<Name>realmWithPath:encryptionKey:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:encryptionKey:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
encryptionKey:(NSData *)key
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted to an encrypted file.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte key to use to encrypt the data. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>3</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An encrypted `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>The on-disk storage for encrypted Realms are encrypted using AES256+HMAC-SHA2, but otherwise they behave like normal persisted Realms.</Para>
<Para>Encrypted Realms currently cannot be opened while lldb is attached to the process since lldb cannot forward mach exceptions to the process being debugged. Attempting to open an encrypted Realm with lldb attached will result in an EXC_BAD_ACCESS.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="136">
<Name>setEncryptionKey:forRealmsAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setEncryptionKey:forRealmsAtPath:</USR>
<Declaration>+ (void)setEncryptionKey:(NSData *)key forRealmsAtPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Set the encryption key to use when opening Realms at a certain path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>key</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to use, or `nil` to unset. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>path</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Realm path to set the encryption key for.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This can be used as an alternative to explicitly passing the key to `encryptedRealmWithPath:key:readOnly:error:` each time a Realm instance is needed. The encryption key will be used any time a Realm is opened with `realmWithPath:` or `defaultRealm`.</Para>
<Para>If you do not want Realm to hold on to your encryption keys any longer than needed, then use `encryptedRealmWithPath:key:readOnly:error:` rather than this method.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="155">
<Name>inMemoryRealmWithIdentifier:</Name>
<USR>c:objc(cs)RLMRealm(cm)inMemoryRealmWithIdentifier:</USR>
<Declaration>+ (instancetype)inMemoryRealmWithIdentifier:(NSString *)identifier;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance for an un-persisted in-memory Realm. The identifier used to create this instance can be used to access the same in-memory Realm from multiple threads.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>identifier</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A string used to identify a particular in-memory Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Because in-memory Realms are not persisted, you must be sure to hold on to a reference to the `RLMRealm` object returned from this for as long as you want the data to last. Realm's internal cache of `RLMRealm`s will not keep the in-memory Realm alive across cycles of the run loop, so without a strong reference to the `RLMRealm` a new Realm will be created each time. Note that `RLMObject`s, `RLMArray`s, and `RLMResults` that refer to objects persisted in a Realm have a strong reference to the relevant `RLMRealm`, as do `RLMNotifcationToken`s.</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>@property(readonly, nonatomic) NSString *path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Other>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>- (NSString *)path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Function>
<Other column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>@property(readonly, getter=isReadOnly, nonatomic) BOOL readOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Other>
<Function column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>- (BOOL)isReadOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Function>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Other>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>- (RLMSchema *)schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="187">
<Name>defaultRealmPath</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealmPath</USR>
<Declaration>+ (NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>Location of the default Realm.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Default Realm Path</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Returns the location of the default Realm as a string.</Para>
<Para>`~/Application Support/{bundle ID}/default.realm` on OS X.</Para>
<Para>`default.realm` in your application's documents directory on iOS.</Para>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="196">
<Name>setDefaultRealmPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setDefaultRealmPath:</USR>
<Declaration>+ (void)setDefaultRealmPath:(NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>Set the default Realm path to a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>defaultRealmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path to use for the default Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="227">
<Name>addNotificationBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)addNotificationBlock:</USR>
<Declaration>- (RLMNotificationToken *)addNotificationBlock:
(__strong RLMNotificationBlock)block;</Declaration>
<Abstract>
<Para>Add a notification handler for changes in this RLMRealm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>block</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A block which is called to process RLMRealm notifications.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>A token object which can later be passed to `-removeNotification:` to remove this notification.</Para>
</ResultDiscussion>
<Discussion>
<Para>The block has the following definition:</Para>
<Para>typedef void(^RLMNotificationBlock)(NSString *notification, RLMRealm *realm);</Para>
<Para>It receives the following parameters:</Para>
<Para>- `NSString` \***notification**: The name of the incoming notification. See RLMRealmNotification for information on what notifications are sent. - `RLMRealm` \***realm**: The realm for which this notification occurred</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="236">
<Name>removeNotification:</Name>
<USR>c:objc(cs)RLMRealm(im)removeNotification:</USR>
<Declaration>- (void)removeNotification:(RLMNotificationToken *)notificationToken;</Declaration>
<Abstract>
<Para>Remove a previously registered notification handler using the token returned from `-addNotificationBlock:`</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>notificationToken</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The token returned from `-addNotificationBlock:` corresponding to the notification block to remove.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="264">
<Name>beginWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)beginWriteTransaction</USR>
<Declaration>- (void)beginWriteTransaction;</Declaration>
<Abstract>
<Para>Begins a write transaction in an `RLMRealm`.</Para>
</Abstract>
<Discussion>
<Para>Only one write transaction can be open at a time. Write transactions cannot be nested, and trying to begin a write transaction on a `RLMRealm` which is already in a write transaction with throw an exception. Calls to `beginWriteTransaction` from `RLMRealm` instances in other threads will block until the current write transaction completes.</Para>
<Para>Before beginning the write transaction, `beginWriteTransaction` updates the `RLMRealm` to the latest Realm version, as if refresh was called, and generates notifications if applicable. This has no effect if the `RLMRealm` was already up to date.</Para>
<Para>It is rarely a good idea to have write transactions span multiple cycles of the run loop, but if you do wish to do so you will need to ensure that the `RLMRealm` in the write transaction is kept alive until the write transaction is committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="273">
<Name>commitWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)commitWriteTransaction</USR>
<Declaration>- (void)commitWriteTransaction;</Declaration>
<Abstract>
<Para>Commits all writes operations in the current write transaction.</Para>
</Abstract>
<Discussion>
<Para>After this is called the `RLMRealm` reverts back to being read-only.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="300">
<Name>cancelWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)cancelWriteTransaction</USR>
<Declaration>- (void)cancelWriteTransaction;</Declaration>
<Abstract>
<Para>Revert all writes made in the current write transaction and end the transaction.</Para>
</Abstract>
<Discussion>
<Para>This rolls back all objects in the Realm to the state they were in at the beginning of the write transaction, and then ends the transaction.</Para>
<Para>This restores the data for deleted objects, but does not re-validated deleted accessor objects. Any `RLMObject`s which were added to the Realm will be invalidated rather than switching back to standalone objects. Given the following code:</Para>
<Para>ObjectType *oldObject = [[ObjectType objectsWhere:&quot;...&quot;] firstObject]; ObjectType *newObject = [[ObjectType alloc] init];</Para>
<Para>[realm beginWriteTransaction]; [realm addObject:newObject]; [realm deleteObject:oldObject]; [realm cancelWriteTransaction];</Para>
<Para>Both `oldObject` and `newObject` will return `YES` for `isInvalidated`, but re-running the query which provided `oldObject` will once again return the valid object.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="305">
<Name>transactionWithBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)transactionWithBlock:</USR>
<Declaration>- (void)transactionWithBlock:(void (^__strong)(void))block;</Declaration>
<Abstract>
<Para>Helper to perform a block within a transaction.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="312">
<Name>refresh</Name>
<USR>c:objc(cs)RLMRealm(im)refresh</USR>
<Declaration>- (BOOL)refresh;</Declaration>
<Abstract>
<Para>Update an `RLMRealm` and outstanding objects to point to the most recent data for this `RLMRealm`.</Para>
</Abstract>
<ResultDiscussion>
<Para>Whether the realm had any updates. Note that this may return YES even if no data has actually changed.</Para>
</ResultDiscussion>
</Function>
<Other column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>@property(assign, readwrite, nonatomic) BOOL autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Other>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (void)setAutorefresh:(BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="353">
<Name>writeCopyToPath:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write a compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="368">
<Name>writeCopyToPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:encryptionKey:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write an encrypted and compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to encrypt the new file with </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="390">
<Name>invalidate</Name>
<USR>c:objc(cs)RLMRealm(im)invalidate</USR>
<Declaration>- (void)invalidate;</Declaration>
<Abstract>
<Para>Invalidate all RLMObjects and RLMResults read from this Realm.</Para>
</Abstract>
<Discussion>
<Para>An RLMRealm holds a read lock on the version of the data accessed by it, so that changes made to the Realm on different threads do not modify or delete the data seen by this RLMRealm. Calling this method releases the read lock, allowing the space used on disk to be reused by later write transactions rather than growing the file. This method should be called before performing long blocking operations on a background thread on which you previously read data from the Realm which you no longer need.</Para>
<Para>All `RLMObject`, `RLMResults` and `RLMArray` instances obtained from this `RLMRealm` on the current thread are invalidated, and can not longer be used. The `RLMRealm` itself remains valid, and a new read transaction is implicitly begun the next time data is read from the Realm.</Para>
<Para>Calling this method multiple times in a row without reading any data from the Realm, or before ever reading any data from the Realm is a no-op. This method cannot be called on a read-only Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="414">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Adding and Removing Objects from a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Adds an object to be persisted it in this Realm.</Para>
<Para>Once added, this object can be retrieved using the `objectsWhere:` selectors on `RLMRealm` and on subclasses of `RLMObject`. When added, all linked (child) objects referenced by this object will also be added to the Realm if they are not already in it. If the object or any linked objects already belong to a different Realm an exception will be thrown. Use `-[RLMObject createInRealm:withObject]` to insert a copy of a persisted object into a different Realm.</Para>
<Para>The object to be added must be valid and cannot have been previously deleted from a Realm (i.e. `isInvalidated`) must be false.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="426">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)array;</Declaration>
<Abstract>
<Para>Adds objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addObject:` except for an array of objects.</Para>
<Para kind="see">addObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="439">
<Name>addOrUpdateObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObject:</USR>
<Declaration>- (void)addOrUpdateObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds or updates an object to be persisted it in this Realm. The object provided must have a designated primary key. If no objects exist in the RLMRealm instance with the same primary key value, the object is inserted. Otherwise, the existing object is updated with any changed values.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added or updated.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>As with `addObject:`, the object cannot already be persisted in a different Realm. Use `-[RLMObject createOrUpdateInRealm:withObject:]` to copy values to a different Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="450">
<Name>addOrUpdateObjectsFromArray:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObjectsFromArray:</USR>
<Declaration>- (void)addOrUpdateObjectsFromArray:(id)array;</Declaration>
<Abstract>
<Para>Adds or updates objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`NSArray`, `RLMArray`, or `RLMResults` of `RLMObject`s (or subclasses) to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addOrUpdateObject:` except for an array of objects.</Para>
<Para kind="see">addOrUpdateObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="457">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="464">
<Name>deleteObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObjects:</USR>
<Declaration>- (void)deleteObjects:(id)array;</Declaration>
<Abstract>
<Para>Delete an `NSArray`, `RLMArray`, or `RLMResults` of objects from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMArray`, `NSArray`, or `RLMResults` of `RLMObject`s to be deleted.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="469">
<Name>deleteAllObjects</Name>
<USR>c:objc(cs)RLMRealm(im)deleteAllObjects</USR>
<Declaration>- (void)deleteAllObjects;</Declaration>
<Abstract>
<Para>Deletes all objects in this Realm.</Para>
</Abstract>
</Function>
<Function column="16" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="486">
<Name>RLMMigrationBlock</Name>
<USR>c:RLMRealm.h@T@RLMMigrationBlock</USR>
<Declaration>typedef void (^RLMMigrationBlock)(RLMMigration *__strong, NSUInteger)</Declaration>
<Abstract>
<Para>Migration block used to migrate a Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>migration</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMMigration` object used to perform the migration. The migration object allows you to enumerate and alter any existing objects which require migration.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>oldSchemaVersion</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The schema version of the `RLMRealm` being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Schema version number for the `RLMRealm` after completing the migration. Must be greater than `oldSchemaVersion`.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="518">
<Name>setSchemaVersion:withMigrationBlock:</Name>
<USR>c:objc(cs)RLMRealm(cm)setSchemaVersion:withMigrationBlock:</USR>
<Declaration>+ (void)setSchemaVersion:(NSUInteger)version
withMigrationBlock:(__strong RLMMigrationBlock)block;</Declaration>
<Abstract>
<Para>Specify a schema version and an associated migration block which is applied when opening any Realm with and old schema version.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>version</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The current schema version. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>block</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The block which migrates the Realm to the current version. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>Before you can open an existing `RLMRealm` which has a different on-disk schema from the schema defined in your object interfaces you must provide a migration block which converts from the disk schema to your current object schema. At the minimum your migration block must initialize any properties which were added to existing objects without defaults and ensure uniqueness if a primary key property is added to an existing object.</Para>
<Para>You should call this method before accessing any `RLMRealm` instances which require migration. After registering your migration block Realm will call your block automatically as needed.</Para>
<Para kind="warning">Unsuccessful migrations will throw exceptions when the migration block is applied. This will happen in the following cases:</Para>
<Para>- The migration block was run and returns a schema version which is not higher than the previous schema version. - A new property without a default was added to an object and not initialized during the migration. You are required to either supply a default value or to manually populate added properties during a migration.</Para>
<Para kind="see">RLMMigration</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="530">
<Name>schemaVersionAtPath:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for a Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="543">
<Name>schemaVersionAtPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:encryptionKey:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for an encrypted Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="558">
<Name>migrateRealmAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath;</Declaration>
<Abstract>
<Para>Performs the registered migration block on a Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>This method is called automatically when opening a Realm for the first time and does not need to be called explicitly. You can choose to call this method to control exactly when and how migrations are performed.</Para>
<Para kind="see">RLMMigration </Para>
<Para kind="see">setSchemaVersion:withMigrationBlock:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="569">
<Name>migrateRealmAtPath:encryptionKey:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:encryptionKey:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key;</Declaration>
<Abstract>
<Para>Performs the registered migration block on an encrypted Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>As `migrateRealmAtPath:`, but for encrypted realms.</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration_Private.h" line="22">
<Name>RLMMigration</Name>
<USR>c:objc(cs)RLMMigration</USR>
<Declaration>@interface RLMMigration ()
@end</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Realm Migrations</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>RLMMigration is the object passed into a user defined RLMMigrationBlock when updating the version of an RLMRealm instance.</Para>
<Para>This object provides access to the RLMSchema current to this migration.</Para>
</Discussion>
</Other>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="30">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>@property(readonly, nonatomic) NSString *className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Other>
<Other column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>@property(readonly, nonatomic) RLMProperty *primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="56">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMProperty *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)propertyName;</Declaration>
<Abstract>
<Para>Retrieve an RLMProperty object by name.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property's name.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMProperty object or nil if there is no property with the given name.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="61">
<Name>isEqualToObjectSchema:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)isEqualToObjectSchema:</USR>
<Declaration>- (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>Returns YES if equal to objectSchema</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>- (NSArray *)properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>- (NSString *)className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Function>
<Function column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>- (RLMProperty *)primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="46">
<Name>RLMRealm</Name>
<USR>c:objc(cs)RLMRealm</USR>
<Declaration>@interface RLMRealm : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMRealm instance (also referred to as &quot;a realm&quot;) represents a Realm database.</Para>
</Abstract>
<Discussion>
<Para>Realms can either be stored on disk (see +[RLMRealm realmWithPath:]) or in memory (see +[RLMRealm inMemoryRealmWithIdentifier:]).</Para>
<Para>RLMRealm instances are cached internally, and constructing equivalent RLMRealm objects (with the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the same RLMRealm object. If you specifically want to ensure a RLMRealm object 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 ` {}` and ensure you have no other strong references to it.</Para>
<Para kind="warning">RLMRealm instances are not thread safe and can not be shared across threads or dispatch queues. 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 on a consistent thread.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="62">
<Name>defaultRealm</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealm</USR>
<Declaration>+ (instancetype)defaultRealm;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>The default `RLMRealm` instance for the current thread.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Creating &amp; Initializing a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Obtains an instance of the default Realm.</Para>
<Para>The default Realm is used by the `RLMObject` class methods which do not take a `RLMRealm` parameter, but is otherwise not special. The default Realm is persisted as default.realm under the Documents directory of your Application on iOS, and in your application's Application Support directory on OS X.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="71">
<Name>realmWithPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted at a specific file path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="94">
<Name>realmWithPath:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance with persistence to a specific file path with options.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Like `realmWithPath:`, but with the ability to open read-only realms and get errors as an `NSError` inout parameter rather than exceptions.</Para>
<Para kind="warning">Read-only Realms do not support changes made to the file while the `RLMRealm` exists. This means that you cannot open a Realm as both read-only and read-write at the same time. Read-only Realms should normally only be used on files which cannot be opened in read-write mode, and not just for enforcing correctness in code that should not need to write to the Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="116">
<Name>realmWithPath:encryptionKey:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:encryptionKey:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
encryptionKey:(NSData *)key
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted to an encrypted file.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte key to use to encrypt the data. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>3</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An encrypted `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>The on-disk storage for encrypted Realms are encrypted using AES256+HMAC-SHA2, but otherwise they behave like normal persisted Realms.</Para>
<Para>Encrypted Realms currently cannot be opened while lldb is attached to the process since lldb cannot forward mach exceptions to the process being debugged. Attempting to open an encrypted Realm with lldb attached will result in an EXC_BAD_ACCESS.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="136">
<Name>setEncryptionKey:forRealmsAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setEncryptionKey:forRealmsAtPath:</USR>
<Declaration>+ (void)setEncryptionKey:(NSData *)key forRealmsAtPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Set the encryption key to use when opening Realms at a certain path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>key</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to use, or `nil` to unset. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>path</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Realm path to set the encryption key for.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This can be used as an alternative to explicitly passing the key to `encryptedRealmWithPath:key:readOnly:error:` each time a Realm instance is needed. The encryption key will be used any time a Realm is opened with `realmWithPath:` or `defaultRealm`.</Para>
<Para>If you do not want Realm to hold on to your encryption keys any longer than needed, then use `encryptedRealmWithPath:key:readOnly:error:` rather than this method.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="155">
<Name>inMemoryRealmWithIdentifier:</Name>
<USR>c:objc(cs)RLMRealm(cm)inMemoryRealmWithIdentifier:</USR>
<Declaration>+ (instancetype)inMemoryRealmWithIdentifier:(NSString *)identifier;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance for an un-persisted in-memory Realm. The identifier used to create this instance can be used to access the same in-memory Realm from multiple threads.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>identifier</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A string used to identify a particular in-memory Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Because in-memory Realms are not persisted, you must be sure to hold on to a reference to the `RLMRealm` object returned from this for as long as you want the data to last. Realm's internal cache of `RLMRealm`s will not keep the in-memory Realm alive across cycles of the run loop, so without a strong reference to the `RLMRealm` a new Realm will be created each time. Note that `RLMObject`s, `RLMArray`s, and `RLMResults` that refer to objects persisted in a Realm have a strong reference to the relevant `RLMRealm`, as do `RLMNotifcationToken`s.</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>@property(readonly, nonatomic) NSString *path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Other>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>- (NSString *)path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Function>
<Other column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>@property(readonly, getter=isReadOnly, nonatomic) BOOL readOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Other>
<Function column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>- (BOOL)isReadOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Function>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Other>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>- (RLMSchema *)schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="187">
<Name>defaultRealmPath</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealmPath</USR>
<Declaration>+ (NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>Location of the default Realm.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Default Realm Path</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Returns the location of the default Realm as a string.</Para>
<Para>`~/Application Support/{bundle ID}/default.realm` on OS X.</Para>
<Para>`default.realm` in your application's documents directory on iOS.</Para>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="196">
<Name>setDefaultRealmPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setDefaultRealmPath:</USR>
<Declaration>+ (void)setDefaultRealmPath:(NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>Set the default Realm path to a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>defaultRealmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path to use for the default Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="227">
<Name>addNotificationBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)addNotificationBlock:</USR>
<Declaration>- (RLMNotificationToken *)addNotificationBlock:
(__strong RLMNotificationBlock)block;</Declaration>
<Abstract>
<Para>Add a notification handler for changes in this RLMRealm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>block</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A block which is called to process RLMRealm notifications.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>A token object which can later be passed to `-removeNotification:` to remove this notification.</Para>
</ResultDiscussion>
<Discussion>
<Para>The block has the following definition:</Para>
<Para>typedef void(^RLMNotificationBlock)(NSString *notification, RLMRealm *realm);</Para>
<Para>It receives the following parameters:</Para>
<Para>- `NSString` \***notification**: The name of the incoming notification. See RLMRealmNotification for information on what notifications are sent. - `RLMRealm` \***realm**: The realm for which this notification occurred</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="236">
<Name>removeNotification:</Name>
<USR>c:objc(cs)RLMRealm(im)removeNotification:</USR>
<Declaration>- (void)removeNotification:(RLMNotificationToken *)notificationToken;</Declaration>
<Abstract>
<Para>Remove a previously registered notification handler using the token returned from `-addNotificationBlock:`</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>notificationToken</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The token returned from `-addNotificationBlock:` corresponding to the notification block to remove.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="264">
<Name>beginWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)beginWriteTransaction</USR>
<Declaration>- (void)beginWriteTransaction;</Declaration>
<Abstract>
<Para>Begins a write transaction in an `RLMRealm`.</Para>
</Abstract>
<Discussion>
<Para>Only one write transaction can be open at a time. Write transactions cannot be nested, and trying to begin a write transaction on a `RLMRealm` which is already in a write transaction with throw an exception. Calls to `beginWriteTransaction` from `RLMRealm` instances in other threads will block until the current write transaction completes.</Para>
<Para>Before beginning the write transaction, `beginWriteTransaction` updates the `RLMRealm` to the latest Realm version, as if refresh was called, and generates notifications if applicable. This has no effect if the `RLMRealm` was already up to date.</Para>
<Para>It is rarely a good idea to have write transactions span multiple cycles of the run loop, but if you do wish to do so you will need to ensure that the `RLMRealm` in the write transaction is kept alive until the write transaction is committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="273">
<Name>commitWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)commitWriteTransaction</USR>
<Declaration>- (void)commitWriteTransaction;</Declaration>
<Abstract>
<Para>Commits all writes operations in the current write transaction.</Para>
</Abstract>
<Discussion>
<Para>After this is called the `RLMRealm` reverts back to being read-only.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="300">
<Name>cancelWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)cancelWriteTransaction</USR>
<Declaration>- (void)cancelWriteTransaction;</Declaration>
<Abstract>
<Para>Revert all writes made in the current write transaction and end the transaction.</Para>
</Abstract>
<Discussion>
<Para>This rolls back all objects in the Realm to the state they were in at the beginning of the write transaction, and then ends the transaction.</Para>
<Para>This restores the data for deleted objects, but does not re-validated deleted accessor objects. Any `RLMObject`s which were added to the Realm will be invalidated rather than switching back to standalone objects. Given the following code:</Para>
<Para>ObjectType *oldObject = [[ObjectType objectsWhere:&quot;...&quot;] firstObject]; ObjectType *newObject = [[ObjectType alloc] init];</Para>
<Para>[realm beginWriteTransaction]; [realm addObject:newObject]; [realm deleteObject:oldObject]; [realm cancelWriteTransaction];</Para>
<Para>Both `oldObject` and `newObject` will return `YES` for `isInvalidated`, but re-running the query which provided `oldObject` will once again return the valid object.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="305">
<Name>transactionWithBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)transactionWithBlock:</USR>
<Declaration>- (void)transactionWithBlock:(void (^__strong)(void))block;</Declaration>
<Abstract>
<Para>Helper to perform a block within a transaction.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="312">
<Name>refresh</Name>
<USR>c:objc(cs)RLMRealm(im)refresh</USR>
<Declaration>- (BOOL)refresh;</Declaration>
<Abstract>
<Para>Update an `RLMRealm` and outstanding objects to point to the most recent data for this `RLMRealm`.</Para>
</Abstract>
<ResultDiscussion>
<Para>Whether the realm had any updates. Note that this may return YES even if no data has actually changed.</Para>
</ResultDiscussion>
</Function>
<Other column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>@property(assign, readwrite, nonatomic) BOOL autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Other>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (void)setAutorefresh:(BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="353">
<Name>writeCopyToPath:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write a compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="368">
<Name>writeCopyToPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:encryptionKey:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write an encrypted and compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to encrypt the new file with </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="390">
<Name>invalidate</Name>
<USR>c:objc(cs)RLMRealm(im)invalidate</USR>
<Declaration>- (void)invalidate;</Declaration>
<Abstract>
<Para>Invalidate all RLMObjects and RLMResults read from this Realm.</Para>
</Abstract>
<Discussion>
<Para>An RLMRealm holds a read lock on the version of the data accessed by it, so that changes made to the Realm on different threads do not modify or delete the data seen by this RLMRealm. Calling this method releases the read lock, allowing the space used on disk to be reused by later write transactions rather than growing the file. This method should be called before performing long blocking operations on a background thread on which you previously read data from the Realm which you no longer need.</Para>
<Para>All `RLMObject`, `RLMResults` and `RLMArray` instances obtained from this `RLMRealm` on the current thread are invalidated, and can not longer be used. The `RLMRealm` itself remains valid, and a new read transaction is implicitly begun the next time data is read from the Realm.</Para>
<Para>Calling this method multiple times in a row without reading any data from the Realm, or before ever reading any data from the Realm is a no-op. This method cannot be called on a read-only Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="414">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Adding and Removing Objects from a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Adds an object to be persisted it in this Realm.</Para>
<Para>Once added, this object can be retrieved using the `objectsWhere:` selectors on `RLMRealm` and on subclasses of `RLMObject`. When added, all linked (child) objects referenced by this object will also be added to the Realm if they are not already in it. If the object or any linked objects already belong to a different Realm an exception will be thrown. Use `-[RLMObject createInRealm:withObject]` to insert a copy of a persisted object into a different Realm.</Para>
<Para>The object to be added must be valid and cannot have been previously deleted from a Realm (i.e. `isInvalidated`) must be false.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="426">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)array;</Declaration>
<Abstract>
<Para>Adds objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addObject:` except for an array of objects.</Para>
<Para kind="see">addObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="439">
<Name>addOrUpdateObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObject:</USR>
<Declaration>- (void)addOrUpdateObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds or updates an object to be persisted it in this Realm. The object provided must have a designated primary key. If no objects exist in the RLMRealm instance with the same primary key value, the object is inserted. Otherwise, the existing object is updated with any changed values.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added or updated.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>As with `addObject:`, the object cannot already be persisted in a different Realm. Use `-[RLMObject createOrUpdateInRealm:withObject:]` to copy values to a different Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="450">
<Name>addOrUpdateObjectsFromArray:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObjectsFromArray:</USR>
<Declaration>- (void)addOrUpdateObjectsFromArray:(id)array;</Declaration>
<Abstract>
<Para>Adds or updates objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`NSArray`, `RLMArray`, or `RLMResults` of `RLMObject`s (or subclasses) to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addOrUpdateObject:` except for an array of objects.</Para>
<Para kind="see">addOrUpdateObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="457">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="464">
<Name>deleteObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObjects:</USR>
<Declaration>- (void)deleteObjects:(id)array;</Declaration>
<Abstract>
<Para>Delete an `NSArray`, `RLMArray`, or `RLMResults` of objects from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMArray`, `NSArray`, or `RLMResults` of `RLMObject`s to be deleted.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="469">
<Name>deleteAllObjects</Name>
<USR>c:objc(cs)RLMRealm(im)deleteAllObjects</USR>
<Declaration>- (void)deleteAllObjects;</Declaration>
<Abstract>
<Para>Deletes all objects in this Realm.</Para>
</Abstract>
</Function>
<Function column="16" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="486">
<Name>RLMMigrationBlock</Name>
<USR>c:RLMRealm.h@T@RLMMigrationBlock</USR>
<Declaration>typedef void (^RLMMigrationBlock)(RLMMigration *__strong, NSUInteger)</Declaration>
<Abstract>
<Para>Migration block used to migrate a Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>migration</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMMigration` object used to perform the migration. The migration object allows you to enumerate and alter any existing objects which require migration.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>oldSchemaVersion</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The schema version of the `RLMRealm` being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Schema version number for the `RLMRealm` after completing the migration. Must be greater than `oldSchemaVersion`.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="518">
<Name>setSchemaVersion:withMigrationBlock:</Name>
<USR>c:objc(cs)RLMRealm(cm)setSchemaVersion:withMigrationBlock:</USR>
<Declaration>+ (void)setSchemaVersion:(NSUInteger)version
withMigrationBlock:(__strong RLMMigrationBlock)block;</Declaration>
<Abstract>
<Para>Specify a schema version and an associated migration block which is applied when opening any Realm with and old schema version.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>version</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The current schema version. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>block</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The block which migrates the Realm to the current version. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>Before you can open an existing `RLMRealm` which has a different on-disk schema from the schema defined in your object interfaces you must provide a migration block which converts from the disk schema to your current object schema. At the minimum your migration block must initialize any properties which were added to existing objects without defaults and ensure uniqueness if a primary key property is added to an existing object.</Para>
<Para>You should call this method before accessing any `RLMRealm` instances which require migration. After registering your migration block Realm will call your block automatically as needed.</Para>
<Para kind="warning">Unsuccessful migrations will throw exceptions when the migration block is applied. This will happen in the following cases:</Para>
<Para>- The migration block was run and returns a schema version which is not higher than the previous schema version. - A new property without a default was added to an object and not initialized during the migration. You are required to either supply a default value or to manually populate added properties during a migration.</Para>
<Para kind="see">RLMMigration</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="530">
<Name>schemaVersionAtPath:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for a Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="543">
<Name>schemaVersionAtPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:encryptionKey:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for an encrypted Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="558">
<Name>migrateRealmAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath;</Declaration>
<Abstract>
<Para>Performs the registered migration block on a Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>This method is called automatically when opening a Realm for the first time and does not need to be called explicitly. You can choose to call this method to control exactly when and how migrations are performed.</Para>
<Para kind="see">RLMMigration </Para>
<Para kind="see">setSchemaVersion:withMigrationBlock:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="569">
<Name>migrateRealmAtPath:encryptionKey:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:encryptionKey:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key;</Declaration>
<Abstract>
<Para>Performs the registered migration block on an encrypted Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>As `migrateRealmAtPath:`, but for encrypted realms.</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="34">
<Name>RLMResults</Name>
<USR>c:objc(cs)RLMResults</USR>
<Declaration>@interface RLMResults : NSObject &lt;RLMCollection, NSFastEnumeration&gt;
@end</Declaration>
<Abstract>
<Para>RLMResults is an auto-updating container type in Realm returned from object queries.</Para>
</Abstract>
<Discussion>
<Para>RLMResults can be queried with the same predicates as RLMObject and RLMArray and you can chain queries to further filter query results.</Para>
<Para>RLMResults cannot be created directly.</Para>
</Discussion>
</Other>
<Other column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>@property(readonly, assign, nonatomic) NSUInteger count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="70">
<Name>objectAtIndex:</Name>
<USR>c:objc(cs)RLMResults(im)objectAtIndex:</USR>
<Declaration>- (id)objectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Returns the object at the index specified.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The index to look up.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="79">
<Name>firstObject</Name>
<USR>c:objc(cs)RLMResults(im)firstObject</USR>
<Declaration>- (id)firstObject;</Declaration>
<Abstract>
<Para>Returns the first object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="88">
<Name>lastObject</Name>
<USR>c:objc(cs)RLMResults(im)lastObject</USR>
<Declaration>- (id)lastObject;</Declaration>
<Abstract>
<Para>Returns the last object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="106">
<Name>indexOfObject:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObject:</USR>
<Declaration>- (NSUInteger)indexOfObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Querying Results</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Gets the index of an object.</Para>
<Para>Returns NSNotFound if the object is not found in this RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="115">
<Name>indexOfObjectWhere:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWhere:</USR>
<Declaration>- (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="124">
<Name>indexOfObjectWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWithPredicate:</USR>
<Declaration>- (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="133">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWhere:</USR>
<Declaration>- (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="142">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWithPredicate:</USR>
<Declaration>- (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="152">
<Name>sortedResultsUsingProperty:ascending:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingProperty:ascending:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingProperty:(NSString *)property
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by a property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name to sort by. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>ascending</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The direction to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="161">
<Name>sortedResultsUsingDescriptors:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingDescriptors:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingDescriptors:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by an `NSArray`` of `RLMSortDescriptor`s.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>properties</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array of `RLMSortDescriptor`s to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified properties.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="182">
<Name>minOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)minOfProperty:</USR>
<Declaration>- (id)minOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the minimum (lowest) value of the given property</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a minimum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The minimum value for the property amongst objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *min = [results minOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="195">
<Name>maxOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)maxOfProperty:</USR>
<Declaration>- (id)maxOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the maximum (highest) value of the given property of objects in an RLMResults</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a maximum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The maximum value for the property amongst objects in an RLMResults</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *max = [results maxOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="208">
<Name>sumOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)sumOfProperty:</USR>
<Declaration>- (NSNumber *)sumOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the sum of the given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate sum on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The sum of the given property over all objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *sum = [results sumOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="222">
<Name>averageOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)averageOfProperty:</USR>
<Declaration>- (NSNumber *)averageOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the average of a given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate average on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The average for the given property amongst objects in an RLMResults. This will be of type double for both float and double properties.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *average = [results averageOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="239">
<Name>init</Name>
<USR>c:objc(cs)RLMResults(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>-[RLMResults init] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isClassMethod="1" line="245">
<Name>new</Name>
<USR>c:objc(cs)RLMResults(cm)new</USR>
<Declaration>+ (instancetype) new;</Declaration>
<Abstract>
<Para>+[RLMResults new] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>- (NSUInteger)count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="30">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>@property(readonly, nonatomic) NSString *className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Other>
<Other column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>@property(readonly, nonatomic) RLMProperty *primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="56">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMProperty *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)propertyName;</Declaration>
<Abstract>
<Para>Retrieve an RLMProperty object by name.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property's name.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMProperty object or nil if there is no property with the given name.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="61">
<Name>isEqualToObjectSchema:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)isEqualToObjectSchema:</USR>
<Declaration>- (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>Returns YES if equal to objectSchema</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>- (NSArray *)properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>- (NSString *)className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Function>
<Function column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>- (RLMProperty *)primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" line="23">
<Name>RLMRealm</Name>
<USR>c:objc(cs)RLMRealm</USR>
<Declaration>@interface RLMRealm (Dynamic)
@end</Declaration>
<Abstract>
<Para>An RLMRealm instance (also referred to as &quot;a realm&quot;) represents a Realm database.</Para>
</Abstract>
<Discussion>
<Para>Realms can either be stored on disk (see +[RLMRealm realmWithPath:]) or in memory (see +[RLMRealm inMemoryRealmWithIdentifier:]).</Para>
<Para>RLMRealm instances are cached internally, and constructing equivalent RLMRealm objects (with the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the same RLMRealm object. If you specifically want to ensure a RLMRealm object 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 ` {}` and ensure you have no other strong references to it.</Para>
<Para kind="warning">RLMRealm instances are not thread safe and can not be shared across threads or dispatch queues. 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 on a consistent thread.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="47">
<Name>allObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)allObjects:</USR>
<Declaration>- (RLMResults *)allObjects:(NSString *)className;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject subclass to retrieve on e.g. `MyClass.className`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects in this realm of the given type.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Getting Objects from a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Get all objects of a given type in this Realm.</Para>
<Para kind="see">RLMObject allObjects</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="61">
<Name>objects:where:</Name>
<USR>c:objc(cs)RLMRealm(im)objects:where:</USR>
<Declaration>- (RLMResults *)objects:(NSString *)className
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate from the this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of objects you are looking for (name of the class). </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of results matching the given predicate.</Para>
</ResultDiscussion>
<Discussion>
<Para>The preferred way to get objects of a single class is to use the class methods on RLMObject.</Para>
<Para kind="see">RLMObject objectsWhere:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="75">
<Name>objects:withPredicate:</Name>
<USR>c:objc(cs)RLMRealm(im)objects:withPredicate:</USR>
<Declaration>- (RLMResults *)objects:(NSString *)className
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate from the this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of objects you are looking for (name of the class). </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of results matching the given predicate.</Para>
</ResultDiscussion>
<Discussion>
<Para>The preferred way to get objects of a single class is to use the class methods on RLMObject.</Para>
<Para kind="see">RLMObject objectsWhere:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="87">
<Name>createObject:withObject:</Name>
<USR>c:objc(cs)RLMRealm(im)createObject:withObject:</USR>
<Declaration>- (RLMObject *)createObject:(NSString *)className withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject of type `className` in the Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" line="91">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema (Dynamic)
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="101">
<Name>initWithClassName:objectClass:properties:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)initWithClassName:objectClass:properties:</USR>
<Declaration>- (instancetype)initWithClassName:(NSString *)objectClassName
objectClass:(Class)objectClass
properties:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Initialize an RLMObjectSchema with classname, objectClass, and an array of properties</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>objectClassName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the class used to refer to objects of this type. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>objectClass</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The objective-c class used when creating instances of this type. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>properties</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array RLMProperty describing the persisted properties for this type.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An initialized instance of RLMObjectSchema.</Para>
</ResultDiscussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" line="104">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty (Dynamic)
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="115">
<Name>initWithName:type:objectClassName:attributes:</Name>
<USR>c:objc(cs)RLMProperty(im)initWithName:type:objectClassName:attributes:</USR>
<Declaration>- (instancetype)initWithName:(NSString *)name
type:(RLMPropertyType)type
objectClassName:(NSString *)objectClassName
attributes:(RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Initialize an RLMProperty</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>name</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>type</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property type. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>objectClassName</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object type used for Object and Array types. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>attributes</Name>
<Index>3</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A bitmask of attributes for this property.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An initialized instance of RLMProperty.</Para>
</ResultDiscussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="30">
<Name>RLMSchema</Name>
<USR>c:objc(cs)RLMSchema</USR>
<Declaration>@interface RLMSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents the collection of model object schemas persisted to Realm.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Schemas map to collections of tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="38">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>@property(readwrite, copy, nonatomic) NSArray *objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="48">
<Name>schemaForClassName:</Name>
<USR>c:objc(cs)RLMSchema(im)schemaForClassName:</USR>
<Declaration>- (RLMObjectSchema *)schemaForClassName:(NSString *)className;</Declaration>
<Abstract>
<Para>Returns an RLMObjectSchema for the given class name in this RLMSchema.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object class name. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMObjectSchema for the given class in this RLMSchema.</Para>
</ResultDiscussion>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="59">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMObjectSchema *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)className;</Declaration>
<Abstract>
<Para>Look up an RLMObjectSchema for the given class name in this Realm. Throws if there is no object of type className in this RLMSchema instance.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object class name. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMObjectSchema for the given class in this Realm.</Para>
</ResultDiscussion>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="64">
<Name>isEqualToSchema:</Name>
<USR>c:objc(cs)RLMSchema(im)isEqualToSchema:</USR>
<Declaration>- (BOOL)isEqualToSchema:(RLMSchema *)schema;</Declaration>
<Abstract>
<Para>Returns YES if schema are equal</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="38">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>- (NSArray *)objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema_Private.h" line="72">
<Name>RLMSchema</Name>
<USR>c:objc(cs)RLMSchema</USR>
<Declaration>@interface RLMSchema ()
@end</Declaration>
<Abstract>
<Para>This class represents the collection of model object schemas persisted to Realm.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Schemas map to collections of tables in the core database.</Para>
</Discussion>
</Other>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema_Private.h" isInstanceMethod="1" line="73">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>- (void)setObjectSchema:(NSArray *)objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readwrite, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readwrite, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readwrite, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty_Private.h" line="23">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty ()
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Function column="58" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty_Private.h" isInstanceMethod="1" line="40">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (void)setType:(RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="56" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty_Private.h" isInstanceMethod="1" line="41">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (void)setAttributes:(RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="39" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty_Private.h" isInstanceMethod="1" line="42">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (void)setObjectClassName:(NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="46">
<Name>RLMRealm</Name>
<USR>c:objc(cs)RLMRealm</USR>
<Declaration>@interface RLMRealm : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMRealm instance (also referred to as &quot;a realm&quot;) represents a Realm database.</Para>
</Abstract>
<Discussion>
<Para>Realms can either be stored on disk (see +[RLMRealm realmWithPath:]) or in memory (see +[RLMRealm inMemoryRealmWithIdentifier:]).</Para>
<Para>RLMRealm instances are cached internally, and constructing equivalent RLMRealm objects (with the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the same RLMRealm object. If you specifically want to ensure a RLMRealm object 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 ` {}` and ensure you have no other strong references to it.</Para>
<Para kind="warning">RLMRealm instances are not thread safe and can not be shared across threads or dispatch queues. 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 on a consistent thread.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="62">
<Name>defaultRealm</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealm</USR>
<Declaration>+ (instancetype)defaultRealm;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>The default `RLMRealm` instance for the current thread.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Creating &amp; Initializing a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Obtains an instance of the default Realm.</Para>
<Para>The default Realm is used by the `RLMObject` class methods which do not take a `RLMRealm` parameter, but is otherwise not special. The default Realm is persisted as default.realm under the Documents directory of your Application on iOS, and in your application's Application Support directory on OS X.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="71">
<Name>realmWithPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted at a specific file path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="94">
<Name>realmWithPath:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance with persistence to a specific file path with options.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Like `realmWithPath:`, but with the ability to open read-only realms and get errors as an `NSError` inout parameter rather than exceptions.</Para>
<Para kind="warning">Read-only Realms do not support changes made to the file while the `RLMRealm` exists. This means that you cannot open a Realm as both read-only and read-write at the same time. Read-only Realms should normally only be used on files which cannot be opened in read-write mode, and not just for enforcing correctness in code that should not need to write to the Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="116">
<Name>realmWithPath:encryptionKey:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:encryptionKey:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
encryptionKey:(NSData *)key
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted to an encrypted file.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte key to use to encrypt the data. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>3</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An encrypted `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>The on-disk storage for encrypted Realms are encrypted using AES256+HMAC-SHA2, but otherwise they behave like normal persisted Realms.</Para>
<Para>Encrypted Realms currently cannot be opened while lldb is attached to the process since lldb cannot forward mach exceptions to the process being debugged. Attempting to open an encrypted Realm with lldb attached will result in an EXC_BAD_ACCESS.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="136">
<Name>setEncryptionKey:forRealmsAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setEncryptionKey:forRealmsAtPath:</USR>
<Declaration>+ (void)setEncryptionKey:(NSData *)key forRealmsAtPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Set the encryption key to use when opening Realms at a certain path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>key</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to use, or `nil` to unset. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>path</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Realm path to set the encryption key for.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This can be used as an alternative to explicitly passing the key to `encryptedRealmWithPath:key:readOnly:error:` each time a Realm instance is needed. The encryption key will be used any time a Realm is opened with `realmWithPath:` or `defaultRealm`.</Para>
<Para>If you do not want Realm to hold on to your encryption keys any longer than needed, then use `encryptedRealmWithPath:key:readOnly:error:` rather than this method.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="155">
<Name>inMemoryRealmWithIdentifier:</Name>
<USR>c:objc(cs)RLMRealm(cm)inMemoryRealmWithIdentifier:</USR>
<Declaration>+ (instancetype)inMemoryRealmWithIdentifier:(NSString *)identifier;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance for an un-persisted in-memory Realm. The identifier used to create this instance can be used to access the same in-memory Realm from multiple threads.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>identifier</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A string used to identify a particular in-memory Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Because in-memory Realms are not persisted, you must be sure to hold on to a reference to the `RLMRealm` object returned from this for as long as you want the data to last. Realm's internal cache of `RLMRealm`s will not keep the in-memory Realm alive across cycles of the run loop, so without a strong reference to the `RLMRealm` a new Realm will be created each time. Note that `RLMObject`s, `RLMArray`s, and `RLMResults` that refer to objects persisted in a Realm have a strong reference to the relevant `RLMRealm`, as do `RLMNotifcationToken`s.</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>@property(readonly, nonatomic) NSString *path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Other>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>- (NSString *)path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Function>
<Other column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>@property(readonly, getter=isReadOnly, nonatomic) BOOL readOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Other>
<Function column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>- (BOOL)isReadOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Function>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Other>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>- (RLMSchema *)schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="187">
<Name>defaultRealmPath</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealmPath</USR>
<Declaration>+ (NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>Location of the default Realm.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Default Realm Path</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Returns the location of the default Realm as a string.</Para>
<Para>`~/Application Support/{bundle ID}/default.realm` on OS X.</Para>
<Para>`default.realm` in your application's documents directory on iOS.</Para>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="196">
<Name>setDefaultRealmPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setDefaultRealmPath:</USR>
<Declaration>+ (void)setDefaultRealmPath:(NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>Set the default Realm path to a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>defaultRealmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path to use for the default Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="227">
<Name>addNotificationBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)addNotificationBlock:</USR>
<Declaration>- (RLMNotificationToken *)addNotificationBlock:
(__strong RLMNotificationBlock)block;</Declaration>
<Abstract>
<Para>Add a notification handler for changes in this RLMRealm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>block</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A block which is called to process RLMRealm notifications.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>A token object which can later be passed to `-removeNotification:` to remove this notification.</Para>
</ResultDiscussion>
<Discussion>
<Para>The block has the following definition:</Para>
<Para>typedef void(^RLMNotificationBlock)(NSString *notification, RLMRealm *realm);</Para>
<Para>It receives the following parameters:</Para>
<Para>- `NSString` \***notification**: The name of the incoming notification. See RLMRealmNotification for information on what notifications are sent. - `RLMRealm` \***realm**: The realm for which this notification occurred</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="236">
<Name>removeNotification:</Name>
<USR>c:objc(cs)RLMRealm(im)removeNotification:</USR>
<Declaration>- (void)removeNotification:(RLMNotificationToken *)notificationToken;</Declaration>
<Abstract>
<Para>Remove a previously registered notification handler using the token returned from `-addNotificationBlock:`</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>notificationToken</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The token returned from `-addNotificationBlock:` corresponding to the notification block to remove.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="264">
<Name>beginWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)beginWriteTransaction</USR>
<Declaration>- (void)beginWriteTransaction;</Declaration>
<Abstract>
<Para>Begins a write transaction in an `RLMRealm`.</Para>
</Abstract>
<Discussion>
<Para>Only one write transaction can be open at a time. Write transactions cannot be nested, and trying to begin a write transaction on a `RLMRealm` which is already in a write transaction with throw an exception. Calls to `beginWriteTransaction` from `RLMRealm` instances in other threads will block until the current write transaction completes.</Para>
<Para>Before beginning the write transaction, `beginWriteTransaction` updates the `RLMRealm` to the latest Realm version, as if refresh was called, and generates notifications if applicable. This has no effect if the `RLMRealm` was already up to date.</Para>
<Para>It is rarely a good idea to have write transactions span multiple cycles of the run loop, but if you do wish to do so you will need to ensure that the `RLMRealm` in the write transaction is kept alive until the write transaction is committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="273">
<Name>commitWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)commitWriteTransaction</USR>
<Declaration>- (void)commitWriteTransaction;</Declaration>
<Abstract>
<Para>Commits all writes operations in the current write transaction.</Para>
</Abstract>
<Discussion>
<Para>After this is called the `RLMRealm` reverts back to being read-only.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="300">
<Name>cancelWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)cancelWriteTransaction</USR>
<Declaration>- (void)cancelWriteTransaction;</Declaration>
<Abstract>
<Para>Revert all writes made in the current write transaction and end the transaction.</Para>
</Abstract>
<Discussion>
<Para>This rolls back all objects in the Realm to the state they were in at the beginning of the write transaction, and then ends the transaction.</Para>
<Para>This restores the data for deleted objects, but does not re-validated deleted accessor objects. Any `RLMObject`s which were added to the Realm will be invalidated rather than switching back to standalone objects. Given the following code:</Para>
<Para>ObjectType *oldObject = [[ObjectType objectsWhere:&quot;...&quot;] firstObject]; ObjectType *newObject = [[ObjectType alloc] init];</Para>
<Para>[realm beginWriteTransaction]; [realm addObject:newObject]; [realm deleteObject:oldObject]; [realm cancelWriteTransaction];</Para>
<Para>Both `oldObject` and `newObject` will return `YES` for `isInvalidated`, but re-running the query which provided `oldObject` will once again return the valid object.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="305">
<Name>transactionWithBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)transactionWithBlock:</USR>
<Declaration>- (void)transactionWithBlock:(void (^__strong)(void))block;</Declaration>
<Abstract>
<Para>Helper to perform a block within a transaction.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="312">
<Name>refresh</Name>
<USR>c:objc(cs)RLMRealm(im)refresh</USR>
<Declaration>- (BOOL)refresh;</Declaration>
<Abstract>
<Para>Update an `RLMRealm` and outstanding objects to point to the most recent data for this `RLMRealm`.</Para>
</Abstract>
<ResultDiscussion>
<Para>Whether the realm had any updates. Note that this may return YES even if no data has actually changed.</Para>
</ResultDiscussion>
</Function>
<Other column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>@property(assign, readwrite, nonatomic) BOOL autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Other>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (void)setAutorefresh:(BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="353">
<Name>writeCopyToPath:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write a compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="368">
<Name>writeCopyToPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:encryptionKey:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write an encrypted and compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to encrypt the new file with </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="390">
<Name>invalidate</Name>
<USR>c:objc(cs)RLMRealm(im)invalidate</USR>
<Declaration>- (void)invalidate;</Declaration>
<Abstract>
<Para>Invalidate all RLMObjects and RLMResults read from this Realm.</Para>
</Abstract>
<Discussion>
<Para>An RLMRealm holds a read lock on the version of the data accessed by it, so that changes made to the Realm on different threads do not modify or delete the data seen by this RLMRealm. Calling this method releases the read lock, allowing the space used on disk to be reused by later write transactions rather than growing the file. This method should be called before performing long blocking operations on a background thread on which you previously read data from the Realm which you no longer need.</Para>
<Para>All `RLMObject`, `RLMResults` and `RLMArray` instances obtained from this `RLMRealm` on the current thread are invalidated, and can not longer be used. The `RLMRealm` itself remains valid, and a new read transaction is implicitly begun the next time data is read from the Realm.</Para>
<Para>Calling this method multiple times in a row without reading any data from the Realm, or before ever reading any data from the Realm is a no-op. This method cannot be called on a read-only Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="414">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Adding and Removing Objects from a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Adds an object to be persisted it in this Realm.</Para>
<Para>Once added, this object can be retrieved using the `objectsWhere:` selectors on `RLMRealm` and on subclasses of `RLMObject`. When added, all linked (child) objects referenced by this object will also be added to the Realm if they are not already in it. If the object or any linked objects already belong to a different Realm an exception will be thrown. Use `-[RLMObject createInRealm:withObject]` to insert a copy of a persisted object into a different Realm.</Para>
<Para>The object to be added must be valid and cannot have been previously deleted from a Realm (i.e. `isInvalidated`) must be false.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="426">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)array;</Declaration>
<Abstract>
<Para>Adds objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addObject:` except for an array of objects.</Para>
<Para kind="see">addObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="439">
<Name>addOrUpdateObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObject:</USR>
<Declaration>- (void)addOrUpdateObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds or updates an object to be persisted it in this Realm. The object provided must have a designated primary key. If no objects exist in the RLMRealm instance with the same primary key value, the object is inserted. Otherwise, the existing object is updated with any changed values.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added or updated.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>As with `addObject:`, the object cannot already be persisted in a different Realm. Use `-[RLMObject createOrUpdateInRealm:withObject:]` to copy values to a different Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="450">
<Name>addOrUpdateObjectsFromArray:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObjectsFromArray:</USR>
<Declaration>- (void)addOrUpdateObjectsFromArray:(id)array;</Declaration>
<Abstract>
<Para>Adds or updates objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`NSArray`, `RLMArray`, or `RLMResults` of `RLMObject`s (or subclasses) to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addOrUpdateObject:` except for an array of objects.</Para>
<Para kind="see">addOrUpdateObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="457">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="464">
<Name>deleteObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObjects:</USR>
<Declaration>- (void)deleteObjects:(id)array;</Declaration>
<Abstract>
<Para>Delete an `NSArray`, `RLMArray`, or `RLMResults` of objects from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMArray`, `NSArray`, or `RLMResults` of `RLMObject`s to be deleted.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="469">
<Name>deleteAllObjects</Name>
<USR>c:objc(cs)RLMRealm(im)deleteAllObjects</USR>
<Declaration>- (void)deleteAllObjects;</Declaration>
<Abstract>
<Para>Deletes all objects in this Realm.</Para>
</Abstract>
</Function>
<Function column="16" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="486">
<Name>RLMMigrationBlock</Name>
<USR>c:RLMRealm.h@T@RLMMigrationBlock</USR>
<Declaration>typedef void (^RLMMigrationBlock)(RLMMigration *__strong, NSUInteger)</Declaration>
<Abstract>
<Para>Migration block used to migrate a Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>migration</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMMigration` object used to perform the migration. The migration object allows you to enumerate and alter any existing objects which require migration.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>oldSchemaVersion</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The schema version of the `RLMRealm` being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Schema version number for the `RLMRealm` after completing the migration. Must be greater than `oldSchemaVersion`.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="518">
<Name>setSchemaVersion:withMigrationBlock:</Name>
<USR>c:objc(cs)RLMRealm(cm)setSchemaVersion:withMigrationBlock:</USR>
<Declaration>+ (void)setSchemaVersion:(NSUInteger)version
withMigrationBlock:(__strong RLMMigrationBlock)block;</Declaration>
<Abstract>
<Para>Specify a schema version and an associated migration block which is applied when opening any Realm with and old schema version.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>version</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The current schema version. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>block</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The block which migrates the Realm to the current version. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>Before you can open an existing `RLMRealm` which has a different on-disk schema from the schema defined in your object interfaces you must provide a migration block which converts from the disk schema to your current object schema. At the minimum your migration block must initialize any properties which were added to existing objects without defaults and ensure uniqueness if a primary key property is added to an existing object.</Para>
<Para>You should call this method before accessing any `RLMRealm` instances which require migration. After registering your migration block Realm will call your block automatically as needed.</Para>
<Para kind="warning">Unsuccessful migrations will throw exceptions when the migration block is applied. This will happen in the following cases:</Para>
<Para>- The migration block was run and returns a schema version which is not higher than the previous schema version. - A new property without a default was added to an object and not initialized during the migration. You are required to either supply a default value or to manually populate added properties during a migration.</Para>
<Para kind="see">RLMMigration</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="530">
<Name>schemaVersionAtPath:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for a Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="543">
<Name>schemaVersionAtPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:encryptionKey:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for an encrypted Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="558">
<Name>migrateRealmAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath;</Declaration>
<Abstract>
<Para>Performs the registered migration block on a Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>This method is called automatically when opening a Realm for the first time and does not need to be called explicitly. You can choose to call this method to control exactly when and how migrations are performed.</Para>
<Para kind="see">RLMMigration </Para>
<Para kind="see">setSchemaVersion:withMigrationBlock:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="569">
<Name>migrateRealmAtPath:encryptionKey:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:encryptionKey:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key;</Declaration>
<Abstract>
<Para>Performs the registered migration block on an encrypted Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>As `migrateRealmAtPath:`, but for encrypted realms.</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="46">
<Name>RLMRealm</Name>
<USR>c:objc(cs)RLMRealm</USR>
<Declaration>@interface RLMRealm : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMRealm instance (also referred to as &quot;a realm&quot;) represents a Realm database.</Para>
</Abstract>
<Discussion>
<Para>Realms can either be stored on disk (see +[RLMRealm realmWithPath:]) or in memory (see +[RLMRealm inMemoryRealmWithIdentifier:]).</Para>
<Para>RLMRealm instances are cached internally, and constructing equivalent RLMRealm objects (with the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the same RLMRealm object. If you specifically want to ensure a RLMRealm object 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 ` {}` and ensure you have no other strong references to it.</Para>
<Para kind="warning">RLMRealm instances are not thread safe and can not be shared across threads or dispatch queues. 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 on a consistent thread.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="62">
<Name>defaultRealm</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealm</USR>
<Declaration>+ (instancetype)defaultRealm;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>The default `RLMRealm` instance for the current thread.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Creating &amp; Initializing a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Obtains an instance of the default Realm.</Para>
<Para>The default Realm is used by the `RLMObject` class methods which do not take a `RLMRealm` parameter, but is otherwise not special. The default Realm is persisted as default.realm under the Documents directory of your Application on iOS, and in your application's Application Support directory on OS X.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="71">
<Name>realmWithPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted at a specific file path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="94">
<Name>realmWithPath:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance with persistence to a specific file path with options.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Like `realmWithPath:`, but with the ability to open read-only realms and get errors as an `NSError` inout parameter rather than exceptions.</Para>
<Para kind="warning">Read-only Realms do not support changes made to the file while the `RLMRealm` exists. This means that you cannot open a Realm as both read-only and read-write at the same time. Read-only Realms should normally only be used on files which cannot be opened in read-write mode, and not just for enforcing correctness in code that should not need to write to the Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="116">
<Name>realmWithPath:encryptionKey:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:encryptionKey:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
encryptionKey:(NSData *)key
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted to an encrypted file.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte key to use to encrypt the data. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>3</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An encrypted `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>The on-disk storage for encrypted Realms are encrypted using AES256+HMAC-SHA2, but otherwise they behave like normal persisted Realms.</Para>
<Para>Encrypted Realms currently cannot be opened while lldb is attached to the process since lldb cannot forward mach exceptions to the process being debugged. Attempting to open an encrypted Realm with lldb attached will result in an EXC_BAD_ACCESS.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="136">
<Name>setEncryptionKey:forRealmsAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setEncryptionKey:forRealmsAtPath:</USR>
<Declaration>+ (void)setEncryptionKey:(NSData *)key forRealmsAtPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Set the encryption key to use when opening Realms at a certain path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>key</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to use, or `nil` to unset. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>path</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Realm path to set the encryption key for.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This can be used as an alternative to explicitly passing the key to `encryptedRealmWithPath:key:readOnly:error:` each time a Realm instance is needed. The encryption key will be used any time a Realm is opened with `realmWithPath:` or `defaultRealm`.</Para>
<Para>If you do not want Realm to hold on to your encryption keys any longer than needed, then use `encryptedRealmWithPath:key:readOnly:error:` rather than this method.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="155">
<Name>inMemoryRealmWithIdentifier:</Name>
<USR>c:objc(cs)RLMRealm(cm)inMemoryRealmWithIdentifier:</USR>
<Declaration>+ (instancetype)inMemoryRealmWithIdentifier:(NSString *)identifier;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance for an un-persisted in-memory Realm. The identifier used to create this instance can be used to access the same in-memory Realm from multiple threads.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>identifier</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A string used to identify a particular in-memory Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Because in-memory Realms are not persisted, you must be sure to hold on to a reference to the `RLMRealm` object returned from this for as long as you want the data to last. Realm's internal cache of `RLMRealm`s will not keep the in-memory Realm alive across cycles of the run loop, so without a strong reference to the `RLMRealm` a new Realm will be created each time. Note that `RLMObject`s, `RLMArray`s, and `RLMResults` that refer to objects persisted in a Realm have a strong reference to the relevant `RLMRealm`, as do `RLMNotifcationToken`s.</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>@property(readonly, nonatomic) NSString *path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Other>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>- (NSString *)path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Function>
<Other column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>@property(readonly, getter=isReadOnly, nonatomic) BOOL readOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Other>
<Function column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>- (BOOL)isReadOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Function>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Other>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>- (RLMSchema *)schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="187">
<Name>defaultRealmPath</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealmPath</USR>
<Declaration>+ (NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>Location of the default Realm.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Default Realm Path</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Returns the location of the default Realm as a string.</Para>
<Para>`~/Application Support/{bundle ID}/default.realm` on OS X.</Para>
<Para>`default.realm` in your application's documents directory on iOS.</Para>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="196">
<Name>setDefaultRealmPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setDefaultRealmPath:</USR>
<Declaration>+ (void)setDefaultRealmPath:(NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>Set the default Realm path to a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>defaultRealmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path to use for the default Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="227">
<Name>addNotificationBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)addNotificationBlock:</USR>
<Declaration>- (RLMNotificationToken *)addNotificationBlock:
(__strong RLMNotificationBlock)block;</Declaration>
<Abstract>
<Para>Add a notification handler for changes in this RLMRealm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>block</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A block which is called to process RLMRealm notifications.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>A token object which can later be passed to `-removeNotification:` to remove this notification.</Para>
</ResultDiscussion>
<Discussion>
<Para>The block has the following definition:</Para>
<Para>typedef void(^RLMNotificationBlock)(NSString *notification, RLMRealm *realm);</Para>
<Para>It receives the following parameters:</Para>
<Para>- `NSString` \***notification**: The name of the incoming notification. See RLMRealmNotification for information on what notifications are sent. - `RLMRealm` \***realm**: The realm for which this notification occurred</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="236">
<Name>removeNotification:</Name>
<USR>c:objc(cs)RLMRealm(im)removeNotification:</USR>
<Declaration>- (void)removeNotification:(RLMNotificationToken *)notificationToken;</Declaration>
<Abstract>
<Para>Remove a previously registered notification handler using the token returned from `-addNotificationBlock:`</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>notificationToken</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The token returned from `-addNotificationBlock:` corresponding to the notification block to remove.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="264">
<Name>beginWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)beginWriteTransaction</USR>
<Declaration>- (void)beginWriteTransaction;</Declaration>
<Abstract>
<Para>Begins a write transaction in an `RLMRealm`.</Para>
</Abstract>
<Discussion>
<Para>Only one write transaction can be open at a time. Write transactions cannot be nested, and trying to begin a write transaction on a `RLMRealm` which is already in a write transaction with throw an exception. Calls to `beginWriteTransaction` from `RLMRealm` instances in other threads will block until the current write transaction completes.</Para>
<Para>Before beginning the write transaction, `beginWriteTransaction` updates the `RLMRealm` to the latest Realm version, as if refresh was called, and generates notifications if applicable. This has no effect if the `RLMRealm` was already up to date.</Para>
<Para>It is rarely a good idea to have write transactions span multiple cycles of the run loop, but if you do wish to do so you will need to ensure that the `RLMRealm` in the write transaction is kept alive until the write transaction is committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="273">
<Name>commitWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)commitWriteTransaction</USR>
<Declaration>- (void)commitWriteTransaction;</Declaration>
<Abstract>
<Para>Commits all writes operations in the current write transaction.</Para>
</Abstract>
<Discussion>
<Para>After this is called the `RLMRealm` reverts back to being read-only.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="300">
<Name>cancelWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)cancelWriteTransaction</USR>
<Declaration>- (void)cancelWriteTransaction;</Declaration>
<Abstract>
<Para>Revert all writes made in the current write transaction and end the transaction.</Para>
</Abstract>
<Discussion>
<Para>This rolls back all objects in the Realm to the state they were in at the beginning of the write transaction, and then ends the transaction.</Para>
<Para>This restores the data for deleted objects, but does not re-validated deleted accessor objects. Any `RLMObject`s which were added to the Realm will be invalidated rather than switching back to standalone objects. Given the following code:</Para>
<Para>ObjectType *oldObject = [[ObjectType objectsWhere:&quot;...&quot;] firstObject]; ObjectType *newObject = [[ObjectType alloc] init];</Para>
<Para>[realm beginWriteTransaction]; [realm addObject:newObject]; [realm deleteObject:oldObject]; [realm cancelWriteTransaction];</Para>
<Para>Both `oldObject` and `newObject` will return `YES` for `isInvalidated`, but re-running the query which provided `oldObject` will once again return the valid object.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="305">
<Name>transactionWithBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)transactionWithBlock:</USR>
<Declaration>- (void)transactionWithBlock:(void (^__strong)(void))block;</Declaration>
<Abstract>
<Para>Helper to perform a block within a transaction.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="312">
<Name>refresh</Name>
<USR>c:objc(cs)RLMRealm(im)refresh</USR>
<Declaration>- (BOOL)refresh;</Declaration>
<Abstract>
<Para>Update an `RLMRealm` and outstanding objects to point to the most recent data for this `RLMRealm`.</Para>
</Abstract>
<ResultDiscussion>
<Para>Whether the realm had any updates. Note that this may return YES even if no data has actually changed.</Para>
</ResultDiscussion>
</Function>
<Other column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>@property(assign, readwrite, nonatomic) BOOL autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Other>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (void)setAutorefresh:(BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="353">
<Name>writeCopyToPath:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write a compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="368">
<Name>writeCopyToPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:encryptionKey:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write an encrypted and compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to encrypt the new file with </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="390">
<Name>invalidate</Name>
<USR>c:objc(cs)RLMRealm(im)invalidate</USR>
<Declaration>- (void)invalidate;</Declaration>
<Abstract>
<Para>Invalidate all RLMObjects and RLMResults read from this Realm.</Para>
</Abstract>
<Discussion>
<Para>An RLMRealm holds a read lock on the version of the data accessed by it, so that changes made to the Realm on different threads do not modify or delete the data seen by this RLMRealm. Calling this method releases the read lock, allowing the space used on disk to be reused by later write transactions rather than growing the file. This method should be called before performing long blocking operations on a background thread on which you previously read data from the Realm which you no longer need.</Para>
<Para>All `RLMObject`, `RLMResults` and `RLMArray` instances obtained from this `RLMRealm` on the current thread are invalidated, and can not longer be used. The `RLMRealm` itself remains valid, and a new read transaction is implicitly begun the next time data is read from the Realm.</Para>
<Para>Calling this method multiple times in a row without reading any data from the Realm, or before ever reading any data from the Realm is a no-op. This method cannot be called on a read-only Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="414">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Adding and Removing Objects from a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Adds an object to be persisted it in this Realm.</Para>
<Para>Once added, this object can be retrieved using the `objectsWhere:` selectors on `RLMRealm` and on subclasses of `RLMObject`. When added, all linked (child) objects referenced by this object will also be added to the Realm if they are not already in it. If the object or any linked objects already belong to a different Realm an exception will be thrown. Use `-[RLMObject createInRealm:withObject]` to insert a copy of a persisted object into a different Realm.</Para>
<Para>The object to be added must be valid and cannot have been previously deleted from a Realm (i.e. `isInvalidated`) must be false.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="426">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)array;</Declaration>
<Abstract>
<Para>Adds objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addObject:` except for an array of objects.</Para>
<Para kind="see">addObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="439">
<Name>addOrUpdateObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObject:</USR>
<Declaration>- (void)addOrUpdateObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds or updates an object to be persisted it in this Realm. The object provided must have a designated primary key. If no objects exist in the RLMRealm instance with the same primary key value, the object is inserted. Otherwise, the existing object is updated with any changed values.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added or updated.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>As with `addObject:`, the object cannot already be persisted in a different Realm. Use `-[RLMObject createOrUpdateInRealm:withObject:]` to copy values to a different Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="450">
<Name>addOrUpdateObjectsFromArray:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObjectsFromArray:</USR>
<Declaration>- (void)addOrUpdateObjectsFromArray:(id)array;</Declaration>
<Abstract>
<Para>Adds or updates objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`NSArray`, `RLMArray`, or `RLMResults` of `RLMObject`s (or subclasses) to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addOrUpdateObject:` except for an array of objects.</Para>
<Para kind="see">addOrUpdateObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="457">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="464">
<Name>deleteObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObjects:</USR>
<Declaration>- (void)deleteObjects:(id)array;</Declaration>
<Abstract>
<Para>Delete an `NSArray`, `RLMArray`, or `RLMResults` of objects from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMArray`, `NSArray`, or `RLMResults` of `RLMObject`s to be deleted.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="469">
<Name>deleteAllObjects</Name>
<USR>c:objc(cs)RLMRealm(im)deleteAllObjects</USR>
<Declaration>- (void)deleteAllObjects;</Declaration>
<Abstract>
<Para>Deletes all objects in this Realm.</Para>
</Abstract>
</Function>
<Function column="16" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="486">
<Name>RLMMigrationBlock</Name>
<USR>c:RLMRealm.h@T@RLMMigrationBlock</USR>
<Declaration>typedef void (^RLMMigrationBlock)(RLMMigration *__strong, NSUInteger)</Declaration>
<Abstract>
<Para>Migration block used to migrate a Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>migration</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMMigration` object used to perform the migration. The migration object allows you to enumerate and alter any existing objects which require migration.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>oldSchemaVersion</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The schema version of the `RLMRealm` being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Schema version number for the `RLMRealm` after completing the migration. Must be greater than `oldSchemaVersion`.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="518">
<Name>setSchemaVersion:withMigrationBlock:</Name>
<USR>c:objc(cs)RLMRealm(cm)setSchemaVersion:withMigrationBlock:</USR>
<Declaration>+ (void)setSchemaVersion:(NSUInteger)version
withMigrationBlock:(__strong RLMMigrationBlock)block;</Declaration>
<Abstract>
<Para>Specify a schema version and an associated migration block which is applied when opening any Realm with and old schema version.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>version</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The current schema version. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>block</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The block which migrates the Realm to the current version. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>Before you can open an existing `RLMRealm` which has a different on-disk schema from the schema defined in your object interfaces you must provide a migration block which converts from the disk schema to your current object schema. At the minimum your migration block must initialize any properties which were added to existing objects without defaults and ensure uniqueness if a primary key property is added to an existing object.</Para>
<Para>You should call this method before accessing any `RLMRealm` instances which require migration. After registering your migration block Realm will call your block automatically as needed.</Para>
<Para kind="warning">Unsuccessful migrations will throw exceptions when the migration block is applied. This will happen in the following cases:</Para>
<Para>- The migration block was run and returns a schema version which is not higher than the previous schema version. - A new property without a default was added to an object and not initialized during the migration. You are required to either supply a default value or to manually populate added properties during a migration.</Para>
<Para kind="see">RLMMigration</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="530">
<Name>schemaVersionAtPath:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for a Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="543">
<Name>schemaVersionAtPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:encryptionKey:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for an encrypted Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="558">
<Name>migrateRealmAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath;</Declaration>
<Abstract>
<Para>Performs the registered migration block on a Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>This method is called automatically when opening a Realm for the first time and does not need to be called explicitly. You can choose to call this method to control exactly when and how migrations are performed.</Para>
<Para kind="see">RLMMigration </Para>
<Para kind="see">setSchemaVersion:withMigrationBlock:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="569">
<Name>migrateRealmAtPath:encryptionKey:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:encryptionKey:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key;</Declaration>
<Abstract>
<Para>Performs the registered migration block on an encrypted Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>As `migrateRealmAtPath:`, but for encrypted realms.</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="34">
<Name>RLMResults</Name>
<USR>c:objc(cs)RLMResults</USR>
<Declaration>@interface RLMResults : NSObject &lt;RLMCollection, NSFastEnumeration&gt;
@end</Declaration>
<Abstract>
<Para>RLMResults is an auto-updating container type in Realm returned from object queries.</Para>
</Abstract>
<Discussion>
<Para>RLMResults can be queried with the same predicates as RLMObject and RLMArray and you can chain queries to further filter query results.</Para>
<Para>RLMResults cannot be created directly.</Para>
</Discussion>
</Other>
<Other column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>@property(readonly, assign, nonatomic) NSUInteger count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="70">
<Name>objectAtIndex:</Name>
<USR>c:objc(cs)RLMResults(im)objectAtIndex:</USR>
<Declaration>- (id)objectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Returns the object at the index specified.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The index to look up.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="79">
<Name>firstObject</Name>
<USR>c:objc(cs)RLMResults(im)firstObject</USR>
<Declaration>- (id)firstObject;</Declaration>
<Abstract>
<Para>Returns the first object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="88">
<Name>lastObject</Name>
<USR>c:objc(cs)RLMResults(im)lastObject</USR>
<Declaration>- (id)lastObject;</Declaration>
<Abstract>
<Para>Returns the last object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="106">
<Name>indexOfObject:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObject:</USR>
<Declaration>- (NSUInteger)indexOfObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Querying Results</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Gets the index of an object.</Para>
<Para>Returns NSNotFound if the object is not found in this RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="115">
<Name>indexOfObjectWhere:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWhere:</USR>
<Declaration>- (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="124">
<Name>indexOfObjectWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWithPredicate:</USR>
<Declaration>- (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="133">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWhere:</USR>
<Declaration>- (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="142">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWithPredicate:</USR>
<Declaration>- (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="152">
<Name>sortedResultsUsingProperty:ascending:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingProperty:ascending:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingProperty:(NSString *)property
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by a property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name to sort by. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>ascending</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The direction to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="161">
<Name>sortedResultsUsingDescriptors:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingDescriptors:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingDescriptors:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by an `NSArray`` of `RLMSortDescriptor`s.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>properties</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array of `RLMSortDescriptor`s to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified properties.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="182">
<Name>minOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)minOfProperty:</USR>
<Declaration>- (id)minOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the minimum (lowest) value of the given property</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a minimum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The minimum value for the property amongst objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *min = [results minOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="195">
<Name>maxOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)maxOfProperty:</USR>
<Declaration>- (id)maxOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the maximum (highest) value of the given property of objects in an RLMResults</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a maximum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The maximum value for the property amongst objects in an RLMResults</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *max = [results maxOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="208">
<Name>sumOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)sumOfProperty:</USR>
<Declaration>- (NSNumber *)sumOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the sum of the given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate sum on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The sum of the given property over all objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *sum = [results sumOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="222">
<Name>averageOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)averageOfProperty:</USR>
<Declaration>- (NSNumber *)averageOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the average of a given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate average on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The average for the given property amongst objects in an RLMResults. This will be of type double for both float and double properties.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *average = [results averageOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="239">
<Name>init</Name>
<USR>c:objc(cs)RLMResults(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>-[RLMResults init] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isClassMethod="1" line="245">
<Name>new</Name>
<USR>c:objc(cs)RLMResults(cm)new</USR>
<Declaration>+ (instancetype) new;</Declaration>
<Abstract>
<Para>+[RLMResults new] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>- (NSUInteger)count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="30">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>@property(readonly, nonatomic) NSString *className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Other>
<Other column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>@property(readonly, nonatomic) RLMProperty *primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="56">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMProperty *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)propertyName;</Declaration>
<Abstract>
<Para>Retrieve an RLMProperty object by name.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property's name.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMProperty object or nil if there is no property with the given name.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="61">
<Name>isEqualToObjectSchema:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)isEqualToObjectSchema:</USR>
<Declaration>- (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>Returns YES if equal to objectSchema</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>- (NSArray *)properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>- (NSString *)className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Function>
<Function column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>- (RLMProperty *)primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" line="23">
<Name>RLMRealm</Name>
<USR>c:objc(cs)RLMRealm</USR>
<Declaration>@interface RLMRealm (Dynamic)
@end</Declaration>
<Abstract>
<Para>An RLMRealm instance (also referred to as &quot;a realm&quot;) represents a Realm database.</Para>
</Abstract>
<Discussion>
<Para>Realms can either be stored on disk (see +[RLMRealm realmWithPath:]) or in memory (see +[RLMRealm inMemoryRealmWithIdentifier:]).</Para>
<Para>RLMRealm instances are cached internally, and constructing equivalent RLMRealm objects (with the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the same RLMRealm object. If you specifically want to ensure a RLMRealm object 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 ` {}` and ensure you have no other strong references to it.</Para>
<Para kind="warning">RLMRealm instances are not thread safe and can not be shared across threads or dispatch queues. 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 on a consistent thread.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="47">
<Name>allObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)allObjects:</USR>
<Declaration>- (RLMResults *)allObjects:(NSString *)className;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject subclass to retrieve on e.g. `MyClass.className`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects in this realm of the given type.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Getting Objects from a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Get all objects of a given type in this Realm.</Para>
<Para kind="see">RLMObject allObjects</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="61">
<Name>objects:where:</Name>
<USR>c:objc(cs)RLMRealm(im)objects:where:</USR>
<Declaration>- (RLMResults *)objects:(NSString *)className
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate from the this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of objects you are looking for (name of the class). </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of results matching the given predicate.</Para>
</ResultDiscussion>
<Discussion>
<Para>The preferred way to get objects of a single class is to use the class methods on RLMObject.</Para>
<Para kind="see">RLMObject objectsWhere:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="75">
<Name>objects:withPredicate:</Name>
<USR>c:objc(cs)RLMRealm(im)objects:withPredicate:</USR>
<Declaration>- (RLMResults *)objects:(NSString *)className
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate from the this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of objects you are looking for (name of the class). </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of results matching the given predicate.</Para>
</ResultDiscussion>
<Discussion>
<Para>The preferred way to get objects of a single class is to use the class methods on RLMObject.</Para>
<Para kind="see">RLMObject objectsWhere:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="87">
<Name>createObject:withObject:</Name>
<USR>c:objc(cs)RLMRealm(im)createObject:withObject:</USR>
<Declaration>- (RLMObject *)createObject:(NSString *)className withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject of type `className` in the Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" line="91">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema (Dynamic)
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="101">
<Name>initWithClassName:objectClass:properties:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)initWithClassName:objectClass:properties:</USR>
<Declaration>- (instancetype)initWithClassName:(NSString *)objectClassName
objectClass:(Class)objectClass
properties:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Initialize an RLMObjectSchema with classname, objectClass, and an array of properties</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>objectClassName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the class used to refer to objects of this type. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>objectClass</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The objective-c class used when creating instances of this type. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>properties</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array RLMProperty describing the persisted properties for this type.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An initialized instance of RLMObjectSchema.</Para>
</ResultDiscussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" line="104">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty (Dynamic)
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm_Dynamic.h" isInstanceMethod="1" line="115">
<Name>initWithName:type:objectClassName:attributes:</Name>
<USR>c:objc(cs)RLMProperty(im)initWithName:type:objectClassName:attributes:</USR>
<Declaration>- (instancetype)initWithName:(NSString *)name
type:(RLMPropertyType)type
objectClassName:(NSString *)objectClassName
attributes:(RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Initialize an RLMProperty</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>name</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>type</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property type. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>objectClassName</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object type used for Object and Array types. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>attributes</Name>
<Index>3</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A bitmask of attributes for this property.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An initialized instance of RLMProperty.</Para>
</ResultDiscussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="34">
<Name>RLMResults</Name>
<USR>c:objc(cs)RLMResults</USR>
<Declaration>@interface RLMResults : NSObject &lt;RLMCollection, NSFastEnumeration&gt;
@end</Declaration>
<Abstract>
<Para>RLMResults is an auto-updating container type in Realm returned from object queries.</Para>
</Abstract>
<Discussion>
<Para>RLMResults can be queried with the same predicates as RLMObject and RLMArray and you can chain queries to further filter query results.</Para>
<Para>RLMResults cannot be created directly.</Para>
</Discussion>
</Other>
<Other column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>@property(readonly, assign, nonatomic) NSUInteger count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="70">
<Name>objectAtIndex:</Name>
<USR>c:objc(cs)RLMResults(im)objectAtIndex:</USR>
<Declaration>- (id)objectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Returns the object at the index specified.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The index to look up.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="79">
<Name>firstObject</Name>
<USR>c:objc(cs)RLMResults(im)firstObject</USR>
<Declaration>- (id)firstObject;</Declaration>
<Abstract>
<Para>Returns the first object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="88">
<Name>lastObject</Name>
<USR>c:objc(cs)RLMResults(im)lastObject</USR>
<Declaration>- (id)lastObject;</Declaration>
<Abstract>
<Para>Returns the last object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="106">
<Name>indexOfObject:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObject:</USR>
<Declaration>- (NSUInteger)indexOfObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Querying Results</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Gets the index of an object.</Para>
<Para>Returns NSNotFound if the object is not found in this RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="115">
<Name>indexOfObjectWhere:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWhere:</USR>
<Declaration>- (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="124">
<Name>indexOfObjectWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWithPredicate:</USR>
<Declaration>- (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="133">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWhere:</USR>
<Declaration>- (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="142">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWithPredicate:</USR>
<Declaration>- (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="152">
<Name>sortedResultsUsingProperty:ascending:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingProperty:ascending:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingProperty:(NSString *)property
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by a property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name to sort by. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>ascending</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The direction to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="161">
<Name>sortedResultsUsingDescriptors:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingDescriptors:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingDescriptors:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by an `NSArray`` of `RLMSortDescriptor`s.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>properties</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array of `RLMSortDescriptor`s to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified properties.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="182">
<Name>minOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)minOfProperty:</USR>
<Declaration>- (id)minOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the minimum (lowest) value of the given property</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a minimum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The minimum value for the property amongst objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *min = [results minOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="195">
<Name>maxOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)maxOfProperty:</USR>
<Declaration>- (id)maxOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the maximum (highest) value of the given property of objects in an RLMResults</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a maximum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The maximum value for the property amongst objects in an RLMResults</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *max = [results maxOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="208">
<Name>sumOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)sumOfProperty:</USR>
<Declaration>- (NSNumber *)sumOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the sum of the given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate sum on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The sum of the given property over all objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *sum = [results sumOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="222">
<Name>averageOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)averageOfProperty:</USR>
<Declaration>- (NSNumber *)averageOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the average of a given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate average on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The average for the given property amongst objects in an RLMResults. This will be of type double for both float and double properties.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *average = [results averageOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="239">
<Name>init</Name>
<USR>c:objc(cs)RLMResults(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>-[RLMResults init] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isClassMethod="1" line="245">
<Name>new</Name>
<USR>c:objc(cs)RLMResults(cm)new</USR>
<Declaration>+ (instancetype) new;</Declaration>
<Abstract>
<Para>+[RLMResults new] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>- (NSUInteger)count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="30">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>@property(readonly, nonatomic) NSString *className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Other>
<Other column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>@property(readonly, nonatomic) RLMProperty *primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="56">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMProperty *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)propertyName;</Declaration>
<Abstract>
<Para>Retrieve an RLMProperty object by name.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property's name.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMProperty object or nil if there is no property with the given name.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="61">
<Name>isEqualToObjectSchema:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)isEqualToObjectSchema:</USR>
<Declaration>- (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>Returns YES if equal to objectSchema</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>- (NSArray *)properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>- (NSString *)className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Function>
<Function column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>- (RLMProperty *)primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="30">
<Name>RLMSchema</Name>
<USR>c:objc(cs)RLMSchema</USR>
<Declaration>@interface RLMSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents the collection of model object schemas persisted to Realm.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Schemas map to collections of tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="38">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="48">
<Name>schemaForClassName:</Name>
<USR>c:objc(cs)RLMSchema(im)schemaForClassName:</USR>
<Declaration>- (RLMObjectSchema *)schemaForClassName:(NSString *)className;</Declaration>
<Abstract>
<Para>Returns an RLMObjectSchema for the given class name in this RLMSchema.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object class name. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMObjectSchema for the given class in this RLMSchema.</Para>
</ResultDiscussion>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="59">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMObjectSchema *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)className;</Declaration>
<Abstract>
<Para>Look up an RLMObjectSchema for the given class name in this Realm. Throws if there is no object of type className in this RLMSchema instance.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object class name. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMObjectSchema for the given class in this Realm.</Para>
</ResultDiscussion>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="64">
<Name>isEqualToSchema:</Name>
<USR>c:objc(cs)RLMSchema(im)isEqualToSchema:</USR>
<Declaration>- (BOOL)isEqualToSchema:(RLMSchema *)schema;</Declaration>
<Abstract>
<Para>Returns YES if schema are equal</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="38">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>- (NSArray *)objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="30">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>@property(readonly, nonatomic) NSString *className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Other>
<Other column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>@property(readonly, nonatomic) RLMProperty *primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="56">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMProperty *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)propertyName;</Declaration>
<Abstract>
<Para>Retrieve an RLMProperty object by name.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property's name.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMProperty object or nil if there is no property with the given name.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="61">
<Name>isEqualToObjectSchema:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)isEqualToObjectSchema:</USR>
<Declaration>- (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>Returns YES if equal to objectSchema</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>- (NSArray *)properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>- (NSString *)className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Function>
<Function column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>- (RLMProperty *)primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="30">
<Name>RLMSchema</Name>
<USR>c:objc(cs)RLMSchema</USR>
<Declaration>@interface RLMSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents the collection of model object schemas persisted to Realm.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Schemas map to collections of tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="38">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>@property(readwrite, copy, nonatomic) NSArray *objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="48">
<Name>schemaForClassName:</Name>
<USR>c:objc(cs)RLMSchema(im)schemaForClassName:</USR>
<Declaration>- (RLMObjectSchema *)schemaForClassName:(NSString *)className;</Declaration>
<Abstract>
<Para>Returns an RLMObjectSchema for the given class name in this RLMSchema.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object class name. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMObjectSchema for the given class in this RLMSchema.</Para>
</ResultDiscussion>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="59">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMObjectSchema *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)className;</Declaration>
<Abstract>
<Para>Look up an RLMObjectSchema for the given class name in this Realm. Throws if there is no object of type className in this RLMSchema instance.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object class name. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMObjectSchema for the given class in this Realm.</Para>
</ResultDiscussion>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="64">
<Name>isEqualToSchema:</Name>
<USR>c:objc(cs)RLMSchema(im)isEqualToSchema:</USR>
<Declaration>- (BOOL)isEqualToSchema:(RLMSchema *)schema;</Declaration>
<Abstract>
<Para>Returns YES if schema are equal</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" line="38">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>- (NSArray *)objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema_Private.h" line="72">
<Name>RLMSchema</Name>
<USR>c:objc(cs)RLMSchema</USR>
<Declaration>@interface RLMSchema ()
@end</Declaration>
<Abstract>
<Para>This class represents the collection of model object schemas persisted to Realm.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Schemas map to collections of tables in the core database.</Para>
</Discussion>
</Other>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema_Private.h" isInstanceMethod="1" line="73">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>- (void)setObjectSchema:(NSArray *)objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="37">
<Name>RLMArray</Name>
<USR>c:objc(cs)RLMArray</USR>
<Declaration>@interface RLMArray : NSObject &lt;RLMCollection, NSFastEnumeration&gt;
@end</Declaration>
<Abstract>
<Para>RLMArray is the container type in Realm used to define to-many relationships.</Para>
</Abstract>
<Discussion>
<Para>Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. This is referred to in these docs as the “type” of the array.</Para>
<Para>RLMArrays can be queried with the same predicates as RLMObject and RLMResults.</Para>
<Para>RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Discussion>
</Other>
<Other column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="47">
<Name>count</Name>
<USR>c:objc(cs)RLMArray(py)count</USR>
<Declaration>@property(readonly, assign, nonatomic) NSUInteger count;</Declaration>
<Abstract>
<Para>Number of objects in the array.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="52">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMArray(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMArray.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="57">
<Name>realm</Name>
<USR>c:objc(cs)RLMArray(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this array is persisted. Returns nil for standalone arrays.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="73">
<Name>objectAtIndex:</Name>
<USR>c:objc(cs)RLMArray(im)objectAtIndex:</USR>
<Declaration>- (id)objectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Returns the object at the index specified.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The index to look up.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="82">
<Name>firstObject</Name>
<USR>c:objc(cs)RLMArray(im)firstObject</USR>
<Declaration>- (id)firstObject;</Declaration>
<Abstract>
<Para>Returns the first object in the array.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="91">
<Name>lastObject</Name>
<USR>c:objc(cs)RLMArray(im)lastObject</USR>
<Declaration>- (id)lastObject;</Declaration>
<Abstract>
<Para>Returns the last object in the array.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="109">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMArray(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds an object to the end of the array.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="119">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMArray(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)objects;</Declaration>
<Abstract>
<Para>Adds an array of objects at the end of the array.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>objects</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects of the same class as this RLMArray.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="131">
<Name>insertObject:atIndex:</Name>
<USR>c:objc(cs)RLMArray(im)insertObject:atIndex:</USR>
<Declaration>- (void)insertObject:(RLMObject *)anObject atIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Inserts an object at the given index.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>anObject</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector). </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>index</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index at which the object is inserted.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="142">
<Name>removeObjectAtIndex:</Name>
<USR>c:objc(cs)RLMArray(im)removeObjectAtIndex:</USR>
<Declaration>- (void)removeObjectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Removes an object at a given index.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index identifying the object to be removed.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="149">
<Name>removeLastObject</Name>
<USR>c:objc(cs)RLMArray(im)removeLastObject</USR>
<Declaration>- (void)removeLastObject;</Declaration>
<Abstract>
<Para>Removes the last object in an RLMArray.</Para>
</Abstract>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="156">
<Name>removeAllObjects</Name>
<USR>c:objc(cs)RLMArray(im)removeAllObjects</USR>
<Declaration>- (void)removeAllObjects;</Declaration>
<Abstract>
<Para>Removes all objects from an RLMArray.</Para>
</Abstract>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="168">
<Name>replaceObjectAtIndex:withObject:</Name>
<USR>c:objc(cs)RLMArray(im)replaceObjectAtIndex:withObject:</USR>
<Declaration>- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(RLMObject *)anObject;</Declaration>
<Abstract>
<Para>Replaces an object at the given index with a new object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index of the object to be replaced. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>anObject</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="185">
<Name>indexOfObject:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObject:</USR>
<Declaration>- (NSUInteger)indexOfObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Querying an Array</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Gets the index of an object.</Para>
<Para>Returns NSNotFound if the object is not found in this RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="194">
<Name>indexOfObjectWhere:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObjectWhere:</USR>
<Declaration>- (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="203">
<Name>indexOfObjectWithPredicate:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObjectWithPredicate:</USR>
<Declaration>- (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="212">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMArray(im)objectsWhere:</USR>
<Declaration>- (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMArray.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="221">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMArray(im)objectsWithPredicate:</USR>
<Declaration>- (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMArray.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="231">
<Name>sortedResultsUsingProperty:ascending:</Name>
<USR>c:objc(cs)RLMArray(im)sortedResultsUsingProperty:ascending:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingProperty:(NSString *)property
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Get a sorted RLMResults from an RLMArray</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name to sort by. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>ascending</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The direction to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="240">
<Name>sortedResultsUsingDescriptors:</Name>
<USR>c:objc(cs)RLMArray(im)sortedResultsUsingDescriptors:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingDescriptors:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Get a sorted RLMResults from an RLMArray</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>properties</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array of `RLMSortDescriptor`s to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified properties.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="258">
<Name>init</Name>
<USR>c:objc(cs)RLMArray(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>-[RLMArray init] is not available because RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMArrays cannot be created directly</Unavailable>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isClassMethod="1" line="264">
<Name>new</Name>
<USR>c:objc(cs)RLMArray(cm)new</USR>
<Declaration>+ (instancetype) new;</Declaration>
<Abstract>
<Para>+[RLMArray new] is not available because RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMArrays cannot be created directly</Unavailable>
</Function>
<Function column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="47">
<Name>count</Name>
<USR>c:objc(cs)RLMArray(py)count</USR>
<Declaration>- (NSUInteger)count;</Declaration>
<Abstract>
<Para>Number of objects in the array.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="52">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMArray(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMArray.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="57">
<Name>realm</Name>
<USR>c:objc(cs)RLMArray(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this array is persisted. Returns nil for standalone arrays.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="274">
<Name>RLMSortDescriptor</Name>
<USR>c:objc(cs)RLMSortDescriptor</USR>
<Declaration>@interface RLMSortDescriptor : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMSortDescriptor stores a property name and a sort order for use with `sortedResultsUsingDescriptors:`. It is similar to NSSortDescriptor, but supports only the subset of functionality which can be efficiently run by the query engine. RLMSortDescriptor instances are immutable.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="279">
<Name>property</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)property</USR>
<Declaration>@property(readonly, nonatomic) NSString *property;</Declaration>
<Abstract>
<Para>The name of the property which this sort descriptor orders results by.</Para>
</Abstract>
</Other>
<Other column="38" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="284">
<Name>ascending</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)ascending</USR>
<Declaration>@property(readonly, nonatomic) BOOL ascending;</Declaration>
<Abstract>
<Para>Whether this descriptor sorts in ascending or descending order.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isClassMethod="1" line="289">
<Name>sortDescriptorWithProperty:ascending:</Name>
<USR>c:objc(cs)RLMSortDescriptor(cm)sortDescriptorWithProperty:ascending:</USR>
<Declaration>+ (instancetype)sortDescriptorWithProperty:(NSString *)propertyName
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Returns a new sort descriptor for the given property name and order.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="294">
<Name>reversedSortDescriptor</Name>
<USR>c:objc(cs)RLMSortDescriptor(im)reversedSortDescriptor</USR>
<Declaration>- (instancetype)reversedSortDescriptor;</Declaration>
<Abstract>
<Para>Returns a copy of the receiver with the sort order reversed.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="279">
<Name>property</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)property</USR>
<Declaration>- (NSString *)property;</Declaration>
<Abstract>
<Para>The name of the property which this sort descriptor orders results by.</Para>
</Abstract>
</Function>
<Function column="38" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="284">
<Name>ascending</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)ascending</USR>
<Declaration>- (BOOL)ascending;</Declaration>
<Abstract>
<Para>Whether this descriptor sorts in ascending or descending order.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="299">
<Name>RLMArray</Name>
<USR>c:objc(cs)RLMArray</USR>
<Declaration>@interface RLMArray (Private)
@end</Declaration>
<Abstract>
<Para>RLMArray is the container type in Realm used to define to-many relationships.</Para>
</Abstract>
<Discussion>
<Para>Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. This is referred to in these docs as the “type” of the array.</Para>
<Para>RLMArrays can be queried with the same predicates as RLMObject and RLMResults.</Para>
<Para>RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Discussion>
</Other>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSwiftBridgingHeader.h" line="26">
<Name>RLMArray</Name>
<USR>c:objc(cs)RLMArray</USR>
<Declaration>@interface RLMArray (Swift)
@end</Declaration>
<Abstract>
<Para>RLMArray is the container type in Realm used to define to-many relationships.</Para>
</Abstract>
<Discussion>
<Para>Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. This is referred to in these docs as the “type” of the array.</Para>
<Para>RLMArrays can be queried with the same predicates as RLMObject and RLMResults.</Para>
<Para>RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Discussion>
</Other>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="37">
<Name>RLMArray</Name>
<USR>c:objc(cs)RLMArray</USR>
<Declaration>@interface RLMArray : NSObject &lt;RLMCollection, NSFastEnumeration&gt;
@end</Declaration>
<Abstract>
<Para>RLMArray is the container type in Realm used to define to-many relationships.</Para>
</Abstract>
<Discussion>
<Para>Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. This is referred to in these docs as the “type” of the array.</Para>
<Para>RLMArrays can be queried with the same predicates as RLMObject and RLMResults.</Para>
<Para>RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Discussion>
</Other>
<Other column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="47">
<Name>count</Name>
<USR>c:objc(cs)RLMArray(py)count</USR>
<Declaration>@property(readonly, assign, nonatomic) NSUInteger count;</Declaration>
<Abstract>
<Para>Number of objects in the array.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="52">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMArray(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMArray.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="57">
<Name>realm</Name>
<USR>c:objc(cs)RLMArray(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this array is persisted. Returns nil for standalone arrays.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="73">
<Name>objectAtIndex:</Name>
<USR>c:objc(cs)RLMArray(im)objectAtIndex:</USR>
<Declaration>- (id)objectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Returns the object at the index specified.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The index to look up.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="82">
<Name>firstObject</Name>
<USR>c:objc(cs)RLMArray(im)firstObject</USR>
<Declaration>- (id)firstObject;</Declaration>
<Abstract>
<Para>Returns the first object in the array.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="91">
<Name>lastObject</Name>
<USR>c:objc(cs)RLMArray(im)lastObject</USR>
<Declaration>- (id)lastObject;</Declaration>
<Abstract>
<Para>Returns the last object in the array.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="109">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMArray(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds an object to the end of the array.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An RLMObject of the class contained by this RLMArray.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="119">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMArray(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)objects;</Declaration>
<Abstract>
<Para>Adds an array of objects at the end of the array.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>objects</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects of the same class as this RLMArray.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="131">
<Name>insertObject:atIndex:</Name>
<USR>c:objc(cs)RLMArray(im)insertObject:atIndex:</USR>
<Declaration>- (void)insertObject:(RLMObject *)anObject atIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Inserts an object at the given index.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>anObject</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector). </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>index</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index at which the object is inserted.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="142">
<Name>removeObjectAtIndex:</Name>
<USR>c:objc(cs)RLMArray(im)removeObjectAtIndex:</USR>
<Declaration>- (void)removeObjectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Removes an object at a given index.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index identifying the object to be removed.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="149">
<Name>removeLastObject</Name>
<USR>c:objc(cs)RLMArray(im)removeLastObject</USR>
<Declaration>- (void)removeLastObject;</Declaration>
<Abstract>
<Para>Removes the last object in an RLMArray.</Para>
</Abstract>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="156">
<Name>removeAllObjects</Name>
<USR>c:objc(cs)RLMArray(im)removeAllObjects</USR>
<Declaration>- (void)removeAllObjects;</Declaration>
<Abstract>
<Para>Removes all objects from an RLMArray.</Para>
</Abstract>
<Discussion>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="168">
<Name>replaceObjectAtIndex:withObject:</Name>
<USR>c:objc(cs)RLMArray(im)replaceObjectAtIndex:withObject:</USR>
<Declaration>- (void)replaceObjectAtIndex:(NSUInteger)index withObject:(RLMObject *)anObject;</Declaration>
<Abstract>
<Para>Replaces an object at the given index with a new object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The array index of the object to be replaced. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>anObject</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Throws an exception when called with an index greater than the number of objects in this RLMArray.</Para>
<Para kind="warning">This method can only be called during a write transaction.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="185">
<Name>indexOfObject:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObject:</USR>
<Declaration>- (NSUInteger)indexOfObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Querying an Array</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Gets the index of an object.</Para>
<Para>Returns NSNotFound if the object is not found in this RLMArray.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="194">
<Name>indexOfObjectWhere:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObjectWhere:</USR>
<Declaration>- (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="203">
<Name>indexOfObjectWithPredicate:</Name>
<USR>c:objc(cs)RLMArray(im)indexOfObjectWithPredicate:</USR>
<Declaration>- (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMArray.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="212">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMArray(im)objectsWhere:</USR>
<Declaration>- (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMArray.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="221">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMArray(im)objectsWithPredicate:</USR>
<Declaration>- (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMArray.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="231">
<Name>sortedResultsUsingProperty:ascending:</Name>
<USR>c:objc(cs)RLMArray(im)sortedResultsUsingProperty:ascending:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingProperty:(NSString *)property
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Get a sorted RLMResults from an RLMArray</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name to sort by. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>ascending</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The direction to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="240">
<Name>sortedResultsUsingDescriptors:</Name>
<USR>c:objc(cs)RLMArray(im)sortedResultsUsingDescriptors:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingDescriptors:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Get a sorted RLMResults from an RLMArray</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>properties</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array of `RLMSortDescriptor`s to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified properties.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="258">
<Name>init</Name>
<USR>c:objc(cs)RLMArray(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>-[RLMArray init] is not available because RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMArrays cannot be created directly</Unavailable>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isClassMethod="1" line="264">
<Name>new</Name>
<USR>c:objc(cs)RLMArray(cm)new</USR>
<Declaration>+ (instancetype) new;</Declaration>
<Abstract>
<Para>+[RLMArray new] is not available because RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMArrays cannot be created directly</Unavailable>
</Function>
<Function column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="47">
<Name>count</Name>
<USR>c:objc(cs)RLMArray(py)count</USR>
<Declaration>- (NSUInteger)count;</Declaration>
<Abstract>
<Para>Number of objects in the array.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="52">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMArray(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMArray.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="57">
<Name>realm</Name>
<USR>c:objc(cs)RLMArray(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this array is persisted. Returns nil for standalone arrays.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="274">
<Name>RLMSortDescriptor</Name>
<USR>c:objc(cs)RLMSortDescriptor</USR>
<Declaration>@interface RLMSortDescriptor : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMSortDescriptor stores a property name and a sort order for use with `sortedResultsUsingDescriptors:`. It is similar to NSSortDescriptor, but supports only the subset of functionality which can be efficiently run by the query engine. RLMSortDescriptor instances are immutable.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="279">
<Name>property</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)property</USR>
<Declaration>@property(readonly, nonatomic) NSString *property;</Declaration>
<Abstract>
<Para>The name of the property which this sort descriptor orders results by.</Para>
</Abstract>
</Other>
<Other column="38" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="284">
<Name>ascending</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)ascending</USR>
<Declaration>@property(readonly, nonatomic) BOOL ascending;</Declaration>
<Abstract>
<Para>Whether this descriptor sorts in ascending or descending order.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isClassMethod="1" line="289">
<Name>sortDescriptorWithProperty:ascending:</Name>
<USR>c:objc(cs)RLMSortDescriptor(cm)sortDescriptorWithProperty:ascending:</USR>
<Declaration>+ (instancetype)sortDescriptorWithProperty:(NSString *)propertyName
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Returns a new sort descriptor for the given property name and order.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="294">
<Name>reversedSortDescriptor</Name>
<USR>c:objc(cs)RLMSortDescriptor(im)reversedSortDescriptor</USR>
<Declaration>- (instancetype)reversedSortDescriptor;</Declaration>
<Abstract>
<Para>Returns a copy of the receiver with the sort order reversed.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="279">
<Name>property</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)property</USR>
<Declaration>- (NSString *)property;</Declaration>
<Abstract>
<Para>The name of the property which this sort descriptor orders results by.</Para>
</Abstract>
</Function>
<Function column="38" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" isInstanceMethod="1" line="284">
<Name>ascending</Name>
<USR>c:objc(cs)RLMSortDescriptor(py)ascending</USR>
<Declaration>- (BOOL)ascending;</Declaration>
<Abstract>
<Para>Whether this descriptor sorts in ascending or descending order.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMArray.h" line="299">
<Name>RLMArray</Name>
<USR>c:objc(cs)RLMArray</USR>
<Declaration>@interface RLMArray (Private)
@end</Declaration>
<Abstract>
<Para>RLMArray is the container type in Realm used to define to-many relationships.</Para>
</Abstract>
<Discussion>
<Para>Unlike an NSArray, RLMArrays hold a single type, specified by the `objectClassName` property. This is referred to in these docs as the “type” of the array.</Para>
<Para>RLMArrays can be queried with the same predicates as RLMObject and RLMResults.</Para>
<Para>RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.</Para>
</Discussion>
</Other>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="37">
<Name>RLMMigration</Name>
<USR>c:objc(cs)RLMMigration</USR>
<Declaration>@interface RLMMigration : NSObject
@end</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Realm Migrations</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>RLMMigration is the object passed into a user defined RLMMigrationBlock when updating the version of an RLMRealm instance.</Para>
<Para>This object provides access to the RLMSchema current to this migration.</Para>
</Discussion>
</Other>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="43">
<Name>oldSchema</Name>
<USR>c:objc(cs)RLMMigration(py)oldSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *oldSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm before the migration is applied.</Para>
</Abstract>
</Other>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" line="49">
<Name>newSchema</Name>
<USR>c:objc(cs)RLMMigration(py)newSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *newSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm after applying a migration.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="66">
<Name>enumerateObjects:block:</Name>
<USR>c:objc(cs)RLMMigration(im)enumerateObjects:block:</USR>
<Declaration>- (void)enumerateObjects:(NSString *)className
block:(__strong RLMObjectMigrationBlock)block;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject class to enumerate.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Altering Objects during a Migration</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Enumerates objects of a given type in this Realm, providing both the old and new versions of each object. Objects properties can be accessed using keyed subscripting.</Para>
<Para kind="warning">All objects returned are of a type specific to the current migration and should not be casted to className. Instead you should access them as RLMObjects and use keyed subscripting to access properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="79">
<Name>createObject:withObject:</Name>
<USR>c:objc(cs)RLMMigration(im)createObject:withObject:</USR>
<Declaration>- (RLMObject *)createObject:(NSString *)className withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject of type `className` in the Realm being migrated.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the RLMObject class to create. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The value used to populate the created object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="86">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMMigration(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from a Realm during a migration. This can be called within `enumerateObjects:block:`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from the Realm being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMMigration.h" isInstanceMethod="1" line="43">
<Name>oldSchema</Name>
<USR>c:objc(cs)RLMMigration(py)oldSchema</USR>
<Declaration>- (RLMSchema *)oldSchema;</Declaration>
<Abstract>
<Para>Get the new RLMSchema for the migration. This is the schema which describes the RLMRealm before the migration is applied.</Para>
</Abstract>
</Function>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:RLMConstants.h@T@RLMPropertyAttributes</USR>
<Declaration>typedef enum RLMPropertyAttributes RLMPropertyAttributes</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyAttributes</Name>
<USR>c:@E@RLMPropertyAttributes</USR>
<Declaration>enum RLMPropertyAttributes : NSUInteger {}</Declaration>
<Abstract>
<Para>Attributes which can be returned when implementing attributesForProperty:</Para>
</Abstract>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="28">
<Name>RLMPropertyAttributeIndexed</Name>
<USR>c:@E@RLMPropertyAttributes@RLMPropertyAttributeIndexed</USR>
<Declaration>RLMPropertyAttributeIndexed = 1 &lt;&lt; 2</Declaration>
<Abstract>
<Para>Create an index for this property for improved search performance. Only string properties can be indexed. Returning this for properties of any other type will have no effect.</Para>
</Abstract>
</Variable>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Typedef column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:RLMConstants.h@T@RLMPropertyType</USR>
<Declaration>typedef enum RLMPropertyType RLMPropertyType</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Typedef>
<Enum column="1" line="1">
<Name>RLMPropertyType</Name>
<USR>c:@E@RLMPropertyType</USR>
<Declaration>enum RLMPropertyType : int32_t {}</Declaration>
<Abstract>
<Para>Property types supported in Realm models.</Para>
</Abstract>
<Discussion>
<Para>See [Realm Models](http://realm.io/docs/cocoa/latest/#models)</Para>
</Discussion>
</Enum>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="95">
<Name>RLMPropertyTypeInt</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeInt</USR>
<Declaration>RLMPropertyTypeInt = 0</Declaration>
<Abstract>
<Para>Integer type: NSInteger, int, long, Int (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="97">
<Name>RLMPropertyTypeBool</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeBool</USR>
<Declaration>RLMPropertyTypeBool = 1</Declaration>
<Abstract>
<Para>Boolean type: BOOL, bool, Bool (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="99">
<Name>RLMPropertyTypeFloat</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeFloat</USR>
<Declaration>RLMPropertyTypeFloat = 9</Declaration>
<Abstract>
<Para>Float type: CGFloat (32bit), float, Float (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="101">
<Name>RLMPropertyTypeDouble</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDouble</USR>
<Declaration>RLMPropertyTypeDouble = 10</Declaration>
<Abstract>
<Para>Double type: CGFloat (64bit), double, Double (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="108">
<Name>RLMPropertyTypeString</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeString</USR>
<Declaration>RLMPropertyTypeString = 2</Declaration>
<Abstract>
<Para>String type: NSString, String (Swift) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="110">
<Name>RLMPropertyTypeData</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeData</USR>
<Declaration>RLMPropertyTypeData = 4</Declaration>
<Abstract>
<Para>Data type: NSData </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="112">
<Name>RLMPropertyTypeAny</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeAny</USR>
<Declaration>RLMPropertyTypeAny = 6</Declaration>
<Abstract>
<Para>Any type: id, **not supported in Swift** </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="114">
<Name>RLMPropertyTypeDate</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeDate</USR>
<Declaration>RLMPropertyTypeDate = 7</Declaration>
<Abstract>
<Para>Date type: NSDate </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="121">
<Name>RLMPropertyTypeObject</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeObject</USR>
<Declaration>RLMPropertyTypeObject = 12</Declaration>
<Abstract>
<Para>Object type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="123">
<Name>RLMPropertyTypeArray</Name>
<USR>c:@E@RLMPropertyType@RLMPropertyTypeArray</USR>
<Declaration>RLMPropertyTypeArray = 13</Declaration>
<Abstract>
<Para>Array type. See [Realm Models](http://realm.io/docs/cocoa/latest/#models) </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="160">
<Name>RLMErrorFail</Name>
<USR>c:@E@RLMError@RLMErrorFail</USR>
<Declaration>RLMErrorFail = 1</Declaration>
<Abstract>
<Para>Retuned by RLMRealm if no other specific error is returned when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="162">
<Name>RLMErrorFileAccessError</Name>
<USR>c:@E@RLMError@RLMErrorFileAccessError</USR>
<Declaration>RLMErrorFileAccessError = 2</Declaration>
<Abstract>
<Para>Returned by RLMRealm for any I/O related exception scenarios when a realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="165">
<Name>RLMErrorFilePermissionDenied</Name>
<USR>c:@E@RLMError@RLMErrorFilePermissionDenied</USR>
<Declaration>RLMErrorFilePermissionDenied = 3</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the user does not have permission to open or create the specified file in the specified access mode when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="167">
<Name>RLMErrorFileExists</Name>
<USR>c:@E@RLMError@RLMErrorFileExists</USR>
<Declaration>RLMErrorFileExists = 4</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file did already exist when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="169">
<Name>RLMErrorFileNotFound</Name>
<USR>c:@E@RLMError@RLMErrorFileNotFound</USR>
<Declaration>RLMErrorFileNotFound = 5</Declaration>
<Abstract>
<Para>Returned by RLMRealm if no_create was specified and the file was not found when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="171">
<Name>RLMErrorStaleLockFile</Name>
<USR>c:@E@RLMError@RLMErrorStaleLockFile</USR>
<Declaration>RLMErrorStaleLockFile = 6</Declaration>
<Abstract>
<Para>Returned by RLMRealm if a stale .lock file is present when the realm is opened. </Para>
</Abstract>
</Variable>
<Variable column="5" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMConstants.h" line="175">
<Name>RLMErrorLockFileButNoData</Name>
<USR>c:@E@RLMError@RLMErrorLockFileButNoData</USR>
<Declaration>RLMErrorLockFileButNoData = 7</Declaration>
<Abstract>
<Para>Returned by RLMRealm if the database file is deleted while there are open realms, and subsequent attempts to open realms will try to join an already active shared scheme, but fail due to the missing database file. </Para>
</Abstract>
</Variable>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="74">
<Name>RLMObject</Name>
<USR>c:objc(cs)RLMObject</USR>
<Declaration>@interface RLMObject : RLMObjectBase
@end</Declaration>
<Abstract>
<Para>In Realm you define your model classes by subclassing RLMObject and adding properties to be persisted. You then instantiate and use your custom subclasses instead of using the RLMObject class directly.</Para>
</Abstract>
<Discussion>
<Para>// Dog.h </Para>
<Para/>
<Para>// Dog.m Dog //none needed</Para>
<Para>### Supported property types</Para>
<Para>- `NSString` - `NSInteger`, `CGFloat`, `int`, `long`, `float`, and `double` - `BOOL` or `bool` - `NSDate` - `NSData` - RLMObject subclasses, so you can have many-to-one relationships. - `RLMArray&lt;X&gt;`, where X is an RLMObject subclass, so you can have many-to-many relationships.</Para>
<Para>### Attributes for Properties</Para>
<Para>You can set which of these properties should be indexed, stored inline, unique, required as well as delete rules for the links by implementing the attributesForProperty: method.</Para>
<Para>You can set properties to ignore (i.e. transient properties you do not want persisted to a Realm) by implementing ignoredProperties.</Para>
<Para>You can set default values for properties by implementing defaultPropertyValues.</Para>
<Para>### Querying</Para>
<Para>You can query an object directly via the class methods: allObjects, objectsWhere:, objectsOrderedBy:where: and objectForKeyedSubscript: These methods allow you to easily query a custom subclass for instances of this class in the default Realm. To search in a Realm other than the default Realm use the interface on an RLMRealm instance.</Para>
<Para>### Relationships</Para>
<Para>See our [Cocoa guide](http://realm.io/docs/cocoa/latest) for more details.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="89">
<Name>init</Name>
<USR>c:objc(cs)RLMObject(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="100">
<Name>initWithObject:</Name>
<USR>c:objc(cs)RLMObject(im)initWithObject:</USR>
<Declaration>- (instancetype)initWithObject:(id)object;</Declaration>
<Abstract>
<Para>Initialize a standalone RLMObject with values from an NSArray or NSDictionary</Para>
</Abstract>
<Discussion>
<Para>Initialize an unpersisted instance of this object. Call addObject: on an RLMRealm to add standalone object to a realm.</Para>
<Para kind="see">[RLMRealm addObject:]:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="108">
<Name>className</Name>
<USR>c:objc(cs)RLMObject(cm)className</USR>
<Declaration>+ (NSString *)className;</Declaration>
<Abstract>
<Para>Helper to return the class name for an RLMObject subclass.</Para>
</Abstract>
<ResultDiscussion>
<Para>The class name for the model class.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="125">
<Name>createInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the default Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="143">
<Name>createInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createInRealm:withObject:</USR>
<Declaration>+ (instancetype)createInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create an RLMObject in a Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>Creates an instance of this object and adds it to the given Realm populating the object with the given object.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="161">
<Name>createOrUpdateInDefaultRealmWithObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInDefaultRealmWithObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInDefaultRealmWithObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject in the default Realm with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the default RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the default Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="180">
<Name>createOrUpdateInRealm:withObject:</Name>
<USR>c:objc(cs)RLMObject(cm)createOrUpdateInRealm:withObject:</USR>
<Declaration>+ (instancetype)createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)object;</Declaration>
<Abstract>
<Para>Create or update an RLMObject with a given object.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm in which this object is persisted. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>object</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object used to populate the object. This can be any key/value coding compliant object, or a JSON object such as those returned from the methods in NSJSONSerialization, or an NSArray with one object for each persisted property. An exception will be thrown if any required properties are not present and no default is set.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This method can only be called on object types with a primary key defined. If there is already an object with the same primary key value in the provided RLMRealm its values are updated and the object is returned. Otherwise this creates and populates a new instance of this object in the provided Realm.</Para>
<Para>When passing in an NSArray, all properties must be present, valid and in the same order as the properties defined in the model.</Para>
<Para kind="see">defaultPropertyValues, primaryKey</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Other>
<Other column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>@property(readonly, nonatomic) RLMObjectSchema *objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Other>
<Other column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>@property(readonly, getter=isInvalidated, nonatomic) BOOL invalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="230">
<Name>attributesForProperty:</Name>
<USR>c:objc(cs)RLMObject(cm)attributesForProperty:</USR>
<Declaration>+ (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName;</Declaration>
<Abstract>
<Para>Implement to set custom attributes for each property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Name of property for which attributes have been requested. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Bitmask of property attributes for the given property.</Para>
</ResultDiscussion>
<Discussion>
<Para>The default attributes for each property should be obtained by calling `[super attributesForProperty:propertyName]`, and then ORed together with the attributes you wish to add. For example, to index a single property:</Para>
<Para/>
<Para>Model + (RLMPropertyAttributes)attributesForProperty:(NSString *)propertyName { RLMPropertyAttributes attributes = [super attributesForProperty:propertyName]; if ([propertyName isEqualToString:&quot;indexedProperty&quot;]) { attributes |= RLMPropertyAttributeIndexed; } return attributes; } </Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="237">
<Name>defaultPropertyValues</Name>
<USR>c:objc(cs)RLMObject(cm)defaultPropertyValues</USR>
<Declaration>+ (NSDictionary *)defaultPropertyValues;</Declaration>
<Abstract>
<Para>Implement to indicate the default values to be used for each property.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSDictionary mapping property names to their default values.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="247">
<Name>primaryKey</Name>
<USR>c:objc(cs)RLMObject(cm)primaryKey</USR>
<Declaration>+ (NSString *)primaryKey;</Declaration>
<Abstract>
<Para>Implement to designate a property as the primary key for an RLMObject subclass. Only properties of type RLMPropertyTypeString and RLMPropertyTypeInt can be designated as the primary key. Primary key properties enforce uniqueness for each value whenever the property is set which incurs some overhead. Indexes are created automatically for string primary key properties.</Para>
</Abstract>
<ResultDiscussion>
<Para>Name of the property designated as the primary key.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="255">
<Name>ignoredProperties</Name>
<USR>c:objc(cs)RLMObject(cm)ignoredProperties</USR>
<Declaration>+ (NSArray *)ignoredProperties;</Declaration>
<Abstract>
<Para>Implement to return an array of property names to ignore. These properties will not be persisted and are treated as transient.</Para>
</Abstract>
<ResultDiscussion>
<Para>NSArray of property names to ignore.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="268">
<Name>allObjects</Name>
<USR>c:objc(cs)RLMObject(cm)allObjects</USR>
<Declaration>+ (RLMResults *)allObjects;</Declaration>
<Abstract>
<Para>Get all objects of this type from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the default Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="277">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWhere:</USR>
<Declaration>+ (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="287">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsWithPredicate:</USR>
<Declaration>+ (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the default Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the default Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="301">
<Name>objectForPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectForPrimaryKey:</USR>
<Declaration>+ (instancetype)objectForPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the default Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the default Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsWhere:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="316">
<Name>allObjectsInRealm:</Name>
<USR>c:objc(cs)RLMObject(cm)allObjectsInRealm:</USR>
<Declaration>+ (RLMResults *)allObjectsInRealm:(RLMRealm *)realm;</Declaration>
<Abstract>
<Para>Get all objects of this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of all objects of this type in the specified Realm.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="326">
<Name>objectsInRealm:where:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:where:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
where:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicateFormat</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="336">
<Name>objectsInRealm:withPredicate:</Name>
<USR>c:objc(cs)RLMObject(cm)objectsInRealm:withPredicate:</USR>
<Declaration>+ (RLMResults *)objectsInRealm:(RLMRealm *)realm
withPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate for this type from the specified Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realm</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The Realm instance to query.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>predicate</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects of the subclass type in the specified Realm that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isClassMethod="1" line="350">
<Name>objectInRealm:forPrimaryKey:</Name>
<USR>c:objc(cs)RLMObject(cm)objectInRealm:forPrimaryKey:</USR>
<Declaration>+ (instancetype)objectInRealm:(RLMRealm *)realm forPrimaryKey:(id)primaryKey;</Declaration>
<Abstract>
<Para>Get the single object with the given primary key from the specified Realm.</Para>
</Abstract>
<ResultDiscussion>
<Para>An object of the subclass type or nil if an object with the given primary key does not exist. </Para>
</ResultDiscussion>
<Discussion>
<Para>Returns the object from the specified Realm which has the given primary key, or `nil` if the object does not exist. This is slightly faster than the otherwise equivalent `[[SubclassName objectsInRealm:realm where:&quot;primaryKeyPropertyName = %&quot;, key] firstObject]`.</Para>
<Para>This method requires that `primaryKey` be overridden on the receiving subclass.</Para>
<Para kind="see">-primaryKey</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="361">
<Name>linkingObjectsOfClass:forProperty:</Name>
<USR>c:objc(cs)RLMObject(im)linkingObjectsOfClass:forProperty:</USR>
<Declaration>- (NSArray *)linkingObjectsOfClass:(NSString *)className
forProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Get an `NSArray` of objects of type `className` which have this object as the given property value. This can be used to get the inverse relatshionship value for `RLMObject` and `RLMArray` properties.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>className</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The type of object on which the relationship to query is defined. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>property</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The name of the property which defines the relationship.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An NSArray of objects of type `className` which have this object as thier value for the `property` property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="372">
<Name>isEqualToObject:</Name>
<USR>c:objc(cs)RLMObject(im)isEqualToObject:</USR>
<Declaration>- (BOOL)isEqualToObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Returns YES if another RLMObject points to the same object in an RLMRealm. For RLMObject types with a primary, key, `isEqual:` is overridden to use this method (along with a corresponding implementation for `hash`.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The object to compare to.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the object represents the same object in the same RLMRealm.</Para>
</ResultDiscussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="185">
<Name>realm</Name>
<USR>c:objc(cs)RLMObject(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm in which this object is persisted. Returns nil for standalone objects.</Para>
</Abstract>
</Function>
<Function column="50" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="190">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMObject(py)objectSchema</USR>
<Declaration>- (RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>The ObjectSchema which lists the persisted properties for this object.</Para>
</Abstract>
</Function>
<Function column="62" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObject.h" isInstanceMethod="1" line="195">
<Name>invalidated</Name>
<USR>c:objc(cs)RLMObject(py)invalidated</USR>
<Declaration>- (BOOL)isInvalidated;</Declaration>
<Abstract>
<Para>Indicates if an object can no longer be accessed.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="46">
<Name>RLMRealm</Name>
<USR>c:objc(cs)RLMRealm</USR>
<Declaration>@interface RLMRealm : NSObject
@end</Declaration>
<Abstract>
<Para>An RLMRealm instance (also referred to as &quot;a realm&quot;) represents a Realm database.</Para>
</Abstract>
<Discussion>
<Para>Realms can either be stored on disk (see +[RLMRealm realmWithPath:]) or in memory (see +[RLMRealm inMemoryRealmWithIdentifier:]).</Para>
<Para>RLMRealm instances are cached internally, and constructing equivalent RLMRealm objects (with the same path or identifier) multiple times on a single thread within a single iteration of the run loop will normally return the same RLMRealm object. If you specifically want to ensure a RLMRealm object 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 ` {}` and ensure you have no other strong references to it.</Para>
<Para kind="warning">RLMRealm instances are not thread safe and can not be shared across threads or dispatch queues. 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 on a consistent thread.</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="62">
<Name>defaultRealm</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealm</USR>
<Declaration>+ (instancetype)defaultRealm;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>The default `RLMRealm` instance for the current thread.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Creating &amp; Initializing a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Obtains an instance of the default Realm.</Para>
<Para>The default Realm is used by the `RLMObject` class methods which do not take a `RLMRealm` parameter, but is otherwise not special. The default Realm is persisted as default.realm under the Documents directory of your Application on iOS, and in your application's Application Support directory on OS X.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="71">
<Name>realmWithPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted at a specific file path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="94">
<Name>realmWithPath:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance with persistence to a specific file path with options.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Like `realmWithPath:`, but with the ability to open read-only realms and get errors as an `NSError` inout parameter rather than exceptions.</Para>
<Para kind="warning">Read-only Realms do not support changes made to the file while the `RLMRealm` exists. This means that you cannot open a Realm as both read-only and read-write at the same time. Read-only Realms should normally only be used on files which cannot be opened in read-write mode, and not just for enforcing correctness in code that should not need to write to the Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="116">
<Name>realmWithPath:encryptionKey:readOnly:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)realmWithPath:encryptionKey:readOnly:error:</USR>
<Declaration>+ (instancetype)realmWithPath:(NSString *)path
encryptionKey:(NSData *)key
readOnly:(BOOL)readonly
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance persisted to an encrypted file.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to the file you want the data saved in. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte key to use to encrypt the data. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>readonly</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>BOOL indicating if this Realm is read-only (must use for read-only files) </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>3</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An encrypted `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>The on-disk storage for encrypted Realms are encrypted using AES256+HMAC-SHA2, but otherwise they behave like normal persisted Realms.</Para>
<Para>Encrypted Realms currently cannot be opened while lldb is attached to the process since lldb cannot forward mach exceptions to the process being debugged. Attempting to open an encrypted Realm with lldb attached will result in an EXC_BAD_ACCESS.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="136">
<Name>setEncryptionKey:forRealmsAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setEncryptionKey:forRealmsAtPath:</USR>
<Declaration>+ (void)setEncryptionKey:(NSData *)key forRealmsAtPath:(NSString *)path;</Declaration>
<Abstract>
<Para>Set the encryption key to use when opening Realms at a certain path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>key</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to use, or `nil` to unset. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>path</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Realm path to set the encryption key for.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This can be used as an alternative to explicitly passing the key to `encryptedRealmWithPath:key:readOnly:error:` each time a Realm instance is needed. The encryption key will be used any time a Realm is opened with `realmWithPath:` or `defaultRealm`.</Para>
<Para>If you do not want Realm to hold on to your encryption keys any longer than needed, then use `encryptedRealmWithPath:key:readOnly:error:` rather than this method.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="155">
<Name>inMemoryRealmWithIdentifier:</Name>
<USR>c:objc(cs)RLMRealm(cm)inMemoryRealmWithIdentifier:</USR>
<Declaration>+ (instancetype)inMemoryRealmWithIdentifier:(NSString *)identifier;</Declaration>
<Abstract>
<Para>Obtains an `RLMRealm` instance for an un-persisted in-memory Realm. The identifier used to create this instance can be used to access the same in-memory Realm from multiple threads.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>identifier</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A string used to identify a particular in-memory Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An `RLMRealm` instance.</Para>
</ResultDiscussion>
<Discussion>
<Para>Because in-memory Realms are not persisted, you must be sure to hold on to a reference to the `RLMRealm` object returned from this for as long as you want the data to last. Realm's internal cache of `RLMRealm`s will not keep the in-memory Realm alive across cycles of the run loop, so without a strong reference to the `RLMRealm` a new Realm will be created each time. Note that `RLMObject`s, `RLMArray`s, and `RLMResults` that refer to objects persisted in a Realm have a strong reference to the relevant `RLMRealm`, as do `RLMNotifcationToken`s.</Para>
</Discussion>
</Function>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>@property(readonly, nonatomic) NSString *path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Other>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="160">
<Name>path</Name>
<USR>c:objc(cs)RLMRealm(py)path</USR>
<Declaration>- (NSString *)path;</Declaration>
<Abstract>
<Para>Path to the file where this Realm is persisted.</Para>
</Abstract>
</Function>
<Other column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>@property(readonly, getter=isReadOnly, nonatomic) BOOL readOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Other>
<Function column="59" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="165">
<Name>readOnly</Name>
<USR>c:objc(cs)RLMRealm(py)readOnly</USR>
<Declaration>- (BOOL)isReadOnly;</Declaration>
<Abstract>
<Para>Indicates if this Realm was opened in read-only mode.</Para>
</Abstract>
</Function>
<Other column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>@property(readonly, nonatomic) RLMSchema *schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Other>
<Function column="44" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="170">
<Name>schema</Name>
<USR>c:objc(cs)RLMRealm(py)schema</USR>
<Declaration>- (RLMSchema *)schema;</Declaration>
<Abstract>
<Para>The RLMSchema used by this RLMRealm.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="187">
<Name>defaultRealmPath</Name>
<USR>c:objc(cs)RLMRealm(cm)defaultRealmPath</USR>
<Declaration>+ (NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<ResultDiscussion>
<Para>Location of the default Realm.</Para>
</ResultDiscussion>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Default Realm Path</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Returns the location of the default Realm as a string.</Para>
<Para>`~/Application Support/{bundle ID}/default.realm` on OS X.</Para>
<Para>`default.realm` in your application's documents directory on iOS.</Para>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="196">
<Name>setDefaultRealmPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)setDefaultRealmPath:</USR>
<Declaration>+ (void)setDefaultRealmPath:(NSString *)defaultRealmPath;</Declaration>
<Abstract>
<Para>Set the default Realm path to a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>defaultRealmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path to use for the default Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para kind="see">defaultRealm</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="227">
<Name>addNotificationBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)addNotificationBlock:</USR>
<Declaration>- (RLMNotificationToken *)addNotificationBlock:
(__strong RLMNotificationBlock)block;</Declaration>
<Abstract>
<Para>Add a notification handler for changes in this RLMRealm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>block</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>A block which is called to process RLMRealm notifications.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>A token object which can later be passed to `-removeNotification:` to remove this notification.</Para>
</ResultDiscussion>
<Discussion>
<Para>The block has the following definition:</Para>
<Para>typedef void(^RLMNotificationBlock)(NSString *notification, RLMRealm *realm);</Para>
<Para>It receives the following parameters:</Para>
<Para>- `NSString` \***notification**: The name of the incoming notification. See RLMRealmNotification for information on what notifications are sent. - `RLMRealm` \***realm**: The realm for which this notification occurred</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="236">
<Name>removeNotification:</Name>
<USR>c:objc(cs)RLMRealm(im)removeNotification:</USR>
<Declaration>- (void)removeNotification:(RLMNotificationToken *)notificationToken;</Declaration>
<Abstract>
<Para>Remove a previously registered notification handler using the token returned from `-addNotificationBlock:`</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>notificationToken</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The token returned from `-addNotificationBlock:` corresponding to the notification block to remove.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="264">
<Name>beginWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)beginWriteTransaction</USR>
<Declaration>- (void)beginWriteTransaction;</Declaration>
<Abstract>
<Para>Begins a write transaction in an `RLMRealm`.</Para>
</Abstract>
<Discussion>
<Para>Only one write transaction can be open at a time. Write transactions cannot be nested, and trying to begin a write transaction on a `RLMRealm` which is already in a write transaction with throw an exception. Calls to `beginWriteTransaction` from `RLMRealm` instances in other threads will block until the current write transaction completes.</Para>
<Para>Before beginning the write transaction, `beginWriteTransaction` updates the `RLMRealm` to the latest Realm version, as if refresh was called, and generates notifications if applicable. This has no effect if the `RLMRealm` was already up to date.</Para>
<Para>It is rarely a good idea to have write transactions span multiple cycles of the run loop, but if you do wish to do so you will need to ensure that the `RLMRealm` in the write transaction is kept alive until the write transaction is committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="273">
<Name>commitWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)commitWriteTransaction</USR>
<Declaration>- (void)commitWriteTransaction;</Declaration>
<Abstract>
<Para>Commits all writes operations in the current write transaction.</Para>
</Abstract>
<Discussion>
<Para>After this is called the `RLMRealm` reverts back to being read-only.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="300">
<Name>cancelWriteTransaction</Name>
<USR>c:objc(cs)RLMRealm(im)cancelWriteTransaction</USR>
<Declaration>- (void)cancelWriteTransaction;</Declaration>
<Abstract>
<Para>Revert all writes made in the current write transaction and end the transaction.</Para>
</Abstract>
<Discussion>
<Para>This rolls back all objects in the Realm to the state they were in at the beginning of the write transaction, and then ends the transaction.</Para>
<Para>This restores the data for deleted objects, but does not re-validated deleted accessor objects. Any `RLMObject`s which were added to the Realm will be invalidated rather than switching back to standalone objects. Given the following code:</Para>
<Para>ObjectType *oldObject = [[ObjectType objectsWhere:&quot;...&quot;] firstObject]; ObjectType *newObject = [[ObjectType alloc] init];</Para>
<Para>[realm beginWriteTransaction]; [realm addObject:newObject]; [realm deleteObject:oldObject]; [realm cancelWriteTransaction];</Para>
<Para>Both `oldObject` and `newObject` will return `YES` for `isInvalidated`, but re-running the query which provided `oldObject` will once again return the valid object.</Para>
<Para>Calling this when not in a write transaction will throw an exception.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="305">
<Name>transactionWithBlock:</Name>
<USR>c:objc(cs)RLMRealm(im)transactionWithBlock:</USR>
<Declaration>- (void)transactionWithBlock:(void (^__strong)(void))block;</Declaration>
<Abstract>
<Para>Helper to perform a block within a transaction.</Para>
</Abstract>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="312">
<Name>refresh</Name>
<USR>c:objc(cs)RLMRealm(im)refresh</USR>
<Declaration>- (BOOL)refresh;</Declaration>
<Abstract>
<Para>Update an `RLMRealm` and outstanding objects to point to the most recent data for this `RLMRealm`.</Para>
</Abstract>
<ResultDiscussion>
<Para>Whether the realm had any updates. Note that this may return YES even if no data has actually changed.</Para>
</ResultDiscussion>
</Function>
<Other column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>@property(assign, readwrite, nonatomic) BOOL autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Other>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="28" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="339">
<Name>autorefresh</Name>
<USR>c:objc(cs)RLMRealm(py)autorefresh</USR>
<Declaration>- (void)setAutorefresh:(BOOL)autorefresh;</Declaration>
<Abstract>
<Para>Set to YES to automatically update this Realm when changes happen in other threads.</Para>
</Abstract>
<Discussion>
<Para>If set to YES (the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set to NO, you must manually call -refresh on the Realm to update it to get the latest version.</Para>
<Para>Even with this enabled, you can still call -refresh at any time to update the Realm before the automatic refresh would occur.</Para>
<Para>Notifications are sent when a write transaction is committed whether or not this is enabled.</Para>
<Para>Disabling this on an `RLMRealm` without any strong references to it will not have any effect, and it will switch back to YES the next time the `RLMRealm` object is created. This is normally irrelevant as it means that there is nothing to refresh (as persisted `RLMObject`s, `RLMArray`s, and `RLMResults` have strong references to the containing `RLMRealm`), but it means that setting `RLMRealm.defaultRealm.autorefresh = NO` in `application:didFinishLaunchingWithOptions:` and only later storing Realm objects will not work.</Para>
<Para>Defaults to YES.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="353">
<Name>writeCopyToPath:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write a compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="368">
<Name>writeCopyToPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(im)writeCopyToPath:encryptionKey:error:</USR>
<Declaration>- (BOOL)writeCopyToPath:(NSString *)path
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Write an encrypted and compacted copy of the RLMRealm to the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>path</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to save the Realm to. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key to encrypt the new file with </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>YES if the realm was copied successfully. Returns NO if an error occurred.</Para>
</ResultDiscussion>
<Discussion>
<Para>The destination file cannot already exist.</Para>
<Para>Note that if this is called from within a write transaction it writes thecurrent* data, and not data when the last write transaction was committed.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="390">
<Name>invalidate</Name>
<USR>c:objc(cs)RLMRealm(im)invalidate</USR>
<Declaration>- (void)invalidate;</Declaration>
<Abstract>
<Para>Invalidate all RLMObjects and RLMResults read from this Realm.</Para>
</Abstract>
<Discussion>
<Para>An RLMRealm holds a read lock on the version of the data accessed by it, so that changes made to the Realm on different threads do not modify or delete the data seen by this RLMRealm. Calling this method releases the read lock, allowing the space used on disk to be reused by later write transactions rather than growing the file. This method should be called before performing long blocking operations on a background thread on which you previously read data from the Realm which you no longer need.</Para>
<Para>All `RLMObject`, `RLMResults` and `RLMArray` instances obtained from this `RLMRealm` on the current thread are invalidated, and can not longer be used. The `RLMRealm` itself remains valid, and a new read transaction is implicitly begun the next time data is read from the Realm.</Para>
<Para>Calling this method multiple times in a row without reading any data from the Realm, or before ever reading any data from the Realm is a no-op. This method cannot be called on a read-only Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="414">
<Name>addObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addObject:</USR>
<Declaration>- (void)addObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Adding and Removing Objects from a Realm</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Adds an object to be persisted it in this Realm.</Para>
<Para>Once added, this object can be retrieved using the `objectsWhere:` selectors on `RLMRealm` and on subclasses of `RLMObject`. When added, all linked (child) objects referenced by this object will also be added to the Realm if they are not already in it. If the object or any linked objects already belong to a different Realm an exception will be thrown. Use `-[RLMObject createInRealm:withObject]` to insert a copy of a persisted object into a different Realm.</Para>
<Para>The object to be added must be valid and cannot have been previously deleted from a Realm (i.e. `isInvalidated`) must be false.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="426">
<Name>addObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)addObjects:</USR>
<Declaration>- (void)addObjects:(id&lt;NSFastEnumeration&gt;)array;</Declaration>
<Abstract>
<Para>Adds objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An enumerable object such as NSArray or RLMResults which contains objects to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addObject:` except for an array of objects.</Para>
<Para kind="see">addObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="439">
<Name>addOrUpdateObject:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObject:</USR>
<Declaration>- (void)addOrUpdateObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Adds or updates an object to be persisted it in this Realm. The object provided must have a designated primary key. If no objects exist in the RLMRealm instance with the same primary key value, the object is inserted. Otherwise, the existing object is updated with any changed values.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be added or updated.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>As with `addObject:`, the object cannot already be persisted in a different Realm. Use `-[RLMObject createOrUpdateInRealm:withObject:]` to copy values to a different Realm.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="450">
<Name>addOrUpdateObjectsFromArray:</Name>
<USR>c:objc(cs)RLMRealm(im)addOrUpdateObjectsFromArray:</USR>
<Declaration>- (void)addOrUpdateObjectsFromArray:(id)array;</Declaration>
<Abstract>
<Para>Adds or updates objects in the given array to be persisted it in this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`NSArray`, `RLMArray`, or `RLMResults` of `RLMObject`s (or subclasses) to be added to this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Para>This is the equivalent of `addOrUpdateObject:` except for an array of objects.</Para>
<Para kind="see">addOrUpdateObject:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="457">
<Name>deleteObject:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObject:</USR>
<Declaration>- (void)deleteObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>Delete an object from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Object to be deleted from this Realm.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="464">
<Name>deleteObjects:</Name>
<USR>c:objc(cs)RLMRealm(im)deleteObjects:</USR>
<Declaration>- (void)deleteObjects:(id)array;</Declaration>
<Abstract>
<Para>Delete an `NSArray`, `RLMArray`, or `RLMResults` of objects from this Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>array</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMArray`, `NSArray`, or `RLMResults` of `RLMObject`s to be deleted.</Para>
</Discussion>
</Parameter>
</Parameters>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isInstanceMethod="1" line="469">
<Name>deleteAllObjects</Name>
<USR>c:objc(cs)RLMRealm(im)deleteAllObjects</USR>
<Declaration>- (void)deleteAllObjects;</Declaration>
<Abstract>
<Para>Deletes all objects in this Realm.</Para>
</Abstract>
</Function>
<Function column="16" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" line="486">
<Name>RLMMigrationBlock</Name>
<USR>c:RLMRealm.h@T@RLMMigrationBlock</USR>
<Declaration>typedef void (^RLMMigrationBlock)(RLMMigration *__strong, NSUInteger)</Declaration>
<Abstract>
<Para>Migration block used to migrate a Realm.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>migration</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>`RLMMigration` object used to perform the migration. The migration object allows you to enumerate and alter any existing objects which require migration.</Para>
</Discussion>
</Parameter>
<Parameter>
<Name>oldSchemaVersion</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The schema version of the `RLMRealm` being migrated.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Schema version number for the `RLMRealm` after completing the migration. Must be greater than `oldSchemaVersion`.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="518">
<Name>setSchemaVersion:withMigrationBlock:</Name>
<USR>c:objc(cs)RLMRealm(cm)setSchemaVersion:withMigrationBlock:</USR>
<Declaration>+ (void)setSchemaVersion:(NSUInteger)version
withMigrationBlock:(__strong RLMMigrationBlock)block;</Declaration>
<Abstract>
<Para>Specify a schema version and an associated migration block which is applied when opening any Realm with and old schema version.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>version</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The current schema version. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>block</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The block which migrates the Realm to the current version. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>Before you can open an existing `RLMRealm` which has a different on-disk schema from the schema defined in your object interfaces you must provide a migration block which converts from the disk schema to your current object schema. At the minimum your migration block must initialize any properties which were added to existing objects without defaults and ensure uniqueness if a primary key property is added to an existing object.</Para>
<Para>You should call this method before accessing any `RLMRealm` instances which require migration. After registering your migration block Realm will call your block automatically as needed.</Para>
<Para kind="warning">Unsuccessful migrations will throw exceptions when the migration block is applied. This will happen in the following cases:</Para>
<Para>- The migration block was run and returns a schema version which is not higher than the previous schema version. - A new property without a default was added to an object and not initialized during the migration. You are required to either supply a default value or to manually populate added properties during a migration.</Para>
<Para kind="see">RLMMigration</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="530">
<Name>schemaVersionAtPath:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for a Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="543">
<Name>schemaVersionAtPath:encryptionKey:error:</Name>
<USR>c:objc(cs)RLMRealm(cm)schemaVersionAtPath:encryptionKey:error:</USR>
<Declaration>+ (NSUInteger)schemaVersionAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key
error:(NSError *__autoreleasing *)error;</Declaration>
<Abstract>
<Para>Get the schema version for an encrypted Realm at a given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>Path to a Realm file </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>error</Name>
<Index>2</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>If an error occurs, upon return contains an `NSError` object that describes the problem. If you are not interested in possible errors, pass in `NULL`.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The version of the Realm at `realmPath` or RLMNotVersioned if the version cannot be read.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="558">
<Name>migrateRealmAtPath:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath;</Declaration>
<Abstract>
<Para>Performs the registered migration block on a Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>This method is called automatically when opening a Realm for the first time and does not need to be called explicitly. You can choose to call this method to control exactly when and how migrations are performed.</Para>
<Para kind="see">RLMMigration </Para>
<Para kind="see">setSchemaVersion:withMigrationBlock:</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMRealm.h" isClassMethod="1" line="569">
<Name>migrateRealmAtPath:encryptionKey:</Name>
<USR>c:objc(cs)RLMRealm(cm)migrateRealmAtPath:encryptionKey:</USR>
<Declaration>+ (NSError *)migrateRealmAtPath:(NSString *)realmPath
encryptionKey:(NSData *)key;</Declaration>
<Abstract>
<Para>Performs the registered migration block on an encrypted Realm at the given path.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>realmPath</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The path of the Realm to migrate. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>key</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>64-byte encryption key. </Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The error that occurred while applying the migration, if any.</Para>
</ResultDiscussion>
<Discussion>
<Para>As `migrateRealmAtPath:`, but for encrypted realms.</Para>
</Discussion>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="34">
<Name>RLMResults</Name>
<USR>c:objc(cs)RLMResults</USR>
<Declaration>@interface RLMResults : NSObject &lt;RLMCollection, NSFastEnumeration&gt;
@end</Declaration>
<Abstract>
<Para>RLMResults is an auto-updating container type in Realm returned from object queries.</Para>
</Abstract>
<Discussion>
<Para>RLMResults can be queried with the same predicates as RLMObject and RLMArray and you can chain queries to further filter query results.</Para>
<Para>RLMResults cannot be created directly.</Para>
</Discussion>
</Other>
<Other column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>@property(readonly, assign, nonatomic) NSUInteger count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>@property(readonly, nonatomic) RLMRealm *realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="70">
<Name>objectAtIndex:</Name>
<USR>c:objc(cs)RLMResults(im)objectAtIndex:</USR>
<Declaration>- (id)objectAtIndex:(NSUInteger)index;</Declaration>
<Abstract>
<Para>Returns the object at the index specified.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>index</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The index to look up.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="79">
<Name>firstObject</Name>
<USR>c:objc(cs)RLMResults(im)firstObject</USR>
<Declaration>- (id)firstObject;</Declaration>
<Abstract>
<Para>Returns the first object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="88">
<Name>lastObject</Name>
<USR>c:objc(cs)RLMResults(im)lastObject</USR>
<Declaration>- (id)lastObject;</Declaration>
<Abstract>
<Para>Returns the last object in the results.</Para>
</Abstract>
<ResultDiscussion>
<Para>An RLMObject of the class contained by this RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>Returns `nil` if called on an empty RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="106">
<Name>indexOfObject:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObject:</USR>
<Declaration>- (NSUInteger)indexOfObject:(RLMObject *)object;</Declaration>
<Abstract>
<Para>--------------------------------------------------------------------------------------- </Para>
</Abstract>
<Parameters>
<Parameter>
<Name>object</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An object (of the same type as returned from the objectClassName selector).</Para>
</Discussion>
</Parameter>
</Parameters>
<Discussion>
<Verbatim kind="verbatim" xml:space="preserve">Querying Results</Verbatim>
<Para>---------------------------------------------------------------------------------------</Para>
<Para>Gets the index of an object.</Para>
<Para>Returns NSNotFound if the object is not found in this RLMResults.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="115">
<Name>indexOfObjectWhere:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWhere:</USR>
<Declaration>- (NSUInteger)indexOfObjectWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="124">
<Name>indexOfObjectWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)indexOfObjectWithPredicate:</USR>
<Declaration>- (NSUInteger)indexOfObjectWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Gets the index of the first object matching the predicate.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>Index of object or NSNotFound if the object is not found in this RLMResults.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="133">
<Name>objectsWhere:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWhere:</USR>
<Declaration>- (RLMResults *)objectsWhere:(NSString *)predicateFormat, ...;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicateFormat</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate format string which can accept variable arguments.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="142">
<Name>objectsWithPredicate:</Name>
<USR>c:objc(cs)RLMResults(im)objectsWithPredicate:</USR>
<Declaration>- (RLMResults *)objectsWithPredicate:(NSPredicate *)predicate;</Declaration>
<Abstract>
<Para>Get objects matching the given predicate in the RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>predicate</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The predicate to filter the objects.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults of objects that match the given predicate</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="152">
<Name>sortedResultsUsingProperty:ascending:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingProperty:ascending:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingProperty:(NSString *)property
ascending:(BOOL)ascending;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by a property.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property name to sort by. </Para>
</Discussion>
</Parameter>
<Parameter>
<Name>ascending</Name>
<Index>1</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The direction to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified property.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="161">
<Name>sortedResultsUsingDescriptors:</Name>
<USR>c:objc(cs)RLMResults(im)sortedResultsUsingDescriptors:</USR>
<Declaration>- (RLMResults *)sortedResultsUsingDescriptors:(NSArray *)properties;</Declaration>
<Abstract>
<Para>Get a sorted `RLMResults` from an existing `RLMResults` sorted by an `NSArray`` of `RLMSortDescriptor`s.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>properties</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>An array of `RLMSortDescriptor`s to sort by.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>An RLMResults sorted by the specified properties.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="182">
<Name>minOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)minOfProperty:</USR>
<Declaration>- (id)minOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the minimum (lowest) value of the given property</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a minimum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The minimum value for the property amongst objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *min = [results minOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="195">
<Name>maxOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)maxOfProperty:</USR>
<Declaration>- (id)maxOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the maximum (highest) value of the given property of objects in an RLMResults</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to look for a maximum on. Only properties of type int, float, double and NSDate are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The maximum value for the property amongst objects in an RLMResults</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *max = [results maxOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="208">
<Name>sumOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)sumOfProperty:</USR>
<Declaration>- (NSNumber *)sumOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the sum of the given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate sum on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The sum of the given property over all objects in an RLMResults.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *sum = [results sumOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="222">
<Name>averageOfProperty:</Name>
<USR>c:objc(cs)RLMResults(im)averageOfProperty:</USR>
<Declaration>- (NSNumber *)averageOfProperty:(NSString *)property;</Declaration>
<Abstract>
<Para>Returns the average of a given property for objects in an RLMResults.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>property</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property to calculate average on. Only properties of type int, float and double are supported.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>The average for the given property amongst objects in an RLMResults. This will be of type double for both float and double properties.</Para>
</ResultDiscussion>
<Discussion>
<Para>NSNumber *average = [results averageOfProperty:&quot;age&quot;];</Para>
<Para kind="warning">You cannot use this method on RLMObject, RLMArray, and NSData properties.</Para>
</Discussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="239">
<Name>init</Name>
<USR>c:objc(cs)RLMResults(im)init</USR>
<Declaration>- (instancetype)init;</Declaration>
<Abstract>
<Para>-[RLMResults init] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isClassMethod="1" line="245">
<Name>new</Name>
<USR>c:objc(cs)RLMResults(cm)new</USR>
<Declaration>+ (instancetype) new;</Declaration>
<Abstract>
<Para>+[RLMResults new] is not available because RLMResults cannot be created directly. RLMResults can be obtained by querying a Realm.</Para>
</Abstract>
<Unavailable>RLMResults cannot be created directly</Unavailable>
</Function>
<Function column="52" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="44">
<Name>count</Name>
<USR>c:objc(cs)RLMResults(py)count</USR>
<Declaration>- (NSUInteger)count;</Declaration>
<Abstract>
<Para>Number of objects in the results.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="49">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMResults(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>The class name (i.e. type) of the RLMObjects contained in this RLMResults.</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMResults.h" isInstanceMethod="1" line="54">
<Name>realm</Name>
<USR>c:objc(cs)RLMResults(py)realm</USR>
<Declaration>- (RLMRealm *)realm;</Declaration>
<Abstract>
<Para>The Realm this `RLMResults` is associated with.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="31">
<Name>RLMProperty</Name>
<USR>c:objc(cs)RLMProperty</USR>
<Declaration>@interface RLMProperty : NSObject
@end</Declaration>
<Abstract>
<Para>This class models properties persisted to Realm in an RLMObjectSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMProperty objects allow performing migrations and introspecting the database's schema.</Para>
<Para>These properties map to columns in the core database.</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>@property(readonly, nonatomic) NSString *name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyType type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Other>
<Other column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>@property(readonly, nonatomic) RLMPropertyAttributes attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Other>
<Other column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>@property(readonly, copy, nonatomic) NSString *objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="60">
<Name>isEqualToProperty:</Name>
<USR>c:objc(cs)RLMProperty(im)isEqualToProperty:</USR>
<Declaration>- (BOOL)isEqualToProperty:(RLMProperty *)prop;</Declaration>
<Abstract>
<Para>Returns YES if property objects are equal</Para>
</Abstract>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="36">
<Name>name</Name>
<USR>c:objc(cs)RLMProperty(py)name</USR>
<Declaration>- (NSString *)name;</Declaration>
<Abstract>
<Para>Property name.</Para>
</Abstract>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="43">
<Name>type</Name>
<USR>c:objc(cs)RLMProperty(py)type</USR>
<Declaration>- (RLMPropertyType)type;</Declaration>
<Abstract>
<Para>Property type.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyType</Para>
</Discussion>
</Function>
<Function column="55" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="50">
<Name>attributes</Name>
<USR>c:objc(cs)RLMProperty(py)attributes</USR>
<Declaration>- (RLMPropertyAttributes)attributes;</Declaration>
<Abstract>
<Para>Property attributes.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMPropertyAttributes</Para>
</Discussion>
</Function>
<Function column="49" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMProperty.h" isInstanceMethod="1" line="55">
<Name>objectClassName</Name>
<USR>c:objc(cs)RLMProperty(py)objectClassName</USR>
<Declaration>- (NSString *)objectClassName;</Declaration>
<Abstract>
<Para>Object class name - specify object types for RLMObject and RLMArray properties.</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="30">
<Name>RLMObjectSchema</Name>
<USR>c:objc(cs)RLMObjectSchema</USR>
<Declaration>@interface RLMObjectSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents Realm model object schemas persisted to Realm in an RLMSchema.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMObjectSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Object schemas map to tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Other>
<Other column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>@property(readonly, nonatomic) NSString *className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Other>
<Other column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>@property(readonly, nonatomic) RLMProperty *primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="56">
<Name>objectForKeyedSubscript:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)objectForKeyedSubscript:</USR>
<Declaration>- (RLMProperty *)objectForKeyedSubscript:(id&lt;NSCopying&gt;)propertyName;</Declaration>
<Abstract>
<Para>Retrieve an RLMProperty object by name.</Para>
</Abstract>
<Parameters>
<Parameter>
<Name>propertyName</Name>
<Index>0</Index>
<Direction isExplicit="0">in</Direction>
<Discussion>
<Para>The property's name.</Para>
</Discussion>
</Parameter>
</Parameters>
<ResultDiscussion>
<Para>RLMProperty object or nil if there is no property with the given name.</Para>
</ResultDiscussion>
</Function>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="61">
<Name>isEqualToObjectSchema:</Name>
<USR>c:objc(cs)RLMObjectSchema(im)isEqualToObjectSchema:</USR>
<Declaration>- (BOOL)isEqualToObjectSchema:(RLMObjectSchema *)objectSchema;</Declaration>
<Abstract>
<Para>Returns YES if equal to objectSchema</Para>
</Abstract>
</Function>
<Function column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="37">
<Name>properties</Name>
<USR>c:objc(cs)RLMObjectSchema(py)properties</USR>
<Declaration>- (NSArray *)properties;</Declaration>
<Abstract>
<Para>Array of persisted RLMProperty objects for an object.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMProperty</Para>
</Discussion>
</Function>
<Function column="43" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="42">
<Name>className</Name>
<USR>c:objc(cs)RLMObjectSchema(py)className</USR>
<Declaration>- (NSString *)className;</Declaration>
<Abstract>
<Para>The name of the class this schema describes.</Para>
</Abstract>
</Function>
<Function column="46" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMObjectSchema.h" isInstanceMethod="1" line="47">
<Name>primaryKeyProperty</Name>
<USR>c:objc(cs)RLMObjectSchema(py)primaryKeyProperty</USR>
<Declaration>- (RLMProperty *)primaryKeyProperty;</Declaration>
<Abstract>
<Para>The property which is the primary key for this object (if any).</Para>
</Abstract>
</Function>
<Other column="12" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="30">
<Name>RLMSchema</Name>
<USR>c:objc(cs)RLMSchema</USR>
<Declaration>@interface RLMSchema : NSObject &lt;NSCopying&gt;
@end</Declaration>
<Abstract>
<Para>This class represents the collection of model object schemas persisted to Realm.</Para>
</Abstract>
<Discussion>
<Para>When using Realm, RLMSchema objects allow performing migrations and introspecting the database's schema.</Para>
<Para>Schemas map to collections of tables in the core database.</Para>
</Discussion>
</Other>
<Other column="48" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" line="38">
<Name>objectSchema</Name>
<USR>c:objc(cs)RLMSchema(py)objectSchema</USR>
<Declaration>@property(readonly, copy, nonatomic) NSArray *objectSchema;</Declaration>
<Abstract>
<Para>An NSArray containing RLMObjectSchema's for all object types in this Realm. Meant to be used during migrations for dynamic introspection.</Para>
</Abstract>
<Discussion>
<Para kind="see">RLMObjectSchema</Para>
</Discussion>
</Other>
<Function column="1" file="/Users/jp/realm/code/realm-cocoa/Realm/RLMSchema.h" isInstanceMethod="1" lin
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment