views:

95

answers:

1

This might be a stupid question, but I was wondering whether or not you can use the Core Data libraries on Linux at all? I'm planning how to build the server side of an iPhone app that I'm working on, and have found that you can use PyObjC to get access to Core Data in a Python environment, e.g. use Core Data in a TurboGears web application.

At this point I'm thinking that you would have to run the web server on Mac OSX, because I can't find any evidence on the internet that you can access the Objective-C libraries on Linux. I've always written webapps on Linux but will obviously make the jump to an OSX server if it allows me to use the same datastore implementation on the iPhone and the server, the only job remaining being the Core Data <-> Web Services XML translation that has to happen on the wire.

+2  A: 

Core Data is part of Cocoa, and Linux does not have Cocoa. Use SQLAlchemy instead.

Ignacio Vazquez-Abrams
Thanks for clarifying that Linux has no way of running Cocoa and/or Core Data, but not quite sure what you mean on the SQLAlchemy part. I can't see anything to suggest that an SQLAlchemy database would be compatible with a Core Data data definition, or vice versa. My objective is to only have one data definition and use it both on the iPhone and the server. Since my DD on the iPhone has to be in Core Data, I'm just looking for a way of using the Core Data libs on the server, and I can't see how SQLAlchemy achieves that. I can see how using PyObjC on TurboGears on OSX does though ...
glenc
For anyone returning to this question, just confirming that loading CoreData data definitions into a TurboGears server does in fact work.
glenc