Introducing Realm Mobile Platform
Realm meetup #2[email protected]
View Slide
#realm_jp[email protected]
Katsumi KishikawaRealm Inc.[email protected]
Realm Mobile Platform[email protected]
Open Sourcing Realm Core[email protected]
What isRealm Mobile Platform?[email protected]
Realm˖ 42-JUFך➿剏הזٌغ؎ٕرغ؎أ㼔欽ךر٦ةك٦أ˖ ؙٗأفٓحزؿؓ٦ي˖ J04"OESPJE˖ +BWB 4XJGU 0CKFDUJWF$ $ +BWB4DSJQU˖ ؔ٦فٝا٦أ[email protected]
Realm Mobile Database[email protected]˖ 42-JUFך➿剏הזٌغ؎ٕرغ؎أ㼔欽ךر٦ةك٦أ˖ ؙٗأفٓحزؿؓ٦ي˖ J04"OESPJE˖ +BWB 4XJGU 0CKFDUJWF$ $ +BWB4DSJQU˖ ؔ٦فٝا٦أ
[email protected]Realm Mobile Platform
[email protected]Realm Mobile PlatformRealm MobileDatabase
Realm Mobile Platform[email protected]Realm MobileDatabaseData Syncٔ،ٕة؎يず劍
Realm Mobile Platform[email protected]Realm MobileDatabaseData SyncUser Identifyٔ،ٕة؎يず劍ِ٦ؠ٦陎ⴽ
Realm Mobile Platform[email protected]Realm MobileDatabaseData Sync Access ControlUser Identifyٔ،ٕة؎يず劍ِ٦ؠ٦陎ⴽر٦ةⰟ剣
Realm Mobile Platform[email protected]Realm MobileDatabaseData Sync Access ControlUser Identify Event Handlingٔ،ٕة؎يず劍ِ٦ؠ٦陎ⴽر٦ةⰟ剣ؽآطأٗآحؙ
Realm Mobile Platform[email protected][email protected]Realm Mobile Database
Demo[email protected]
ͬͯΈΔ[email protected]
ηοτΞοϓ[email protected][email protected]
Realm Object ServerΛىಈ͢Δ[email protected][email protected]
AdminΞΧϯτΛ࡞Δ[email protected]
[email protected][email protected]μογϡϘʔυ
Object Server্ͷσʔλΛݟΔ[email protected]
Realm Browser[email protected][email protected]
جຊతͳ͍ํ[email protected][email protected]
ΞΫηετʔΫϯʢmacOSʣ[email protected][email protected]
ΞΫηετʔΫϯʢCentOSʣ[email protected][email protected]# cd /etc/realm/# lsadmin_token.base64 configuration.yml token-signature.key token-signature.pub# cat admin_token.base64ewoJImlkZW50a...
جຊతͳ͍ํ[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 inguard 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)})
FacebookϩάΠϯ[email protected][email protected]
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 inguard 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)})}
FacebookϩάΠϯ[email protected][email protected]developers.facebook.com/docs/facebook-login/ios
Typical Mobile App Development[email protected]/login /tasks /tasks/id
w/ Realm Mobile Platform[email protected]
Data Sync[email protected]ر٦ةず劍
User Identify[email protected]ر٦ةず劍ِ٦ؠ٦陎ⴽ
Access Control[email protected]ر٦ةず劍ِ٦ؠ٦陎ⴽ،ؙإأ؝ٝزٗ٦ٕ
Event Handling[email protected]؎كٝزعٝسؚٔٝ
ΠϕϯτϋϯυϦϯά[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);
[email protected][email protected]
Realm Mobile Platform˖ .PCJMF%BUBCBTF˖ 倯ぢךر٦ةず劍˖ ٔ،ٕة؎ي˖ ء٦يٖأ˖ ؝ٝؿؙٔزך荈⹛鍑寸˖ ِ٦ؠ٦陎ⴽ˖ ؎كٝزعٝسؚٔٝ• αʔόʔϓογϡ• σʔλڞ༗• ΞΫηείϯτϩʔϧ[email protected]
ίϯϑϦΫτͷղܾ[email protected][email protected]• جຊޙউͪ• ಉ͡ΞΠςϜʹผͷมߋΛՃ͑ͨ߹ɺޙʹىͬͨ͜มߋ͕࠾༻͞Ε·͢ɻ• ಉ͡ΠϯσοΫεͷૠೖ࣌ؒॱʹͳΔ• আͯ͢ʹউͭ• ͋ΔΞΠςϜ͕আ͞ΕͯɺผͷσόΠεͰಉ͡ΞΠςϜΛมߋͨ͠ɺͱ͍͏߹ɺআ͚͕ͩى͜Γ·͢ɻ
Demogithub.com/realm/RealmTasks[email protected]
Recent Updates[email protected]
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]
Realm Objective-C/Swift 2.0[email protected]
Realm Objective-C/Swift 2.0• Realm Mobile PlatformରԠ• RealmSwift.Error => RealmSwift.Realm.Error[email protected][email protected]
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]
Realm Japan User GroupFacebook[email protected]
Support ChatSlack[email protected]
Ξϯέʔτbit.ly/RealmJP_Kansai2[email protected]
Questions?Katsuma Kishikawa[email protected]www.realm.io/jp@k_katsumi