Skip to content

Commit

Permalink
Clarify default realm configuration documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Aug 11, 2015
1 parent 2c60ee3 commit bfc053d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Realm/RLMConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ RLM_ASSUME_NONNULL_BEGIN
@interface RLMConfiguration : NSObject<NSCopying>

/**
Returns the default configuration used to create realms.
Returns the default configuration used to create Realms when no other
configuration is explicitly specified.
@return The default realm configuration.
@return The default Realm configuration.
*/
+ (instancetype)defaultConfiguration;

/**
Sets the default configuration to the given `RLMConfiguration`.
@param configuration The new default realm configuration.
@param configuration The new default Realm configuration.
*/
+ (void)setDefaultConfiguration:(nullable RLMConfiguration *)configuration;

Expand Down
3 changes: 3 additions & 0 deletions Realm/RLMRealm.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ RLM_ASSUME_NONNULL_BEGIN
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.
The default Realm is created using the default `RLMConfiguration`, which
can be changed via `-[RLMConfiguration setDefaultConfiguration]`.
@return The default `RLMRealm` instance for the current thread.
*/
Expand Down
3 changes: 2 additions & 1 deletion RealmSwift-swift1.2/Realm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public final class Realm {
// MARK: Initializers

/**
Obtains a Realm instance with the given configuration.
Obtains a Realm instance with the given configuration. Defaults to the default Realm configuration,
which can be changed by setting `RealmConfiguration.defaultConfiguration`.

:param: configuration The configuration to use when creating the Realm instance.
:param: error If an error occurs, upon return contains an `NSError` object
Expand Down
3 changes: 2 additions & 1 deletion RealmSwift-swift2.0/Realm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ public final class Realm {
// MARK: Initializers

/**
Obtains a Realm instance with the given configuration. Defaults to the default realm configuration.
Obtains a Realm instance with the given configuration. Defaults to the default Realm configuration,
which can be changed by setting `RealmConfiguration.defaultConfiguration`.

- parameter configuration: The configuration to use when creating the Realm instance.
*/
Expand Down

0 comments on commit bfc053d

Please sign in to comment.