realm-mobile-platform

Realm Swift callback function

ε祈祈猫儿з 提交于 2020-01-04 14:15:02
问题 I use swift3 and Realm 2.3. And I need callback after transaction is finished. for example, I have a code as below, how can I get call back after a realm data transaction is finished ? DispatchQueue.main.async { try! self.realm.write { self.realm.add(friendInfo, update: true) } } 回答1: Transactions are executed synchronously. So you can just perform the code right after you execute the transaction. DispatchQueue.main.async { try! self.realm.write { self.realm.add(friendInfo, update: true) }

Https Proxy for Realm Object Server not working

别说谁变了你拦得住时间么 提交于 2020-01-03 04:34:07
问题 I can't seem to get the https proxy for my Realm Object Server running. I've followed every step in the docs, which include editing the configuration.yml file to change: proxy.https.enable: true proxy.https.listen_address: :: proxy.https.listen_port: 9443 proxy.https.certificate_path: 'cert_path' proxy.https.private_key_path: 'private_key_path' When I visit http://example.com:9080 it's fine, but visiting https://example.com:9443 doesn't work - I've verified the paths are correct, and the cert

Can't see the database on Realm Object Server

杀马特。学长 韩版系。学妹 提交于 2020-01-03 04:17:24
问题 I have created a method to manage shared table between all users however I can't see this table. I have just remove the "~" character, it works if I leave the "~" character but the table it's only visible by the owner. I don't know why it does not work. Maybe it's not the proper way to share a table between users? static public func setGlobalDatabase(database:String, completion: @escaping (_ realm: Realm?, _ error: Error?) -> Void) { let realmPath = RealmService.REALM_SERVER_DATA + "/" +

What is the best practice or design pattern to maintain sync activity across multiple views?

坚强是说给别人听的谎言 提交于 2019-12-25 07:49:56
问题 Scenario : Shared/Sync'd Realm. iOS/Swift App with multiple views. What is the best practice design pattern I should use to in order to maintain synchronisation in the background - and - provide automatic (real time) updates to multiple views? Looking at the extra task app - this makes sense but the app really only has one active view. What if I have multiple views? Should I destroy the Realm notification of data change and rebuild for each view? 回答1: The recommended way is the same as for a

Accessing Realm from an iOS Extension while using Realm Mobile Platform

。_饼干妹妹 提交于 2019-12-13 08:39:59
问题 I would like to access my Realm from an iOS extension however the realm path is unavailable when using the Realm Mobile Platform. I've received advice from realm to hold a cloned copy and keep it in sync. How can that be achieved? ...and is it considered a "clean" solution? (there could be multiple realms) 回答1: You should just open the synced Realm from your extension by creating a Realm configuration with a proper sync configuration (specifying user and remote Realm URL), like usual. This is

Size of storage on Realm Object Server

不羁岁月 提交于 2019-12-13 07:21:36
问题 I have iOS project integrated with RMP, so how I can get size of storage from Realm Object Server? 回答1: It is currently not possible to query the server for the size usage of a specific Realm file. This is an API that will (most probably) come at a later date. As a reminder, the Realm Object Server needs to keep the entirety of the history, in order to allow old joiners to merge and get updated to the latest version. 来源: https://stackoverflow.com/questions/40232169/size-of-storage-on-realm

RealmSwift LinkingObjects and Decodable

你说的曾经没有我的故事 提交于 2019-12-13 04:33:12
问题 I have a Realm model class that I need to be Decodable so I can serialize it from JSON and save it to database. Every PortfolioItem is associated with one Product and at some point I need to get to PortfolioItem from Product via inverse relationship. That's why I have LinkingObjects property. The problem is when I try to conform to Decodable protocol. The compiler is giving me an error Cannot automatically synthesize 'Decodable' because 'LinkingObjects<PortfolioItem>' does not conform to

Execute transaction method using Realm continues to loop on each run android

☆樱花仙子☆ 提交于 2019-12-13 03:05:37
问题 In my app I am using Realm DB to store all the data in local database. I have some initial mock data which I want to show at the starting of the app. Previously I implemented begintransaction method. But after reading the documentation I have implented execute tranasction method. Beacuse this method is updating my new data easily. Now the problem is, whenever I click the option to show the recyclerview, the data is looping each time. for example I have 3 data. If I go back to previous page

Exception when converting local realm to synced realm in Xamarin.iOS

别来无恙 提交于 2019-12-13 00:06:37
问题 Be assured I have seen all the answer for the very same questions . following this link enter switch-from-local-to-synced-realm I have a local realm from where I want to copy to synced realm . public void InitiateSyncForPost() { realm = Realm.GetInstance(ConfigForSync); //realm.WriteAsync((Realm obj) => //{ // var realmOld = Realm.GetInstance(Config); // var ding = realmOld.All<Post>().ToList(); // var dang = realmOld.All<Comment>().ToList(); // var ting = realmOld.All<ImageData>().ToList();

Realm Object Server 2 dashboard inaccessible

可紊 提交于 2019-12-12 10:21:03
问题 I've recently tried to install Realm Object Server from NPM (I'm on macOS ). I was used to the Realm Dashboard which was embedded in the "macOS Bundle" available for the 1.x version. It is unfortunately unavailable when attempting to reach http://localhost:9080 . There are now two things I think could be responsible for my issue: This feature was only present in the 1.x version This feature is not embedded in the NPM version Please note that I'm using (or at least want to use) the Developer