0

I'm working on an iOS app that creates "location sets" where each row contains a location name and a GeoPoint, and each set has its own name. Each of these sets are stored in an object inside our program (all belonging to the same class). Now we want to give users the capability to create sets and upload them to a database, allowing other users to access and download them to their device.

I've been looking in to back-end solutions for work like this, but pretty much everything I've found so far focuses on relational databases and adding and deleting rows and using SQL-like language to retrieve them. Is there a way to store these objects just as objects (and not unpack the info inside to tables), and then retrieve them? It feels like that would be a much simpler way of going about this.

I'm an absolute beginner when it comes to databases, so forgive me if there's info missing here that you would need to help me out. I'll make sure to keep checking back in case someone asks for more info.

Thanks!

NeonBlueHair
  • 1,139
  • 2
  • 9
  • 22

3 Answers3

2

Coredata might be useful for you as its based upon the entity. So you can play multiple things around it by using queries (predicates).

But if you just want to save and retrieve back, then as a simplest solution I would suggest to create array/dictionary with entity data, save that into NSUserDefaults so you can retrieve back same while re-launching the app.

Mrunal
  • 13,982
  • 6
  • 52
  • 96
  • But would that allow me to share data between different users as well (case that's my main concern)? I thought those were only for saving information on the device itself, not for sharing with other users. – NeonBlueHair Feb 12 '12 at 09:00
  • This would be device specific, as your database is within that device so. But if you want to share with other device users then you must need to go with Client-Server interaction (using Webservices). – Mrunal Feb 12 '12 at 09:02
  • Yes and that's the part I'm confused about: What Web services would allow me to store objects built in objective-c just the way they are, and not have to unpack and store all the rows inside the object? – NeonBlueHair Feb 12 '12 at 09:05
  • @user1198869 with Core Data, you specify the specific file you want to use for 'persistent store' and its form (eg, SQLite, XML) so in theory you could take that file and share it between devices. However for server communications you might prefer to serialise and deserialise to something like JSON, since it's well documented and well supported by servers and clients, to the extent that server frameworks like OData can simply expose objects as JSON. – Tommy Feb 12 '12 at 09:07
1

Webservices for iOS development:

raywenderlich

icodeblog

WSDL Webservices

Response data parsing, it would be either JSON or XML:

JSON Parsing

XML Parsing

Hope these links would be helpful for you.

Community
  • 1
  • 1
Mrunal
  • 13,982
  • 6
  • 52
  • 96
  • Yeah I'm checking them all out. Thanks! For a temporary solution I found [Parse](http://parse.com) which is a back-end as service solution, and is fairly easy to work with. Though I'm not sure how it will scale price-wise. – NeonBlueHair Feb 14 '12 at 04:45
0

I ended up using Parse's mobile back-end service. That was the type of service I was looking for. I've found other similar services since then, like Applilcasa and StackMob, but we're pretty happy with Parse so far.

NeonBlueHair
  • 1,139
  • 2
  • 9
  • 22