3

Realm: Create reactive mobile apps in a fraction of the time

 6 years ago
source link: https://realm.io/cn/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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

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

hero_iphone.svg
Start a Free Trial Now
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');

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.

了解更多

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
  }
}];

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK