views:

32

answers:

2

Hi I'm developing an app that stores data in the iPhone, but I need to know if it's possible to export the data (as an entities, tables, .txt or xls) to a desktop because I need the data to be readable on my Computer OR do I need to create a web site to do it??? by the way.. I'm still not sure what method is more effective for this kind of app, Core Data or SQLite.

A: 

Core Data on the desktop and iOS are identical. You can stand up a SQLite file created on either on the other with no issues. In these situations it is highly recommended (I would say necessary) to use the same data model in both applications.

Marcus S. Zarra
A: 

CoreData is great for data that's created and maintained all on the same iPhone (or all on the same Mac), but for whatever reason, it's not currently designed to talk to a database out on the network that's being shared. Internally CoreData can be set to use SQLite and SQLite may use a format on iPhone that matches what it uses on Mac OS X; however, tomorrow that might not be true, since they didn't necessarily design with that in mind.

If your iPhone app requires a network connection anyway and the data you're storing on the iPhone is frequently being exchanged with your computer, then you may just want to use ODBC ( http://ODBCrouter.com/ipad ). Basically you run a Windows computer (or VM) somewhere that has an ODBC driver for your data source (Excel, SQLServer, Access, MySQL, etc..) and the ODBC Router installed. From there your iPhone app can quickly connect and exchange updates using a couple of lines of code (there is a demo odbcApp included with ODBC Router). ODBC Router is not free, but it's cheap compared to the cost of building your own web site or hacking CoreData files between platforms.

Also, if the data being exchanged is private, then you'll also want to have the user turn on the iPhone's VPN (if your network doesn't already have a router with a built-in VPN server, go into the control panel on the Windows box and turn-on it's built-in PPTP VPN, then config your router to tunnel tcp+udp ports 1723 and the gre protocol 47 to your Windows box).

AugSoft Tom