Sharing a database between multiple shortcuts

I need to have 3 quick applications that can communicate with each other. Think of application 1 as the base application that communicates with the server and stores information in a local database, and applications 2 and 3 should read (and write POSSIBLY) on this database created in application 1.

Looking at the network, this seems possible with the help of “application groups”. If all 3 applications are under the same application group, will they automatically have a “shared folder” where I can create and / or save Realm DB? Can application 2 and 3 use NSFileManager to interact with this shared file? I can't seem to find any examples of this in action.

+4
source share
1 answer

You need a central database for reading and writing from several client applications, which is the easiest in the API. In other words, you need an API for your applications. You may think that this is a more difficult task than the shared folder and the Realm shared database, but it’s not, you actually make the problem more difficult by trying to invent the wheel of how N number of mobile applications communicate with each other, it doesn’t matter that all N-applications are all on the same device, in iOS the application is in the sandbox, and you are trying to get around this.

, Realm DB, Realm DB, , , Realm DB - , , Realm DB API, Firebase Amazon S3.

API, API .

, , App1 , App2 .

API :

SavePicture(byte[] picture)

App1 , API, , , .

App2 , , App2, API,

[byte[]] GetPictures()

API- GetPictures [], , App2.

, Firebase, , , API-, , API, PHP, Ruby on Rails, ASP.NET Web API, Python .. , MySQL, PostgreSQL, Sql Server, MongoDB, RavenDB ..

0

Source: https://habr.com/ru/post/1662167/


All Articles