MongoDB Realm Has Arrived

MongoDB Realm helps you build modern mobile apps, faster. Use the Realm Mobile Database alongside Realm Sync (beta) to keep app data up-to-date in real time across multiple users, devices, and the MongoDB backend. Stop worrying about network availability and focus on building offline-first apps, with the innovative features your users will love.

更好的移动端数据库意味着更好的移动端应用。

Realm helps companies build engaging mobile applications with minimal development time. Learn why every day hundreds of thousands of developers choose Realm.

Start a Free Trial Now

顶级的应用,炫目的功能

团队无论大小,都能从 Realm 移动端平台获益。它为您解决了复杂的问题例如双向同步和实时协作,使您能够拥有更多的时间让应用变得独一无二。

了解更多 Contact Sales

Realm Database

Use the Realm Database to save data in minutes so you can build mobile apps in a fraction of the time. Our object database is a simple alternative to SQLite and Core Data and proudly open source. Available for Java, Swift, Objective‑C, JavaScript, and Xamarin.

了解更多
class Dog {}

Dog.schema = {
  name: 'Dog',
  properties: {
    name: 'string',
    age: 'int',
  }
};

let realm = new Realm();
realm.write(() => {
  realm.create('Dog', {name: 'Rex', age: 1});
});

let pups = realm.objects('Dog').filtered('age < 2');
@interface Dog : RLMObject
@property NSString *name;
@property NSInteger age;
@end
@implementation Dog
@end

Dog *dog = [Dog new];
dog.name = @"Rex";
dog.age = 1;

RLMRealm *realm = [RLMRealm defaultRealm];
[realm transactionWithBlock:^{
  [realm addObject:dog];
}];

RLMResults<Dog *> *allDogs = [Dog allObjects];
RLMResults<Dog *> *pups = [allDogs objectsWhere:@"age < 2"];
class Dog: Object {
  @objc dynamic var name = ""
  @objc dynamic var age = 0
}

let dog = Dog()
dog.name = "Rex"
dog.age = 1

let realm = try! Realm()
try! realm.write {
  realm.add(dog)
}

let pups = realm.objects(Dog.self).filter("age < 2")
public class Dog extends RealmObject {
  public String name;
  public int age;
}

Dog dog = new Dog();
dog.name = "Rex";
dog.age = 1;

Realm realm = Realm.getDefaultInstance();
realm.beginTransaction();
realm.copyToRealm(dog)
realm.commitTransaction();

RealmResults<Dog> pups = realm.where(Dog.class)
                               .lessThan("age", 2)
                               .findAll();
public class Dog : RealmObject 
{
  public string Name { get; set; }
  public int Age { get; set; }
}

var realm = Realm.GetInstance();
realm.Write(() => 
{
  realm.Add(new Dog
  {
    Name = "Rex",
    Age = 1
  });
});

var pups = realm.All<Dog>().Where(d => d.Age < 2);

Realm Platform

Deploy data sync for your mobile apps use Realm Database and create reactive app experiences in as little as 10 lines of code. Realm Object Server and Realm Database combine to make the Realm Platform.

Try Realm Cloud
了解更多
// Authenticating the User
[RLMSyncUser logInWithCredentials:[RLMSyncCredentials credentialsWithGoogleToken:@"google token"]
                    authServerURL:[NSURL URLWithString:@"http://realm.example.com:9080"]
                     onCompletion:^(RLMSyncUser *user, NSError *error) {
  if (user) {
    // Opening a remote Realm
    NSURL *realmURL = [NSURL URLWithString:@"realm://realm.example.com:9080/~/userRealm"];
    RLMRealmConfiguration *config = [[RLMRealmConfiguration alloc] init];
    config.syncConfiguration = [user configurationWithURL: realmURL];
    RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:nil];
    // Any changes made to this Realm will be synced across all devices!
  } else if (error) {
    // handle error
  }
}];
// Authenticating the User
SyncUser.logIn(with: .google(token: "google token"),
               server: URL(string: "http://realm.example.com:9080")!)
{ user, error in
  if let user = user {
    // Opening a remote Realm
    let realm = try! Realm(configuration: user.configuration())
    // Any changes made to this Realm will be synced across all devices!
  } else if let error = error {
    // handle error
  }
}
// Authenticating the User
User user = User.login(Credentials.google("google token"),
                       "http://realm.example.com:9080/auth");
// Opening a remote Realm
String realmURL = "realm://realm.example.com:9080/~/userRealm";
Realm realm = Realm.getInstance(user.getDefaultConfiguration());
// Any changes made to this Realm will be synced across all devices!
// Authenticating the User
Realm.Sync.User.registerWithProvider('http://realm.example.co:9080', 'google', googleAccessToken, (error, user) => {
  if (!error) {
    // Opening a remote Realm
    var realm = new Realm({
      sync: {
        user: user,
        url: 'realm://realm.example.co:9080/~/userRealm',
      }
    });
    // Any changes made to this Realm will be synced across all devices!
  }
})
var user = await User.LoginAsync(Credentials.Google("google token"),
                                 new Uri("http://realm.example.com:9080"));

var realmUrl = new Uri("realm://realm.example.com:9080/~/userRealm");
var realm = Realm.GetInstance(user.configuration());
// Any changes made to this Realm will be synced across all devices!

Read a Whitepaper

Learn about Realm's best practices, approach to identity, access control, auditing and logging and encryption. Check out some of our whitepapers below.

Read more

Try a Demo

Learn how to get a synchronized Realm up and running with just 20 lines of code, and discover the power of server-side event handling in a simple demo.

Try a Demo

Watch a Webinar

Get a clear and practical overview of the Realm Platform and its top use cases in these presentations and demos.

Watch now

Get Started with Realm

CUSTOMER HIGHLIGHT

Cartasite delivers industrial IoT

Using Realm Platform, Cartasite built an offline-first app for heavy industries that seamlessly syncs field data with backend systems. Read more

View more customer stories >
 
CUSTOMER HIGHLIGHT

Integral Studio brings creative ideas to life

Digital management company uses Realm Platform to build innovative, reactive apps that bring musicians and their fans closer together. Read more

View more customer stories >
 
CUSTOMER HIGHLIGHT

Thread Learning brings education into the digital age

Realm Platform helps special education teams coordinate care by syncing data in real-time across multiple devices. Read more

View more customer stories >
 
CUSTOMER HIGHLIGHT

Arccos Golf ups its game with Realm

Arccos delivers a fast, responsive app experience with both online and offline availability for golfers around the world. Read more

View more customer stories >
 

Realtime collaboration in as little as 10 lines of code

See the Realm developer demo application in action

Watch the video

Logos of companies using Realm, including Amazon, Google, Hipmunk, Starbucks, and more

二十亿在使用 Realm

为世界 500 强企业、创新创业公司以及 App 商店榜首的应用所信赖。每天都有亿万人在使用基于 Realm 创建的 app。

Read more from our Customers

了解为什么 Realm 成为众多开发者的选择


开始使用 了解更多