Skip to content

v10.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@realm-ci realm-ci released this 09 Jun 01:01
· 1176 commits to master since this release
53371f2

NOTE: This version bumps the Realm file format to version 11. It is not possible to downgrade to earlier versions. Older files will automatically be upgraded to the new file format. Only Realm Studio 10.0.0 or later will be able to open the new file format.

Enhancements

  • Add support for next generation sync. Support for syncing to MongoDB instead of Realm Object Server. Applications must be created at realm.mongodb.com
  • The memory mapping scheme for Realm files has changed to better support opening very large files.
  • Add support for the ObjectId data type. This is an automatically-generated unique identifier similar to a GUID or a UUID. (PR #6450).
  • Add support for the Decimal128 data type. This is a 128-bit IEEE 754 decimal floating point number similar to NSDecimalNumber. (PR #6450).
  • Add support for embedded objects. Embedded objects are objects which are owned by a single parent object, and are deleted when that parent object is deleted. They are defined by subclassing EmbeddedObject / RLMEmbeddedObject rather than Object / RLMObject.
  • Add -[RLMSyncUser customData]/SyncUser.customData. Custom data is configured in your MongoDB Realm App.
  • Add -[RLMApp callFunctionNamed:arguments]/RealmApp.functions. This is the entry point for calling Remote MongoDB Realm functions. Functions allow you to define and execute server-side logic for your application. Functions are written in modern JavaScript (ES6+) and execute in a serverless manner. When you call a function, you can dynamically access components of the current application as well as information about the request to execute the function and the logged in user that sent the request.
  • Add -[RLMApp mongoClientWithServiceName]/RealmApp.mongoClient. This is the entry point for calling your Remote MongoDB Service.The read operations are -[RLMMongoCollection findWhere:completion:], -[RLMMongoCollection countWhere:completion:] and -[RLMMongoCollection aggregateWithPipeline:completion:]. The write operations are -[RLMMongoCollection insertOneDocument:completion:], -[RLMMongoCollection insertManyDocuments:completion:],
    -[RLMMongoCollection updateOneDocument:completion:], -[RLMMongoCollection updateManyDocuments:completion:], -[RLMMongoCollection deleteOneDocument:completion:], and -[RLMMongoCollection deleteManyDocuments:completion:]. If you are already familiar with MongoDB drivers, it is important to understand that the remote MongoCollection only provides access to the operations available in MongoDB Realm.
  • Change [RLMSyncUser configurationWithPartitionValue:]/SyncUser.configuration(with:) to accept all BSON types. Partition values can currently be of types String, Int, or ObjectId. Opening a realm by partition value is the equivalent of previously opening a realm by URL. In this case,partitions are meant to be more closely associated with your data. E.g., if you are running a Dog kennel, and have a field breed that acts as your partition key, you could open up realms based on the breed of the dogs.

Breaking Changes

  • We no longer support Realm Cloud (legacy), but instead the new "MongoDB Realm" Cloud. MongoDB Realm is a serverless platform that enables developers to quickly build applications without having to set up server infrastructure. MongoDB Realm is built on top of MongoDB Atlas, automatically integrating the connection to your database.
  • Remove support for Query-based sync, including the configuration parameters and the RLMSyncSubscription and SyncSubscription types (#6437).
  • Primary key properties are no longer marked as being indexed. This reflects an internal change to how primary keys are handled that should not have any other visible effects. (#6440).
  • Remove everything related to sync permissions, including both the path-based permission system and the object-level privileges for query-based sync. (#6445)
  • Primary key uniqueness is now enforced when creating new objects during migrations, rather than only at the end of migrations. Previously new objects could be created with duplicate primary keys during a migration as long as the property was changed to a unique value before the end of the migration, but now a unique value must be supplied when creating the object.
  • Remove support for Realm Object Server.

Compatibility

  • File format: Generates Realms with format v11 (Reads and upgrades all previous formats)
  • MongoDB Realm: 84893c5 or later.
  • APIs are backwards compatible with all previous releases in the 10.0.0-alpha series.
  • Carthage release for Swift is built with Xcode 11.5.

Internal

  • Upgraded realm-core from v6.0.3 to v10.0.0-beta.1
  • Upgraded realm-sync from v5.0.1 to v10.0.0-beta.2