Skip to content

Commit

Permalink
Updated services naming and links for documentation
Browse files Browse the repository at this point in the history
Co-authored-by: Dachary <[email protected]>, Lee Maguire <[email protected]>
  • Loading branch information
Pavel Yakimenko and leemaguire authored Jun 2, 2022
1 parent 3232144 commit e362016
Show file tree
Hide file tree
Showing 30 changed files with 92 additions and 85 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
x.y.z Release notes (yyyy-MM-dd)
=============================================================
### Enhancements
* Replace mentions of 'MongoDB Realm' with 'Atlas App Services' in the documentation and update appropriate links to documentation.
* Allow adding a subscription querying for all documents of a type in swift for flexible sync.
```
try await subscriptions.update {
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ Below are some guidelines about the format of the commit message itself:

Realm welcomes all contributions! The only requirement we have is that, like many other projects, we need to have a [Contributor License Agreement](https://en.wikipedia.org/wiki/Contributor_License_Agreement) (CLA) in place before we can accept any external code. Our own CLA is a modified version of the Apache Software Foundation’s CLA.

[Please submit your CLA electronically using our Google form](https://docs.google.com/forms/d/e/1FAIpQLSeQ9ROFaTu9pyrmPhXc-dEnLD84DbLuT_-tPNZDOL9J10tOKQ/viewform) so we can accept your submissions. The GitHub username you file there will need to match that of your Pull Requests. If you have any questions or cannot file the CLA electronically, you can email <help@realm.io>.
[Please submit your CLA electronically using our Google form](https://docs.google.com/forms/d/e/1FAIpQLSeQ9ROFaTu9pyrmPhXc-dEnLD84DbLuT_-tPNZDOL9J10tOKQ/viewform) so we can accept your submissions. The GitHub username you file there will need to match that of your Pull Requests. If you have any questions or cannot file the CLA electronically, you can email <realm-help@mongodb.com>.
4 changes: 2 additions & 2 deletions Realm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Pod::Spec.new do |s|
s.cocoapods_version = '>= 1.10'
s.summary = 'Realm is a modern data framework & database for iOS, macOS, tvOS & watchOS.'
s.description = <<-DESC
The Realm Mobile Database, for Objective-C. (If you want to use Realm from Swift, see the “RealmSwift” pod.)
The Realm Database, for Objective-C. (If you want to use Realm from Swift, see the “RealmSwift” pod.)
The Realm Mobile Database is a fast, easy-to-use replacement for Core Data & SQLite. Use it with MongoDB Realm Sync for realtime, automatic data sync. Works on iOS, macOS, tvOS & watchOS. Learn more and get help at https://realm.io.
Realm is a fast, easy-to-use replacement for Core Data & SQLite. Use it with Atlas Device Sync for realtime, automatic data sync. Works on iOS, macOS, tvOS & watchOS. Learn more and get help at https://www.mongodb.com/docs/realm/sdk/swift/.
DESC
s.homepage = "https://realm.io"
s.source = { :git => 'https://github.com/realm/realm-swift.git', :tag => "v#{s.version}" }
Expand Down
4 changes: 2 additions & 2 deletions Realm/NSError+RLMSync.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ NS_ASSUME_NONNULL_BEGIN
@interface NSError (RLMSync)

/**
Given an appropriate MongoDB Realm error, return the token that
Given an appropriate Atlas App Services error, return the token that
can be passed into `+[RLMSyncSession immediatelyHandleError:]` to
immediately perform error clean-up work, or nil if the error isn't of
a type that provides a token.
*/
- (nullable RLMSyncErrorActionToken *)rlmSync_errorActionToken NS_REFINED_FOR_SWIFT;

/**
Given a MongoDB Realm client reset error, return the path where the
Given an Atlas App Services client reset error, return the path where the
backup copy of the Realm will be placed once the client reset process is
complete.
*/
Expand Down
4 changes: 2 additions & 2 deletions Realm/ObjectServerTests/RealmServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ public class RealmServer: NSObject {
try createAppForSyncMode(.pbs("string"))
}

// Retrieve MongoDB Realm AppId with ClientAppId using the Admin API
// Retrieve Atlas App Services AppId with ClientAppId using the Admin API
public func retrieveAppServerId(_ clientAppId: String) throws -> String {
guard let session = session else {
fatalError()
Expand Down Expand Up @@ -1038,7 +1038,7 @@ public class RealmServer: NSObject {
app.users[userId].get(completion)
}

// Remove User from MongoDB Realm using the Admin API
// Remove User from Atlas App Services using the Admin API
public func removeUserForApp(_ appId: String, userId: String, _ completion: @escaping (Result<Any?, Error>) -> Void) {
guard let appServerId = try? RealmServer.shared.retrieveAppServerId(appId),
let session = session else {
Expand Down
6 changes: 3 additions & 3 deletions Realm/RLMConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
`RLMPropertyType` is an enumeration describing all property types supported in Realm models.
For more information, see [Realm Models](https://realm.io/docs/objc/latest/#models).
For more information, see [Realm Models](https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/object-models-and-schemas/).
*/
typedef RLM_CLOSED_ENUM(int32_t, RLMPropertyType) {

Expand Down Expand Up @@ -75,9 +75,9 @@ typedef RLM_CLOSED_ENUM(int32_t, RLMPropertyType) {

#pragma mark - Linked object types

/** Realm model objects. See [Realm Models](https://realm.io/docs/objc/latest/#models) for more information. */
/** Realm model objects. See [Realm Models](https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/object-models-and-schemas/) for more information. */
RLMPropertyTypeObject = 7,
/** Realm linking objects. See [Realm Models](https://realm.io/docs/objc/latest/#models) for more information. */
/** Realm linking objects. See [Realm Models](https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/relationships/#inverse-relationship) for more information. */
RLMPropertyTypeLinkingObjects = 8,

RLMPropertyTypeObjectId = 10,
Expand Down
8 changes: 4 additions & 4 deletions Realm/RLMCredentials.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ NS_ASSUME_NONNULL_BEGIN
/// A token representing an identity provider's credentials.
typedef NSString *RLMCredentialsToken;

/// A type representing the unique identifier of a MongoDB Realm identity provider.
/// A type representing the unique identifier of an Atlas App Services identity provider.
typedef NSString *RLMIdentityProvider NS_EXTENSIBLE_STRING_ENUM;

/// The username/password identity provider. User accounts are handled by MongoDB Realm directly without the
/// The username/password identity provider. User accounts are handled by Atlas App Services directly without the
/// involvement of a third-party identity provider.
extern RLMIdentityProvider const RLMIdentityProviderUsernamePassword;

Expand Down Expand Up @@ -84,7 +84,7 @@ extern RLMIdentityProvider const RLMIdentityProviderServerAPIKey;
+ (instancetype)credentialsWithAppleToken:(RLMCredentialsToken)token;

/**
Construct and return credentials for a MongoDB Realm function using a mongodb document as a json payload.
Construct and return credentials for an Atlas App Services function using a mongodb document as a json payload.
*/
+ (instancetype)credentialsWithFunctionPayload:(NSDictionary<NSString *, id<RLMBSON>> *)payload;

Expand All @@ -99,7 +99,7 @@ extern RLMIdentityProvider const RLMIdentityProviderServerAPIKey;
+ (instancetype)credentialsWithServerAPIKey:(NSString *)apiKey;

/**
Construct and return MongoDB Realm credentials from an email and password.
Construct and return Atlas App Services credentials from an email and password.
*/
+ (instancetype)credentialsWithEmail:(NSString *)email
password:(NSString *)password;
Expand Down
2 changes: 1 addition & 1 deletion Realm/RLMObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
### Relationships
See our [Cocoa guide](https://realm.io/docs/objc/latest#relationships) for more details.
See our [Realm Swift Documentation](https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/relationships/#relationships) for more details.
### Key-Value Observing
Expand Down
21 changes: 14 additions & 7 deletions Realm/RLMProperty.mm
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ - (BOOL)setTypeFromRawType:(NSString *)rawType {
}
@throw RLMException(@"Property '%@' is of type '%@<%@>' which is not a supported %@ object type. "
@"%@ can only contain instances of RLMObject subclasses. "
@"See https://realm.io/docs/objc/latest/#to-many for more information.", _name, collectionName, _objectClassName, collectionName, collectionName);
@"See https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/relationships/#to-many-relationship "
@"for more information.", _name, collectionName, _objectClassName, collectionName, collectionName);
}
else if (strncmp(code, numberPrefix, numberPrefixLen) == 0) {
auto type = typeFromProtocolString(code + numberPrefixLen);
Expand All @@ -322,7 +323,8 @@ - (BOOL)setTypeFromRawType:(NSString *)rawType {
}
@throw RLMException(@"Property '%@' is of type %s which is not a supported NSNumber object type. "
@"NSNumbers can only be RLMInt, RLMFloat, RLMDouble, and RLMBool at the moment. "
@"See https://realm.io/docs/objc/latest for more information.", _name, code + 1);
@"See https://www.mongodb.com/docs/realm/sdk/swift/data-types/supported-property-types/ "
@"for more information.", _name, code + 1);
}
else if (strncmp(code, linkingObjectsPrefix, linkingObjectsPrefixLen) == 0 &&
(code[linkingObjectsPrefixLen] == '"' || code[linkingObjectsPrefixLen] == '<')) {
Expand Down Expand Up @@ -374,8 +376,10 @@ - (BOOL)setTypeFromRawType:(NSString *)rawType {

if (!cls) {
@throw RLMException(@"Property '%@' is declared as '%@', which is not a supported RLMObject property type. "
@"All properties must be primitives, NSString, NSDate, NSData, NSNumber, RLMArray, RLMSet, RLMDictionary, RLMLinkingObjects, RLMDecimal128, RLMObjectId, or subclasses of RLMObject. "
@"See https://realm.io/docs/objc/latest/api/Classes/RLMObject.html for more information.", _name, className);
@"All properties must be primitives, NSString, NSDate, NSData, NSNumber, RLMArray, RLMSet, "
@"RLMDictionary, RLMLinkingObjects, RLMDecimal128, RLMObjectId, or subclasses of RLMObject. "
@"See https://www.mongodb.com/docs/realm-legacy/docs/objc/latest/api/Classes/RLMObject.html "
@"for more information.", _name, className);
}

_type = RLMPropertyTypeObject;
Expand Down Expand Up @@ -513,7 +517,8 @@ - (instancetype)initSwiftPropertyWithName:(NSString *)name
if (_type == RLMPropertyTypeObject && ![RLMSchema classForString:_objectClassName]) {
@throw RLMException(@"Property '%@' is of type 'RLMArray<%@>' which is not a supported RLMArray object type. "
@"RLMArrays can only contain instances of RLMObject subclasses. "
@"See https://realm.io/docs/objc/latest/#to-many for more information.", _name, _objectClassName);
@"See https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/relationships/#to-many-relationship "
@"for more information.", _name, _objectClassName);
}
}
else if ([rawType isEqualToString:@"@\"RLMSet\""]) {
Expand All @@ -525,7 +530,8 @@ - (instancetype)initSwiftPropertyWithName:(NSString *)name
if (_type == RLMPropertyTypeObject && ![RLMSchema classForString:_objectClassName]) {
@throw RLMException(@"Property '%@' is of type 'RLMSet<%@>' which is not a supported RLMSet object type. "
@"RLMSets can only contain instances of RLMObject subclasses. "
@"See https://realm.io/docs/objc/latest/#to-many for more information.", _name, _objectClassName);
@"See https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/relationships/#to-many-relationship "
@"for more information.", _name, _objectClassName);
}
}
else if ([rawType isEqualToString:@"@\"RLMDictionary\""]) {
Expand All @@ -538,7 +544,8 @@ - (instancetype)initSwiftPropertyWithName:(NSString *)name
if (_type == RLMPropertyTypeObject && ![RLMSchema classForString:_objectClassName]) {
@throw RLMException(@"Property '%@' is of type 'RLMDictionary<KeyType, %@>' which is not a supported RLMDictionary object type. "
@"RLMDictionarys can only contain instances of RLMObject subclasses. "
@"See https://realm.io/docs/objc/latest/#to-many for more information.", _name, _objectClassName);
@"See https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/relationships/#to-many-relationship "
@"for more information.", _name, _objectClassName);
}
}
else if ([rawType isEqualToString:@"@\"NSNumber\""]) {
Expand Down
2 changes: 1 addition & 1 deletion Realm/RLMRealmConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ typedef BOOL (^RLMShouldCompactOnLaunchBlock)(NSUInteger totalBytes, NSUInteger

/**
A configuration object representing configuration state for Realms intended
to sync with MongoDB Realm.
to sync with Atlas Device Sync.
This property is mutually exclusive with both `inMemoryIdentifier` and `fileURL`;
setting any one of the three properties will automatically nil out the other two.
Expand Down
2 changes: 1 addition & 1 deletion Realm/RLMResults.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ __attribute__((warn_unused_result));
parent object.
For more information, please see the "Inverse Relationships" section in the
[documentation](https://realm.io/docs/objc/latest/#relationships).
[documentation](https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/relationships/#relationships).
*/
@interface RLMLinkingObjects<RLMObjectType: RLMObject *> : RLMResults
@end
Expand Down
4 changes: 2 additions & 2 deletions Realm/RLMSyncConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef NS_ENUM(NSUInteger, RLMClientResetMode) {
/// The local copy of the Realm is copied into a recovery
/// directory for safekeeping, and then deleted from the original location. The next time
/// the Realm for that partition value is opened, the Realm will automatically be re-downloaded from
/// MongoDB Realm, and can be used as normal.
/// Atlas App Services, and can be used as normal.

/// Data written to the Realm after the local copy of the Realm diverged from the backup
/// remote copy will be present in the local recovery copy of the Realm file. The
Expand Down Expand Up @@ -77,7 +77,7 @@ typedef void(^RLMClientResetAfterBlock)(RLMRealm * _Nonnull beforeFrozen, RLMRea

/**
The value this Realm is partitioned on. The partition key is a property defined in
MongoDB Realm. All classes with a property with this value will be synchronized to the
Atlas App Services. All classes with a property with this value will be synchronized to the
Realm.
*/
@property (nonatomic, readonly) id<RLMBSON> partitionValue;
Expand Down
4 changes: 2 additions & 2 deletions Realm/RLMSyncManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ typedef void(^RLMSyncErrorReportingBlock)(NSError *, RLMSyncSession * _Nullable)
@property (nonatomic, nullable) RLMSyncLogFunction logger;

/**
The name of the HTTP header to send authorization data in when making requests to MongoDB Realm which has
The name of the HTTP header to send authorization data in when making requests to Atlas App Services which has
been configured to expect a custom authorization header.
*/
@property (nullable, nonatomic, copy) NSString *authorizationHeaderName;

/**
Extra HTTP headers to append to every request to MongoDB Realm.
Extra HTTP headers to append to every request to Atlas App Services.
Modifying this property while sync sessions are active will result in all
sessions disconnecting and reconnecting using the new headers.
Expand Down
14 changes: 7 additions & 7 deletions Realm/RLMSyncSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
typedef NS_ENUM(NSUInteger, RLMSyncSessionState) {
/// The sync session is actively communicating or attempting to communicate
/// with MongoDB Realm. A session is considered Active even if
/// with Atlas App Services. A session is considered Active even if
/// it is not currently connected. Check the connection state instead if you
/// wish to know if the connection is currently online.
RLMSyncSessionStateActive,
Expand All @@ -45,9 +45,9 @@ typedef NS_ENUM(NSUInteger, RLMSyncConnectionState) {
/// to connect, either because the session is inactive or because it is
/// waiting to retry after a failed connection.
RLMSyncConnectionStateDisconnected,
/// The sync session is attempting to connect to MongoDB Realm.
/// The sync session is attempting to connect to Atlas App Services.
RLMSyncConnectionStateConnecting,
/// The sync session is currently connected to MongoDB Realm.
/// The sync session is currently connected to Atlas App Services.
RLMSyncConnectionStateConnected,
};

Expand Down Expand Up @@ -113,9 +113,9 @@ NS_ASSUME_NONNULL_BEGIN
@end

/**
An object encapsulating a MongoDB Realm "session". Sessions represent the
An object encapsulating an Atlas App Services "session". Sessions represent the
communication between the client (and a local Realm file on disk), and the server
(and a remote Realm with a given partition value stored on MongoDB Realm).
(and a remote Realm with a given partition value stored on Atlas App Services).
Sessions are always created by the SDK and vended out through various APIs. The
lifespans of sessions associated with Realms are managed automatically. Session
Expand Down Expand Up @@ -147,13 +147,13 @@ NS_ASSUME_NONNULL_BEGIN
/**
Temporarily suspend syncronization and disconnect from the server.
The session will not attempt to connect to MongoDB Realm until `resume`
The session will not attempt to connect to Atlas App Services until `resume`
is called or the Realm file is closed and re-opened.
*/
- (void)suspend;

/**
Resume syncronization and reconnect to MongoDB Realm after suspending.
Resume syncronization and reconnect to Atlas App Services after suspending.
This is a no-op if the session was already active or if the session is invalid.
Newly created sessions begin in the Active state and do not need to be resumed.
Expand Down
Loading

0 comments on commit e362016

Please sign in to comment.