iOS and AWS-hosted PostgreSQL

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SillySoviet
Posts: 7
Joined: Sun May 18, 2014 10:54 pm

iOS and AWS-hosted PostgreSQL

Post by SillySoviet » Wed Jul 09, 2014 12:47 pm

Hi guys,

I built my first (!) application with LiveCode that accesses an AWS-hosted PostgreSQL database perfectly on Windows and OS X. However, when I go to test it in the iOS simulator, the database access is totally lacking. None of the queries work, and the app doesn't even seem to connect to the db.

I'm currently using the community edition and will, without a problem, purchase the commercial edition once I get iOS going, but iOS + cross-platform deployment the only reason I wanted to do this in LiveCode to start.

Any clues would be tremendously appreciated. Thank you!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: iOS and AWS-hosted PostgreSQL

Post by Klaus » Wed Jul 09, 2014 2:35 pm

Sorry, no idea, but I noticed that although PostgreSQL database is indicated in the dictionary to be also working on iOS,
there is no appropriate checkbox for PostgreSQL in the iOS standalone builder tab?

SillySoviet
Posts: 7
Joined: Sun May 18, 2014 10:54 pm

Re: iOS and AWS-hosted PostgreSQL

Post by SillySoviet » Wed Jul 09, 2014 3:03 pm

Yes, I saw that too. MySQL is there in the iOS standalone tab but no PostgreSQL. I'm not sure if MySQL works, but I know I can't use that database format for my needs.

Anyone else have any ideas?

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: iOS and AWS-hosted PostgreSQL

Post by FireWorx » Thu Jul 17, 2014 8:21 am

I build an IOS app.that passed SQL commands to iRev scripts sitting on my on-rev server that then passed along the requests to the web hosted MySql database. The iRev scripts on the server post and get information from that DB and pass it back to the IOS app. I just checked my on-rev c-panel and see that they have a web hosted PostgreSQL database. The catch is the iRev scripts only work on revolution server. Perhaps you could do the same thing with PostgreSQL database at AWS and use PHP as the gatekeeper. I know nothing about PHP however I do have some irev examples posted her in the forums that would come up if you searched it.

Dave

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: iOS and AWS-hosted PostgreSQL

Post by Simon » Thu Jul 17, 2014 1:10 pm

I'm not sure if MySQL works
Yes, I have iOS and Android communicating with a MySQL database.
I have a feeling I may have been lucky with my host though, it was very easy to setup.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

SillySoviet
Posts: 7
Joined: Sun May 18, 2014 10:54 pm

Re: iOS and AWS-hosted PostgreSQL

Post by SillySoviet » Tue Jul 22, 2014 7:51 pm

Thanks guys. MySQL seems to be built in to the iOS standalone application framework, but PostgreSQL is not (yet). Think that PHP is the way to go and will try that. Otherwise, I might just have to ditch livecode altogether and take the native coding dive while learning Swift, which I really hesitate to do.

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: iOS and AWS-hosted PostgreSQL

Post by FireWorx » Thu Jul 24, 2014 8:08 pm

If you have a live code server like the now available at On-Rev.com and you know Livecode the Irev scripts are pretty simple to construct. I can provide you with some examples if you want. They sit on the live code server and can be viewed with the c-panel utility. The MySql database is also set up using the c-panel database utility. You can import data from an excel file of csv file. Get your database columns in order and then it becomes a matter of loading your search criteria into variables (derived from your live code mobile user interface) and executing the irev file. The irev file contains pre-staged query and database connect criteria and when it executes it returns with the query for your user at his mobile platform. You alter the database in the same way. The point is your live code mobile app can't talk directly to your MySql database there has to be PHP, iRev or JSON, etc as a go between. Others may be able to correct me but I believe that to be it in a nut shell. I see that PostgreSQL is available as an option in the c-Panel at On-Rev right next to MySql. Why don't you ask them if iRev scripts can be used with the PostgreSQL as well? It's a pretty simple question.


SillySoviet
Posts: 7
Joined: Sun May 18, 2014 10:54 pm

Re: iOS and AWS-hosted PostgreSQL

Post by SillySoviet » Fri Jul 25, 2014 3:13 am

Thanks so much Fireworx! Very helpful and encouraging to have your input. I'll give this a try...

Post Reply