I'm new to IOS programming, and I have had a great time learning it. It took me about 4 months to really get a good grasp on it. I have began creating my own app, and I ran in to a few questions. The app I'm creating is a live app like instagram, foursquare, etc. How do I store all of the information I need. Can I use Core-Data to create a real-time app that can handle updates from multiple users?
The app I'm creating is a live app like instagram, foursquare, etc.
How do I store all of the information I need.
You'll probably create some sort of server to manage the data. Having a single, central source of data is a lot easier than trying to sync data between multiple devices.
Can I use Core-Data to create a real-time app that can handle updates from multiple users?
You can -- Core Data works on MacOS X as well as on iOS, so you could write a Mac program that is the server for your iOS app. Whether that's the best approach is another question... I suppose it depends on how well you already know Core Data, whether there are any advantages to using the same Core Data data model on both the server and the client, how many clients you think you might have to support at once, etc.
If you're asking about using Core Data on the iOS client, then yes, you can certainly do that.
Related
We have finished writing an iPhone App that uses coredata.
In further versions we plan to add an iPad App that is able to display the data collected by the iPhone App (and of corse modify, use it) to give more interaction possibilities to the user.
My question is: Is it possible to move existing coredata (of already installed apps on iphones) to the cloud and read that data out with an iPad application?
If yes: can you point me in the right direction of where to start?
If no: is there another alternative to access coredata created with an iPhone App with an iPad app?
When using Core Data's built in iCloud support it doesn't matter what kind of device you're on, only that the Core Data stack is initialized the same way. Any iOS device or Mac can use the same iCloud store, and data created on one can be read on another.
One crucial detail though: If you already have a data store and you add iCloud support, those pre-existing records do not automatically get migrated to the cloud. iCloud works based on transaction logs, and transaction logs are only created when you save changes. Existing data that doesn't immediately change generates no transactions, and therefore doesn't go to the cloud.
If you have existing data when you add iCloud, you'll need to migrate the data to a new data store to force transactions for those existing records. You can do this fairly easily using NSPersistentStoreCoordinator's migratePersistentStore:toURL:options:withType:error: method. It's not hard, but it's not always obvious that it's necessary.
To get started, I first suggest watching Apple's WWDC videos on iCloud-- especially WWDC 2012's session 227, Using iCloud with Core Data. Next, I suggest extreme caution, because as of today Core Data's iCloud support is still, shall we say, far from being the most reliable of Apple's APIs.
I'm building an enterprise app, and have a very long list of requirements in front of me.
One of them reads "The app needs to be usable on multiple devices by the same user, such as iPhone and iPad sync with cloud for seamless experience".
This seriously concerns me, as it may involve a huge level of complexity. The app uses a local core-data based stack to keep a local version of the data, and will need to back up this data to the cloud. From your experience, is such core data to cloud sync feasible? How much effort is involved in keeping multiple devices seamlessly synced to a cloud based storage?
Any other input on how to handle/talk about such requirement in an intelligent manner is appreciated! Are there any demos that may get me up to speed on such "multi-device" kind of app?
There's also some further reading on Apple: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW1
There is functionality to sync coredata with iCloud
Have a look at iOS How-To : Using Core Data with iCloud
I'm about to start work on my first app which will be an internal release to gather customer information at a trade show.
I'm hopefully looking into using air for ios or maybe one of the various html/js frameworks to develop this app as an alternative to learning C.
ideally I would do it with some server based php > sql to store and share gathered information between a fleet of iPads, unfortunately due to the population of this trade show there will be no guarantee that i can maintain a wireless connection so need to prepare for these apps all being local access only.
in which case, how would you recommend going about the saving/reading of the stored data, and also how to sync it up with a sql server and then back to the iPads each night.
Did you try PhoneGap? It is an HTML5 app platform that allows you to author native applications with web technologies, in other words it will let you make an iphone app without having to learn C.
People have written tutorials and plugins for storing data locally.
PhoneGap basically wraps a web app hence you can use AJAX for sync with server as and when needed. This article might help.
We explored PhoneGap and found it very useful. and easy too. hope this helps you.
How do you suggest to a noob (in Obj c and ROR haha, I got some apps on both going but not very complex..)
to go about getting my next project to synchronise,
I have an app in the iphone that uses coredata to store the info (using one to many relationship), working,
but I need to sync it to a ROR web app, so the user can send data from iphone to ROR and viceverza, and that if the user is offline (not connected to server,) when goes back again online, the data created or modified can be updated to or from the server,,,
I've checked the objective resource group, but to my dismay, is still a bit difficult (I have it running connected to the server but not stand alone)
what other option can I use?
is there a project that is on to this?? (high hopes!!)
thank you so much!
Try RestKit, it supports integration of Rails, Core Data and Three20, It hase many other features. A nice tutorial can be found here.
I'm currently in the process of deciding whether or not to use Core Data for managing the data in my iphone application.
The application involves putting together a fairly sizeable library of content which needs to be localised and has a fair few relationships. One benefit I thought of using core data would be that I could perhaps build a desktop client for managing the data of the application, then package the resulting file with the iPhone app to use as its content database.
With my fairly limited knowledge of Core Data I wanted to know if this is possible? Are their any best-practices people can point me in the direction of?
This is basically a dupe of this question:
Provide Base Data for Core Data Application?
Short answer is - YES. I've done it, Apple does it. Works well.
Core Data defines the interface for interacting with the database, not the storage itself. You can use XML, Binary, or SQLite as the storage file. If you want a quick-and-dirty solution, you could use a basic SQLite application such as Menial's Bases to create a database. You can then add this to your XCode project for use by the iPhone. If you intend for the desktop client to be used by your iPhone customers, you can can use much of the same Core Data code from your iPhone project.
Core Data is now included starting a SDK 3.0.