Eager Beaver
Eager Beaver

Reputation: 989

how can I use same sqlite data on more than one iPhones

I have implemented an App which uses SQLite database, now if I run the App on a device then the database exist in that device only, now I want to use the same data on more than one device, can I do that?

Upvotes: 0

Views: 231

Answers (2)

Yaqub Ahmad
Yaqub Ahmad

Reputation: 27659

You need a Database Server to store your data & a Web service which should have the logic to store/fetch data from the Database-Server & Back to Database-Server. You can communicate between the DataBase Server & the Android Device using that Web Service.

On Android side you can use KSoap to consume the web service. See this example here.

Upvotes: 0

Simon
Simon

Reputation: 26003

You could use iCloud to copy your DB between devices. There are three ways you could do this.

  1. Implement all the file presenter coordination code by hand. This would be difficult, but your existing read/write code would stay the same.

  2. Wrap your DB in a UIDocument. This would be much easier, but your existing code to save and load your sqlite file would need to change. Conflicts would be resolved at a per-database level.

  3. Port your DB code to use Core Data and use a UIManagedDocument. Your entire codebase would change, but conflicts would be resolved at a much lower level.

I heartily recommend Ray Wenderlich's tutorial series on iCloud, Beginning iCloud and iCloud and UIDocument: Beyond the basics

Upvotes: 1

Related Questions