Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introducing Realm Mobile Platform

Introducing Realm Mobile Platform

Introducing Realm Mobile Platform

Kishikawa Katsumi

October 20, 2016
Tweet

More Decks by Kishikawa Katsumi

Other Decks in Programming

Transcript

  1. Realm Mobile Platform [email protected] Realm Mobile Database Data Sync Access

    Control User Identify ٔ،ٕة؎يず劍 ِ٦ؠ٦陎ⴽ ر٦ةⰟ剣
  2. Realm Mobile Platform [email protected] Realm Mobile Database Data Sync Access

    Control User Identify Event Handling ٔ،ٕة؎يず劍 ِ٦ؠ٦陎ⴽ ر٦ةⰟ剣 ؽآطأٗآحؙ
  3. ΞΫηετʔΫϯʢCentOSʣ [email protected] [email protected] # cd /etc/realm/ # ls admin_token.base64 configuration.yml

    token- signature.key token-signature.pub # cat admin_token.base64 ewoJImlkZW50a...
  4. جຊతͳ࢖͍ํ [email protected] [email protected] User.authenticate(with: Credential.usernamePassword(username: "username", password: "password", actions: []),

    server: URL(string: "http://128.199.141.202:9080")!, onCompletion: { user, error in guard let user = user else { fatalError(String(describing: error)) } let configuration = Realm.Configuration( syncConfiguration: (user, URL(string: "realm://128.199.141.202:9080/~/realmtasks")!) ) self.realm = try! Realm(configuration: configuration) })
  5. FacebookϩάΠϯ [email protected] [email protected] func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error:

    NSError!) { if let _ = error { return } if result.isCancelled { return } User.authenticate(with: Credential.facebook(token: result.token.tokenString), server: URL(string: "http://128.199.141.202:9080")!, onCompletion: { user, error in guard let user = user else { fatalError(String(describing: error)) } let configuration = Realm.Configuration( syncConfiguration: (user, URL(string: "realm://128.199.141.202:9080/~/realmtasks")!) ) self.realm = try! Realm(configuration: configuration) }) }
  6. ΠϕϯτϋϯυϦϯά [email protected] var Realm = require('realm'); var filter_callback = function(realm_name)

    { ... }; var change_notification_callback = function(realm_name, realm) { var channels = realm.objects('Channel'); for (var i = 0; i < channels.length; ++i) { var channel = channels[i]; ... } }; Realm.setGlobalSyncListener(local_root_dir, server_base_url, access_token, filter_callback, change_notification_callback);
  7. Realm Mobile Platform ˖ .PCJMF%BUBCBTF ˖ ⿽倯ぢךر٦ةず劍 ˖ ٔ،ٕة؎ي ˖

    ء٦يٖأ ˖ ؝ٝؿؙٔزך荈⹛鍑寸 ˖ ِ٦ؠ٦陎ⴽ ˖ ؎كٝزعٝسؚٔٝ • αʔόʔϓογϡ • σʔλڞ༗ • ΞΫηείϯτϩʔϧ [email protected]
  8. ίϯϑϦΫτͷղܾ [email protected] [email protected] • جຊ͸ޙউͪ • ಉ͡ΞΠςϜʹผͷมߋΛՃ͑ͨ৔߹ɺޙʹىͬͨ͜มߋ͕࠾༻ ͞Ε·͢ɻ • ಉ͡ΠϯσοΫε΁ͷૠೖ͸࣌ؒॱʹͳΔ

    • ࡟আ͸͢΂ͯʹউͭ • ͋ΔΞΠςϜ͕࡟আ͞ΕͯɺผͷσόΠεͰ͸ಉ͡ΞΠςϜΛมߋ ͨ͠ɺͱ͍͏৔߹͸ɺ࡟আ͚͕ͩى͜Γ·͢ɻ
  9. Recent Updates • Realm Objective-C/Swift 2.0 (was 1.1.0) • Realm

    Java 2.0 (was 1.1.0) • Realm React Native 0.14.0 • Realm Xamarin 0.78 (was 0.77.2) [email protected]
  10. Where to find us • % Realm Japan User Group:

    facebook.com/groups/realmjp • % Twitter: twitter.com/realmJapan • GitHub: github.com/realm • % StackOverflow: ja.stackoverflow.com/questions/tagged/realm • % Email: [email protected] • % Slack: slack.realm.io/ [email protected]