2

I noticed that in this link: https://realm.io/news/thomas-goyne-fast-inter-process-communication/

It states that inter process communication is supported in realm. Does that mean I will have no problem opening the database in both an app and its share extension in ios. If so, for the realm object class, do I need to put them in some framework or can I just duplicate the class in both the app and app extension just for simplicity?

dickyj
  • 1,830
  • 1
  • 24
  • 41

1 Answers1

4

It states that inter process communication is supported in realm.

That's correct!

Does that mean I will have no problem opening the database in both an app and its share extension in ios.

That's the plan!

If so, for the realm object class, do I need to put them in some framework or can I just duplicate the class in both the app and app extension just for simplicity?

Either approach is fine.


We have very little docs on inter-process Realm access because by design, it should "just work", but the fact that the blog article you linked to is the only place where Realm states that multiprocess access is supported is laughable, which is why we have #3362 tracking improving our docs on the subject.

jpsim
  • 14,329
  • 6
  • 51
  • 68
  • Well, now in stackoverflow others can find the right answer too. – dickyj May 03 '16 at 13:48
  • It looks like I can't open the database in the extension target while the main app is running. – sahara108 Sep 09 '16 at 09:28
  • That's not normal. – jpsim Sep 09 '16 at 18:45
  • @jpsim Yep, `try Realm()` always return nil in the share target if the main app is running in background. Do you have any suggestion? – sahara108 Sep 12 '16 at 02:50
  • 1
    It seems that because I am using Encrypted db. `Encrypted interprocess sharing is currently unsupported.SharedGroup has been opened by pid: 94342. Current pid is 94450., Error Code=1` – sahara108 Sep 12 '16 at 03:01