Success: 1st mobile app published via LiveCode

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
donryan
Posts: 32
Joined: Mon Jul 23, 2012 1:09 pm

Success: 1st mobile app published via LiveCode

Post by donryan » Thu Nov 08, 2012 9:56 pm

This was encouraging -- my first iPhone app built using LiveCode was published the first time through -- no issues whatsoever. I used LiveCode, data grid objects, sqlite database, tmControls and native iOS text fields. I was pleasantly surprised when the app passed the review process on the first time. This is great -- on to the next one! The app can be seen here: https://itunes.apple.com/us/app/ground- ... ?ls=1&mt=8 :mrgreen:
LiveCode 5.5.3 -- OS X 10.8.2

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

Re: Success: 1st mobile app published via LiveCode

Post by Klaus » Thu Nov 08, 2012 10:09 pm

Very cool, Don, congratulation! :)

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: Success: 1st mobile app published via LiveCode

Post by dave_probertGA6e24 » Fri Nov 09, 2012 7:41 am

Definitely Congratulations. Nicely done.

Lets hope there are many sales and many more apps for you.

It's a great feeling when the App appears after the review and the sales start coming in.

Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

donryan
Posts: 32
Joined: Mon Jul 23, 2012 1:09 pm

Re: Success: 1st mobile app published via LiveCode

Post by donryan » Fri Nov 09, 2012 3:19 pm

Thanks Klaus and Dave. Yeah, didn't know what to expect, but the LiveCode team did a great job with the IDE to ensure that the complied apps pass all the Apple checks! Very cool. :D
LiveCode 5.5.3 -- OS X 10.8.2

Neurox66
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 120
Joined: Tue May 22, 2012 1:57 pm
Contact:

Re: Success: 1st mobile app published via LiveCode

Post by Neurox66 » Sat Nov 10, 2012 9:56 am

Congratulations, your app looks interesting.

I've a question:
How did you approach the problem of the various resolutions? Multiple cards?

Paolo
Paolo Borzini | paolo@borzini.it
The WhiteFly Software | www.thewhitefly.it
Service on line for printers | www.4pellicole.it

donryan
Posts: 32
Joined: Mon Jul 23, 2012 1:09 pm

Re: Success: 1st mobile app published via LiveCode

Post by donryan » Sat Nov 10, 2012 1:02 pm

Paolo:

Good question: tmControls objects scale to the screen resolution. Some objects (such as Delete buttons that I built), I actually created 2 buttons for both screen widths. I then tested the screen width, then show and position the correctly sized button. In the sample below, lblDeleteLoc is a tmContol label field that I have sized and placed where I want it, but it automatically scales itself for Retina. Also, the gbRetina is a global variable I set on the preopenStack script.

Code: Select all

put the rect of group "lblDeleteLoc" into tRect
      if gbRetina is true then
         set the visible of group "cmdDelete" to false
         set the visible of group "cmdDelete2x" to true
         set the rect of group "cmdDelete2x" to tRect
      else
         set the visible of group "cmdDelete2x" to false
         set the visible of group "cmdDelete" to true
         set the rect of group "cmdDelete" to tRect
      end if
The data grid was a lot trickier, but basically did the same thing: I created two sets of identical data grid "custom forms" which are actually cards. On the openCard event, I then determined which form to use. To prevent duplicating code (and make my life a lot easier), I kept all the code with the standard resolution stack and changed the "behavior" of the form template on the high resolution card to point to the control on the standard resolution card.

Code: Select all

-------------------------------------------------------
 ---|  Change the DataGrid Template based on the display width  |---
 -------------------------------------------------------
   if the environment is "mobile" then
      get item 1 of iPhoneDeviceResolution()  --> 320,480 -- 640,960 -- 640,1136
      If it is 320 then
         put false into gbRetina
      else
         put true into gbRetina
      end if
      if gbRetina is true then
         --     Scale the "Lesson List" template if using Retina display
         set the dgProps["row template"] of group "Lesson List" to the long id of group "Row Template" of card id 1201 of stack "Data Grid Templates 1344607172114"
      else
         set the dgProps["row template"] of group "Lesson List" to the long id of group "Row Template" of card id 1060 of stack "Data Grid Templates 1344607172114"
      end if
      dispatch "ResetList" to group "Lesson List" 
   end if 
That's a brief overview of how I did it -- however, all my cards (with the exception of the data grid objects) are all built using the standard resolution display. I took advantage of the ability of tmControls to handle most of the scaling for me and those objects that didn't scale on their own, I wrote code for (which were basically manually created buttons and graphics). I used the tmControls label object as invisible "placeholders" for my own objects to make placement a lot easier. Now I know there may be easier ways to accomplish some of this, but what I did worked for me. 8)
LiveCode 5.5.3 -- OS X 10.8.2

Neurox66
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 120
Joined: Tue May 22, 2012 1:57 pm
Contact:

Re: Success: 1st mobile app published via LiveCode

Post by Neurox66 » Sat Nov 10, 2012 4:26 pm

Very clear and usefull.
Thank you very much.

Paolo
Paolo Borzini | paolo@borzini.it
The WhiteFly Software | www.thewhitefly.it
Service on line for printers | www.4pellicole.it

codemonster
Posts: 20
Joined: Fri Nov 09, 2012 11:02 pm

Re: Success: 1st mobile app published via LiveCode

Post by codemonster » Sun Nov 11, 2012 4:58 am

Thanks for posting, the app looks great. I'm looking to create apps vs. games and was wondering what was out there.

Post Reply