diff --git a/CHANGELOG.md b/CHANGELOG.md index 73ca590c18..c9d566d235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 { diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e488bfb76..fc38d24175 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 . +[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 . diff --git a/Realm.podspec b/Realm.podspec index 05bfe4380d..188f5fc556 100644 --- a/Realm.podspec +++ b/Realm.podspec @@ -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}" } diff --git a/Realm/NSError+RLMSync.h b/Realm/NSError+RLMSync.h index 7ba78a0718..8861ac7e58 100644 --- a/Realm/NSError+RLMSync.h +++ b/Realm/NSError+RLMSync.h @@ -27,7 +27,7 @@ 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. @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN - (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. */ diff --git a/Realm/ObjectServerTests/RealmServer.swift b/Realm/ObjectServerTests/RealmServer.swift index 2fda9e0486..1a7bd510fe 100644 --- a/Realm/ObjectServerTests/RealmServer.swift +++ b/Realm/ObjectServerTests/RealmServer.swift @@ -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() @@ -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) -> Void) { guard let appServerId = try? RealmServer.shared.retrieveAppServerId(appId), let session = session else { diff --git a/Realm/RLMConstants.h b/Realm/RLMConstants.h index f7a257b55a..3a3d167650 100644 --- a/Realm/RLMConstants.h +++ b/Realm/RLMConstants.h @@ -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) { @@ -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, diff --git a/Realm/RLMCredentials.h b/Realm/RLMCredentials.h index 183db8ffa0..8b119b54ae 100644 --- a/Realm/RLMCredentials.h +++ b/Realm/RLMCredentials.h @@ -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; @@ -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> *)payload; @@ -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; diff --git a/Realm/RLMObject.h b/Realm/RLMObject.h index 5c3cee4596..fe03bb411d 100644 --- a/Realm/RLMObject.h +++ b/Realm/RLMObject.h @@ -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 diff --git a/Realm/RLMProperty.mm b/Realm/RLMProperty.mm index 4dd59345ec..4e6fe52cb2 100644 --- a/Realm/RLMProperty.mm +++ b/Realm/RLMProperty.mm @@ -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); @@ -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] == '<')) { @@ -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; @@ -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\""]) { @@ -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\""]) { @@ -538,7 +544,8 @@ - (instancetype)initSwiftPropertyWithName:(NSString *)name if (_type == RLMPropertyTypeObject && ![RLMSchema classForString:_objectClassName]) { @throw RLMException(@"Property '%@' is of type 'RLMDictionary' 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\""]) { diff --git a/Realm/RLMRealmConfiguration.h b/Realm/RLMRealmConfiguration.h index 9b2269f341..f61c90475d 100644 --- a/Realm/RLMRealmConfiguration.h +++ b/Realm/RLMRealmConfiguration.h @@ -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. diff --git a/Realm/RLMResults.h b/Realm/RLMResults.h index 91d2c90426..7bfe001a15 100644 --- a/Realm/RLMResults.h +++ b/Realm/RLMResults.h @@ -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 : RLMResults @end diff --git a/Realm/RLMSyncConfiguration.h b/Realm/RLMSyncConfiguration.h index 367b52a12d..491d5693e9 100644 --- a/Realm/RLMSyncConfiguration.h +++ b/Realm/RLMSyncConfiguration.h @@ -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 @@ -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 partitionValue; diff --git a/Realm/RLMSyncManager.h b/Realm/RLMSyncManager.h index 1eb8456b39..7fab3ee2cd 100644 --- a/Realm/RLMSyncManager.h +++ b/Realm/RLMSyncManager.h @@ -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. diff --git a/Realm/RLMSyncSession.h b/Realm/RLMSyncSession.h index 4f20437dc5..0602769efa 100644 --- a/Realm/RLMSyncSession.h +++ b/Realm/RLMSyncSession.h @@ -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, @@ -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, }; @@ -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 @@ -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. diff --git a/Realm/RLMSyncUtil.h b/Realm/RLMSyncUtil.h index 5293a861f8..bc445d4537 100644 --- a/Realm/RLMSyncUtil.h +++ b/Realm/RLMSyncUtil.h @@ -18,7 +18,7 @@ #import -/// A token originating from MongoDB Realm. +/// A token originating from Atlas App Services. typedef NSString* RLMServerToken; NS_ASSUME_NONNULL_BEGIN @@ -43,7 +43,7 @@ extern NSString *const RLMSyncErrorDomain; extern NSString *const RLMSyncAuthErrorDomain; /** -The error domain string for all SDK errors related to the MongoDB Realm +The error domain string for all SDK errors related to the Atlas App Services endpoint. */ extern NSString *const RLMAppErrorDomain; @@ -74,7 +74,7 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMSyncError, RLMSyncErrorDomain) { /** An error that indicates the Realm needs to be reset. - A synced Realm may need to be reset because MongoDB Realm encountered an + A synced Realm may need to be reset because Atlas App Services encountered an error and had to be restored from a backup. If the backup copy of the remote Realm is of an earlier version than the local copy of the Realm, the server will ask the client to reset the Realm. @@ -82,7 +82,7 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMSyncError, RLMSyncErrorDomain) { The reset process is as follows: 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 @@ -160,7 +160,7 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMFlexibleSyncError, RLMFlexibleSyncErrorDoma RLMFlexibleSyncErrorRefreshSubscriptionSetError = 3, }; -/// An error which is related to authentication to MongoDB Realm. +/// An error which is related to authentication to Atlas App Services. typedef RLM_ERROR_ENUM(NSInteger, RLMSyncAuthError, RLMSyncAuthErrorDomain) { /// An error that indicates that the response received from the authentication server was malformed. RLMSyncAuthErrorBadResponse = 1, @@ -201,7 +201,7 @@ typedef RLM_ERROR_ENUM(NSInteger, RLMSyncAuthError, RLMSyncAuthErrorDomain) { RLMSyncAuthErrorFileCannotBeShared = 703, }; -/// An error which is related to authentication to MongoDB Realm. +/// An error which is related to authentication to Atlas App Services. typedef RLM_ERROR_ENUM(NSInteger, RLMAppError, RLMAppErrorDomain) { /// An unknown error has occured RLMAppErrorUnknown = -1, diff --git a/Realm/RLMUser.h b/Realm/RLMUser.h index 69179219c0..b90a972cdb 100644 --- a/Realm/RLMUser.h +++ b/Realm/RLMUser.h @@ -31,7 +31,7 @@ typedef NS_ENUM(NSUInteger, RLMUserState) { /// The user is logged out. Call `logInWithCredentials:...` with valid credentials to log the user back in. RLMUserStateLoggedOut, - /// The user is logged in, and any Realms associated with it are syncing with MongoDB Realm. + /// The user is logged in, and any Realms associated with it are syncing with Atlas App Services. RLMUserStateLoggedIn, /// The user has been removed, and cannot be used. RLMUserStateRemoved @@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN A user may have one or more credentials associated with it. These credentials uniquely identify the user to the authentication provider, and are used to sign - into a MongoDB Realm user account. + into an Atlas App Services user account. Note that user objects are only vended out via SDK APIs, and cannot be directly initialized. User objects can be accessed from any thread. @@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN @interface RLMUser : NSObject /** - The unique MongoDB Realm string identifying this user. + The unique Atlas App Services string identifying this user. Note this is different from an identitiy: A user may have multiple identities but has a single indentifier. See RLMUserIdentity. */ @property (nonatomic, readonly) NSString *identifier NS_SWIFT_NAME(id); @@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN /** The user's refresh token used to access the Realm Application. - This is required to make HTTP requests to MongoDB Realm's REST API + This is required to make HTTP requests to Atlas App Services' REST API for functionality not exposed natively. It should be treated as sensitive data. */ @property (nullable, nonatomic, readonly) NSString *accessToken; @@ -159,7 +159,7 @@ NS_ASSUME_NONNULL_BEGIN /** The custom data of the user. - This is configured in your MongoDB Realm App. + This is configured in your Atlas App Services app. */ @property (nonatomic, readonly) NSDictionary *customData NS_REFINED_FOR_SWIFT; @@ -197,7 +197,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)removeWithCompletion:(RLMUserOptionalErrorBlock)completion; /** - Permanently deletes this user from your MongoDB Realm app. + Permanently deletes this user from your Atlas App Services app. The users state will be set to `Removed` and the session will be destroyed. If the delete request fails, the local authentication state will be untouched. @@ -229,9 +229,9 @@ NS_ASSUME_NONNULL_BEGIN - (RLMMongoClient *)mongoClientWithServiceName:(NSString *)serviceName NS_REFINED_FOR_SWIFT; /** - Calls the MongoDB Realm function with the provided name and arguments. + Calls the Atlas App Services function with the provided name and arguments. - @param name The name of the MongoDB Realm function to be called. + @param name The name of the Atlas App Services function to be called. @param arguments The `BSONArray` of arguments to be provided to the function. @param completion The completion handler to call when the function call is complete. This handler is executed on a non-main global `DispatchQueue`. diff --git a/RealmSwift.podspec b/RealmSwift.podspec index 72b84f2013..3d95b935fe 100644 --- a/RealmSwift.podspec +++ b/RealmSwift.podspec @@ -3,11 +3,11 @@ Pod::Spec.new do |s| s.name = 'RealmSwift' version = `sh build.sh get-version` s.version = version - s.summary = 'Realm is a modern data framework & database for iOS, macOS, tvOS & watchOS.' + s.summary = 'Realm Swift is a modern data framework & database for iOS, macOS, tvOS & watchOS.' s.description = <<-DESC - The Realm Mobile Database, for Swift. (If you want to use Realm from Objective-C, see the “Realm” pod.) + The Realm Database, for Swift. (If you want to use Realm from Objective-C, see the “Realm” 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}" } diff --git a/RealmSwift/Aliases.swift b/RealmSwift/Aliases.swift index e0e612d017..fefa122ada 100644 --- a/RealmSwift/Aliases.swift +++ b/RealmSwift/Aliases.swift @@ -27,7 +27,7 @@ import Realm /** `PropertyType` is an enum describing all property types supported in Realm models. - For more information, see [Realm Models](https://realm.io/docs/swift/latest/#models). + For more information, see [Object Models and Schemas](https://www.mongodb.com/docs/realm/sdk/swift/fundamentals/object-models-and-schemas/). ### Primitive types diff --git a/RealmSwift/App.swift b/RealmSwift/App.swift index 5f6fae1ef2..439d69235f 100644 --- a/RealmSwift/App.swift +++ b/RealmSwift/App.swift @@ -96,7 +96,7 @@ public typealias PushClient = RLMPushClient public typealias UserAPIKey = RLMUserAPIKey /** -`Credentials`is an enum representing supported authentication types for MongoDB Realm. +`Credentials`is an enum representing supported authentication types for Atlas App Services. Example Usage: ``` let credentials = Credentials.JWT(token: myToken) @@ -115,7 +115,7 @@ let credentials = Credentials.JWT(token: myToken) case emailPassword(email: String, password: String) /// Credentials from a JSON Web Token case jwt(token: String) - /// Credentials for a MongoDB Realm function using a mongodb document as a json payload. + /// Credentials for an Atlas App Services function using a mongodb document as a json payload. /// If the json can not be successfully serialised and error will be produced and the object will be nil. case function(payload: Document) /// Credentials from a user api key. diff --git a/RealmSwift/Impl/SchemaDiscovery.swift b/RealmSwift/Impl/SchemaDiscovery.swift index 0e5be8ad7b..8395d8cca5 100644 --- a/RealmSwift/Impl/SchemaDiscovery.swift +++ b/RealmSwift/Impl/SchemaDiscovery.swift @@ -119,7 +119,7 @@ private func getLegacyProperties(_ object: ObjectBase, _ cls: ObjectBase.Type) - guard let value = rawValue as? _RealmSchemaDiscoverable else { if class_getProperty(cls, label) != nil { - throwRealmException("Property \(cls).\(label) is declared as \(type(of: prop.value)), which is not a supported managed Object property type. If it is not supposed to be a managed property, either add it to `ignoredProperties()` or do not declare it as `@objc dynamic`. See https://realm.io/docs/swift/latest/api/Classes/Object.html for more information.") + throwRealmException("Property \(cls).\(label) is declared as \(type(of: prop.value)), which is not a supported managed Object property type. If it is not supposed to be a managed property, either add it to `ignoredProperties()` or do not declare it as `@objc dynamic`. See https://www.mongodb.com/docs/realm-sdks/swift/latest/Classes/Object.html for more information.") } if prop.value as? RealmOptionalProtocol != nil { throwRealmException("Property \(cls).\(label) has unsupported RealmOptional type \(type(of: prop.value)). Extending RealmOptionalType with custom types is not currently supported. ") diff --git a/RealmSwift/PersistedProperty.swift b/RealmSwift/PersistedProperty.swift index 9bfc9604f0..4d6f1b8e6c 100644 --- a/RealmSwift/PersistedProperty.swift +++ b/RealmSwift/PersistedProperty.swift @@ -69,7 +69,7 @@ import Realm.Private /// to the initializer. Compound primary keys are not supported, and setting /// more than one property as the primary key will throw an exception at /// runtime. Only Int, String, UUID and ObjectID properties can be made the -/// primary key, and when using MongoDB Realm, the primary key must be named +/// primary key, and when using Atlas App Services, the primary key must be named /// `_id`. The primary key property can only be mutated on unmanaged objects, /// and mutating it on an object which has been added to a Realm will throw an /// exception. diff --git a/RealmSwift/RealmConfiguration.swift b/RealmSwift/RealmConfiguration.swift index 3a603df1e4..016d14381b 100644 --- a/RealmSwift/RealmConfiguration.swift +++ b/RealmSwift/RealmConfiguration.swift @@ -58,7 +58,7 @@ extension Realm { - parameter fileURL: The local URL to the Realm file. - parameter inMemoryIdentifier: A string used to identify a particular in-memory Realm. - - parameter syncConfiguration: For Realms intended to sync with MongoDB Realm, a sync configuration. + - parameter syncConfiguration: For Realms intended to sync with Atlas App Services, a sync configuration. - parameter encryptionKey: An optional 64-byte key to use to encrypt the data. - parameter readOnly: Whether the Realm is read-only (must be true for read-only files). - parameter schemaVersion: The current schema version. @@ -107,7 +107,7 @@ extension Realm { // MARK: Configuration Properties /** - A configuration value used to configure a Realm for synchronization with MongoDB Realm. Mutually + A configuration value used to configure a Realm for synchronization with Atlas App Services. Mutually exclusive with `inMemoryIdentifier`. */ public var syncConfiguration: SyncConfiguration? { diff --git a/RealmSwift/Sync.swift b/RealmSwift/Sync.swift index f51fee700d..0e7ea79b07 100644 --- a/RealmSwift/Sync.swift +++ b/RealmSwift/Sync.swift @@ -24,7 +24,7 @@ import Combine #endif /** - An object representing a MongoDB Realm user. + An object representing an Atlas App Services user. - see: `RLMUser` */ @@ -48,7 +48,7 @@ public extension User { } /** - A manager which configures and manages MongoDB Realm synchronization-related + A manager which configures and manages Atlas App Services synchronization-related functionality. - see: `RLMSyncManager` @@ -169,7 +169,7 @@ public typealias SyncLogLevel = RLMSyncLogLevel /** A data type whose values represent different authentication providers that can be used with - MongoDB Realm. + Atlas App Services. - see: `RLMIdentityProvider` */ @@ -178,7 +178,7 @@ public typealias Provider = RLMIdentityProvider /** * How the Realm client should validate the identity of the server for secure connections. * - * By default, when connecting to MongoDB Realm over HTTPS, Realm will + * By default, when connecting to Atlas App Services over HTTPS, Realm will * validate the server's HTTPS certificate using the system trust store and root * certificates. For additional protection against man-in-the-middle (MITM) * attacks and similar vulnerabilities, you can pin a certificate or public key, @@ -258,7 +258,7 @@ public enum ClientResetMode { /** A `SyncConfiguration` represents configuration parameters for Realms intended to sync with - MongoDB Realm. + Atlas App Services. */ @frozen public struct SyncConfiguration { /// The `SyncUser` who owns the Realm that this configuration should open. @@ -266,7 +266,7 @@ public enum ClientResetMode { /** 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. */ public let partitionValue: AnyBSON? @@ -343,7 +343,7 @@ public enum ClientResetMode { } } -/// Structure providing an interface to call a MongoDB Realm function with the provided name and arguments. +/// Structure providing an interface to call an Atlas App Services function with the provided name and arguments. /// /// user.functions.sum([1, 2, 3, 4, 5]) { sum, error in /// guard case let .int64(value) = sum else { @@ -536,7 +536,7 @@ public extension User { /** The custom data of the user. - This is configured in your MongoDB Realm App. + This is configured in your Atlas App Services app. */ var customData: Document { guard let rlmCustomData = self.__customData as RLMBSON?, @@ -555,7 +555,7 @@ public extension User { return self.__mongoClient(withServiceName: serviceName) } - /// Call a MongoDB Realm function with the provided name and arguments. + /// Call an Atlas App Services function with the provided name and arguments. /// /// user.functions.sum([1, 2, 3, 4, 5]) { sum, error in /// guard case let .int64(value) = sum else { @@ -785,7 +785,7 @@ public extension User { } } - /// Permanently deletes this user from your MongoDB Realm app. + /// Permanently deletes this user from your Atlas App Services app. /// The users state will be set to `Removed` and the session will be destroyed. /// If the delete request fails, the local authentication state will be untouched. /// @returns A publisher that eventually return `Result.success` or `Error`. diff --git a/SUPPORT.md b/SUPPORT.md index 0df906456c..47837b2a2b 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -4,7 +4,7 @@ The Realm team is here to help you with your Realm-related issues! ## Documentation -Before asking questions, please familiarize yourself with our [Swift](https://realm.io/docs/swift/latest) and [Objective-C](https://realm.io/docs/objc/latest) documentation. We also have a number of [Tech Notes](https://realm.io/docs/tech-notes/) which cover various topics that may be of interest. +Before asking questions, please familiarize yourself with our [Realm Swift](https://www.mongodb.com/docs/realm/sdk/swift/) documentation. We also have a number of [Tech Notes](https://www.mongodb.com/developer/products/realm/) which cover various topics that may be of interest. ## Stack Overflow diff --git a/build.sh b/build.sh index 94b4f8d71e..a3ff4194f9 100755 --- a/build.sh +++ b/build.sh @@ -256,7 +256,7 @@ build_docs() { "${objc}" \ --clean \ --author Realm \ - --author_url https://realm.io \ + --author_url https://docs.mongodb.com/realm-sdks \ --github_url https://github.com/realm/realm-swift \ --github-file-prefix "https://github.com/realm/realm-swift/tree/v${version}" \ --module-version "${version}" \ @@ -1202,7 +1202,7 @@ case "$COMMAND" in URL - https://realm.io/docs/${LANG}/${version} + https://www.mongodb.com/docs/realm-sdks/${LANG}/${version} EOF diff --git a/docs/README.md b/docs/README.md index 158d241c24..2513560306 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,14 +1,14 @@ # Documentation -## Realm Objective-C +## Realm Swift -The documentation can be found at [realm.io/docs/objc/latest](https://realm.io/docs/objc/latest). -The API reference is located at [realm.io/docs/objc/latest/api](https://realm.io/docs/objc/latest/api). +The documentation can be found at [www.mongodb.com/docs/realm/sdk/swift/](https://www.mongodb.com/docs/realm/sdk/swift/). +The API reference is located at [www.mongodb.com/docs/realm-sdks/swift/latest/](https://www.mongodb.com/docs/realm-sdks/swift/latest/). -## Realm Swift +## Realm Objective-C -The documentation can be found at [realm.io/docs/swift/latest](https://realm.io/docs/swift/latest). -The API reference is located at [realm.io/docs/swift/latest/api](https://realm.io/docs/swift/latest/api). +The documentation can be found at [www.mongodb.com/docs/realm/sdk/swift/](https://www.mongodb.com/docs/realm/sdk/swift/). +The API reference is located at [www.mongodb.com/docs/realm-sdks/objc/latest](https://www.mongodb.com/docs/realm-sdks/objc/latest). ## Generating Docs diff --git a/examples/README.md b/examples/README.md index 55560b71b6..fc7511e8fa 100644 --- a/examples/README.md +++ b/examples/README.md @@ -124,8 +124,7 @@ Open the project in Xcode, and press "Run" to build and run the program. It will The `installation/` directory contains example Xcode projects demonstrating how to install Realm Objective-C and Realm Swift from all available methods defined -in and -. +in . ## tvOS (Objective-C) diff --git a/examples/ios/swift/AppleAuthentication/ContentView.swift b/examples/ios/swift/AppleAuthentication/ContentView.swift index 7ce5e66687..f1d8eee64c 100644 --- a/examples/ios/swift/AppleAuthentication/ContentView.swift +++ b/examples/ios/swift/AppleAuthentication/ContentView.swift @@ -20,7 +20,7 @@ import SwiftUI import AuthenticationServices import RealmSwift -/// Your MongoDB Realm App ID +/// Your Atlas App Services app ID let appId = "your-app-id" struct ContentView: View { diff --git a/examples/ios/swift/AppleAuthentication/README.md b/examples/ios/swift/AppleAuthentication/README.md index ebf7990480..934b03a480 100644 --- a/examples/ios/swift/AppleAuthentication/README.md +++ b/examples/ios/swift/AppleAuthentication/README.md @@ -1,8 +1,8 @@ -# How to enable Apple Authentication via MongoDB Realm Cloud +# How to enable Apple Authentication via Atlas App Services -* You first need to setup your MongoDB Realm app in the cloud. Follow these instructions to get started: https://docs.mongodb.com/realm/authentication/apple/ +* You first need to setup your app in Atlas App Services. Follow these instructions to get started: https://www.mongodb.com/docs/atlas/app-services/authentication/apple/ * Once that is done add Apple Sign In to your app's entitlements -* Make sure your bundle ID matches the client id you used in MongoDB Realm Cloud +* Make sure your bundle ID matches the client id you used in Atlas App Services app. * Follow the code sample to understand the flow of the authentication cycle. diff --git a/examples/ios/swift/GettingStarted.playground/Contents.swift b/examples/ios/swift/GettingStarted.playground/Contents.swift index 6c99dd664f..c04c07acf8 100644 --- a/examples/ios/swift/GettingStarted.playground/Contents.swift +++ b/examples/ios/swift/GettingStarted.playground/Contents.swift @@ -92,4 +92,4 @@ try! realm.write { } realm.objects(Person.self).count -//: Thanks! To learn more about Realm go to https://realm.io +//: Thanks! To learn more about Realm go to https://www.mongodb.com/docs/realm/