QC DBSync

15 views
Skip to first unread message

Francesco

unread,
Feb 12, 2012, 11:38:38 AM2/12/12
to QuickConnect
Hi Lee,

first of all thank you for your efforts developing the QC framework.
It seems to provide the functionality I am looking for.

My goal is a iPhone app (native obj c with XCode) using core data. It
will run on a few ios devices. Now I would like to sync the local
sqLite data base on the devices with a mySQL data base which is
running on my home web server (mySQL, php and phpMyAdmin installed).

After reading lot of info on QC I feel like Enterprise Synchronization
is what I need.

I downloaded QCDBSync1.3 zip file. I'm able to run the iOS QC DBSync
Example on the iPad 5.0 Simulator (without server connection)

I'm struggling with the serverside setup though.
I copied the PHPSyncServerExample files into the folder of my web
server.
What files do I have to change in order to get your game score example
syncing with the mySQL data base (e.g. db selection)
Do I have to have to setup the mySQL db by myself for the first time
(name, tables, values)?

Is there a step-by-step guide to setup the server side? I haven't
found any.

Any kind of help is highly appreciated.

Thanks in advance.

Francesco

Lee Barney

unread,
Feb 13, 2012, 12:07:44 PM2/13/12
to quickconn...@googlegroups.com
Francesco,

I have just stared a Doctoral degree and it is sucking up most of my time currently. The PHP side isn't something that I designed to be release ready. In fact it states so in the PHP source. The idea is that you would need to create a PHP page that would interact with your MySQL database. There is no standard design for the database. One item you should be aware of is that when something other than your iOS app inserts records, there will need to be UUIDs generated for the records.

Your PHP code will also need to handle all data collisions.

Thanks,


Lee

> --
> You received this message because you are subscribed to the Google Groups "QuickConnect" group.
> To post to this group, send email to quickconn...@googlegroups.com.
> To unsubscribe from this group, send email to quickconnectiPh...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/quickconnectiPhone?hl=en.
>

Francesco

unread,
Feb 13, 2012, 1:57:00 PM2/13/12
to QuickConnect
Lee,

thanks for your quick answer. I understand the time issue since I'm a
phd student myself.

If I understand right the QC DBSync 1.3 framework ist suitable for my
purpose.

Somewhere (I think it was in mappings.inc, line 3 where)
"Utilities.inc" is spelled with an upper case U [require_once
getcwd().DIRECTORY_SEPARATOR.'utilities.inc';] resulting in an error.
Can you confirm?

Maybe you can tell where the hard coded php parts are (filenames,
lines).
I'm especially interested in the spots where user ids, passwords, urls
etc. are coded that need to be changed. I keep missing some parts for
change and that's why it doesn't connect.
I just would like to get your example working in order to adapt it for
my purpose afterwards. I completely understand that it is not
production code ready for release.
I'm sorry i'm not strong at php coding. My App is working fine already
(without sync of course).

Thanks,
Francesco

Lee Barney

unread,
Feb 13, 2012, 2:04:23 PM2/13/12
to quickconn...@googlegroups.com
See embedded answers.


Thanks,


Lee


On Feb 13, 2012, at 11:57 AM, Francesco wrote:

> Lee,
>
> thanks for your quick answer. I understand the time issue since I'm a
> phd student myself.
>
> If I understand right the QC DBSync 1.3 framework ist suitable for my
> purpose.

I believe so.

>
> Somewhere (I think it was in mappings.inc, line 3 where)
> "Utilities.inc" is spelled with an upper case U [require_once
> getcwd().DIRECTORY_SEPARATOR.'utilities.inc';] resulting in an error.
> Can you confirm?

The code was written on an OS that is not case dependent so you could see this on an OS like Linux.

>
> Maybe you can tell where the hard coded php parts are (filenames,
> lines).
> I'm especially interested in the spots where user ids, passwords, urls
> etc. are coded that need to be changed. I keep missing some parts for
> change and that's why it doesn't connect.

The example you are looking at uses the QuickConnect design pattern in the PHP. You will find the functionality in the functions.inc file. The 'stack' of functions to call for each command received in the mappings.inc file. Each stack shows you the functionality flow for each command

The functions.inc file has the hard coded functionality in it.

Reply all
Reply to author
Forward
0 new messages