Getting Started with LiveCode for Mobile

Exclusive offer: get 50% off this eBook here
LiveCode Mobile Development Beginner's Guide

LiveCode Mobile Development Beginner's Guide — Save 50%

Create fun-filled, rich apps for Android and iOS with LiveCode with this book and ebook

€20.99    €10.50
by Colin Holgate | July 2012 | Beginner's Guides

LiveCode has an English-like programming language, a graphical development environment, and an easy-to-understand structural metaphor. When you create an application, you spend more time thinking about how to implement the different features, and less about the complexities of the tool you are using. But if you've never used LiveCode before, it's still going to be unfamiliar at first.

Before we can do neat things…

Creating stacks that do something that you will find useful or that may become a mobile app that you can sell, is a very gratifying process. Minute by minute, you can be making progress, and instantly see improvements that you have made. Unfortunately, there is a lot of less gratifying work to be done before and after you have made your masterpiece. In this article by Colin Holgate, author of LiveCode Mobile Development Beginner's Guide, we will take you through the before part.

LiveCode makes mobile apps by taking the stack you have made, along with any supporting files you have added, and compiles the application file using the developer kit that you will download from the mobile OS provider – Google for Android and Apple for iOS. In this article we will:

  • Sign up for Android Market
  • Sign up for Amazon Appstore
  • Download and install the Android SDK
  • Configure LiveCode so that it knows where to look for the Android SDK
  • Become an iOS developer with Apple
  • Download and install Xcode
  • Configure LiveCode so that it knows where to look for the iOS SDKs
  • Set up simulators and physical devices
  • Test a stack in a simulator and physical device

Here we go...

 

 

(For more resources on Mobile Development, see here.)

iOS, Android, or both?

It could be that you only have an interest in iOS or only in Android. You should be able to easily see where to skip ahead to, unless you're intrigued about how the other half lives! If, like me, you're a capitalist, then you should be interested in both OSes. Far fewer steps are needed to get the Android SDK than to get the iOS developer tools, because of having to sign up as a developer with Apple, but the configuraton for Android is more involved. We'll go through all the steps for Android and then the ones for iOS. If you're an iOS-only kind of person, skip the next few sections, picking up again at the Becoming an iOS Developer section.

Becoming an Android developer

It is possible to develop Android OS apps without having to sign up for anything, but we'll try to be optimistic and assume that within the next 12 months, you will find time to make an awesome app that will make you rich! To that end, we'll go over what is involved in signing up to publish your apps in both the Android Market and the Amazon Appstore.

Android Market

A good starting location would be http://developer.android.com/.

You will be back here shortly to download the Android SDK, but for now, click on the Learn More link in the Publish area. There will be a sign-in screen; sign in using your usual Google details.

Which e-mail address to use?
Some Google services are easier to sign up for, if you have a Gmail account. Creating a Google+ account, or signing up for some of their Cloud services, requires a Gmail address (or so it seemed to me at the time!). If you have previously set up Google Checkout as part of your account, some of the steps in signing up process become simpler. So, use your Gmail address, and if you don't have one, create one!

  • Google charges a $25 fee for you to sign up for Android Market. At least you find out about this right away! Enter the values for Developer Name, Email Address, Website URL (if you have one), and Phone Number.
  • The payment of the $25 can be done through Google Checkout.
  • Using Google Checkout saves you from having to enter in your billing details, each time. Hopefully you won't guess the other 12 digits of my credit card number!
  • Finally, you need to agree to the Android Market Developer Distribution Agreement.
  • You're given an excuse to go and make some coffee…
  • Some time later, you're all signed up and ready to make your fortune!

 

Amazon Appstore

Whereas the rules and costs for the Google Android Market are fairly relaxed, Amazon has taken a more Apple-like approach, both in the amount they charge you to register and in the review process for accepting app submissions. The starting page is http://developer.amazon.com/home.html.

 

  1. When you click on Get Started, you will be asked to sign into your Amazon account.
  2. Which e-mail address to use?
    This feels like déjà vu! There is no real advantage in using your Google e-mail address when signing up for the Amazon Appstore Developer Program, but if you happen to have an account with Amazon, sign in with that one. It will simplify the payment stage, and your developer account and general Amazon account will be associated with each other.

  3. You are asked to agree to the APPSTORE DISTRIBUTION AGREEMENT terms before learning about the costs.
  4. Those costs are $99 per year, but the first year is free. So that's good!
  5. Unlike the Google Android Market, Amazon asks for your bank details upfront, ready to send you lots of money later, we hope!
  6. That's it; you're ready to make another fortune, to go along with the one that Google sends you!

 

Downloading the Android SDK

Head back over to http://developer.android.com/, and click on the Download link, or go straight to http://developer.android.com/sdk/index.html.

In the book previously mentioned, we're only going to cover Windows and Mac OS X (Intel), and only as much as is needed to make LiveCode work with the Android and iOS SDKs. If you intend to do native Java-based applicatons, then you may be interested in reading through all of the steps that are described in the web page: http://developer.android.com/sdk/installing.html

Click on the Download link for your platform. The steps you'll have to go through are different for Mac and Windows. Let's start with Mac.

Installing Android SDK on Mac OS X (Intel)

LiveCode itself doesn't require an Intel Mac; you can develop stacks using a PowerPC-based Mac, but both the Android SDK and some of the iOS tools require an Intel-based Mac, which sadly means that if you're reading this as you sit next to your Mac G4 or G5, then you're not going to get too far!

The file that you just downloaded will automatically expand to show a folder named android-sdk-macosx. It may be in your downloads folder right now; a more natural place for it would be in your Documents folder, so move it there before performing the next steps.

There is an SDK Readme text file that lists the steps you will need to take. If those steps are different to what we have here, then follow the steps in the Readme, in case they have been updated since the steps shown here were written.

Open the application Terminal, which is in Applications/Utilities. You need to change the directories to be located in the android-sdk-macosx folder. One handy trick in Terminal is that you can drag the items into the Terminal window to get the file path to that item. Using that trick, you can type cd and a space into the Terminal window, then drag the android-sdk-macosx folder just afer the space character. You'll end up with this line:

new-host-3:~ colin$ cd /Users/colin/Documents/android-sdk-macosx

Of course, the first part of the line and the user folder will match yours, not mine! The rest will look the same. Here's how it would look for a user named fred:

new-host-3:~ fred$ cd /Users/fred/Documents/android-sdk-macosx

Whatever your name is, press the Return or Enter key after entering that line. The location line changes to look similiar to the following:

new-host-3:android-sdk-macosx colin$

Either type carefully or copy and paste this line from the read me file:

tools/android update sdk --no-ui

Press Return or Enter again. How long the downloads take will depend on your Internet connection. Even with a very fast Internet connection, it will still take over an hour.

 

Installing Android SDK on Windows

The downloads page recommends using the exe download link, and that will do extra things, such as check whether you have the Java Development Kit (JDK) installed. When you click on the link, use either the Run or Save options as you would with any download of a Windows installer. Here we opted to use Run. If you do use Save, then you will need to open the file after it has saved to your hard drive. In the following case, as the JDK wasn't installed, a dialog box appears saying go to Oracle's site to get the JDK:

If you see this, then you can leave the dialog box open and click on the Visit java.oracle.com button. On the Oracle page, you have to click on a checkbox to agree to their terms, and then on the Download link that corresponds with your platform. Choose the 64-bit option if you are running a 64-bit version of Windows, or the x86 option if you are running 32-bit Windows.

Either way, you're greeted with another installer to Run or Save, as you prefer. Naturally, it takes a while for that installer to do its thing too! When the installation completes, you will see a JDK registration page; it's up to you if you register or not.

Back at the Android SDK installer dialog box, you can click on the Back button, and then the Next button to get back to that JDK checking stage; only now it sees that you have the JDK installed. Complete the remaining steps of the SDK installer, as you would with any Windows installer.

One important thing to notice; the last screen of the installer offers to open the SDK Manager. You do want to do that, so resist the temptation to uncheck that box! Click on Finish, and you'll be greeted with a command-line window for a few moments, then the Android SDK Manager will appear and do its thing.

As with the Mac version, it takes a very long time for all these add-ons to download.

Pointing LiveCode to the Android SDK

After all that installation and command-line work, it's a refreshing change to get back into LiveCode!

Open the LiveCode Preferences, and choose Mobile Support.

We will set the two iOS entries after getting iOS going (on Mac that is, these options will be grayed out on Windows). For now, click on the button next to the Android development SDK root field, and navigate to where the SDK has been installed. If you followed the earlier steps correctly, then it will be in the Documents folder on Mac, or in C:\Program Files (x86)\Android\ on Windows (or somewhere else if you chose to use a custom location).

Phew! Now, let's do iOS…

LiveCode Mobile Development Beginner's Guide Create fun-filled, rich apps for Android and iOS with LiveCode with this book and ebook
Published: July 2012
eBook Price: €20.99
Book Price: €34.99
See more
Select your format and quantity:

 

(For more resources on Mobile Development, see here.)

Becoming an iOS developer

Creating iOS LiveCode applications requires that LiveCode must have access to the iOS SDK. This is installed as a part of the Xcode developer tools, and that is a Mac-only program. Also, when you do upload an app to the iOS App Store, the application that is used is also Mac-only, and is also part of the Xcode installation. If you are a Windows-based developer and wish to develop and publish for iOS, then you will need either a virtual machine that can run Mac OS, or an actual Mac.

The biggest difference between becoming an Android developer and an iOS developer is that you have to sign up with Apple for their developer program, even if you never produce an app for the iOS App Store. If things go well, and you end up making an app for the various stores, then this isn't such a big deal. It will have cost you $25 to be able to submit to the Android Market, $99 a year (with the first year free) to submit to the Amazon Appstore, and $99 a year (including the first year) to be an iOS developer with Apple. Just sell more than 300 copies of your amazing $0.99 app, and it's paid for itself!

Your starting point for iOS is http://developer.apple.com/programs/ios/.

When signing up to be an iOS developer, there are four possibilites when it comes to your current status. If you already have an Apple ID, that you might use with your Apple online store purchases, or perhaps your iTunes Store purchases, then you could choose the I already have an Apple ID… option. In order to illustrate all of the steps in signing up, we will choose to start as a brand new user.

You can choose to sign up as an individual or as a company. We will choose Individual.

As with any such sign-up process, you will need to enter your personal details, set a security question, and enter your postal address.

Most Apple software and services have their own legal agreement for you to sign. This one is the general Registered Apple Developer Agreement.

In order to verify the e-mail address you have used, a verification e-mail is sent to you, with a link in the e-mail to click on, or you can enter the code manually. Once you have completed the verification step, you can enter your billing details.

It could be that you will go on to make LiveCode applications for the Mac App Store, in which case you would also need to add the Mac Developer Program product. For our purposes, we only need to sign up for iOS Developer Program.

Each product that you sign up for has its own agreement. Lots of small print to read!

The actual purchasing of the iOS developer account is handled through the Apple Store for your region.

As you will see, it is going to cost you $99 per year, or $198 per year if you also signed up for the Mac Developer account. Most LiveCode users won't need to sign up for the Mac Developer account, unless the plan is to also submit desktop apps to the Mac App Store.

After submitting the order, you are rewarded by being told that you are now registered as an Apple Developer!

Sadly, it's not an instant approval, as was the case with the Android Market or Amazon Appstore. You have up to five days to wait for the approval. In the early iPhone Developer days, it could take a month or more, so 24 hours is an improvement!

 

Installing Xcode

Once you receive the confirmation of being an iOS developer, you will be able to log into the iOS Dev Center, at https://developer.apple.com/devcenter/ios/index.action. This same page is used by iOS developers who are not using LiveCode, and is full of support documents to help someone create native applications using Xcode and Objective-C. We don't need most of that, but we do need to download Xcode.

In the downloads area of the iOS Dev Center page, you will see different Xcode versions for Mac OS 10.6 (Snow Leopard) and for Mac OS 10.7 (Lion), as well as the link to the older Xcode 3. You can also get code from the Mac App Store, and as of version 4.3 of Xcode, that takes the form of an application instead of a developer folder.

Installing Xcode from the Mac App Store is very straightforward; it's just like buying any other app from the store, except that it's free! It does require that you are using Mac OS 10.7.3 or later. If you are using an older system, then you would download one of the older versions from the developer page.

The older Xcode installation process is much like any other Mac application:

The Xcode installations take a very long time, but in the end, you should have the Developer folder, or new Xcode application, ready for LiveCode to find.

Coping with newer and older devices
In early 2012, Apple brought to market a new iPad. The main selling point of this one compared to the iPad 2 is that it has a "Retna" display. The regular iPads have a resolution of 1024x768, and the Retna version has a resolution of 2048x1536. If you wish to build applications to take advantage of that, you must get the version of Xcode from the Mac App Store, and not one of the older versions from the developer page. The new Xcode demands that you be on Mac OS 10.7.3, or later. So, to fully support the latest devices, you may have to update your system software more than you were expecting! But wait, there's more. By taking a later version of Xcode, you are then missing the iOS SDK versions that are needed to support older iOS devices, such as the original iPhone and the iPhone 3G. Fortunately, you can go into Preferences in Xcode, and there is a Downloads tab, where you can have those older SDKs downloaded into the new version of Xcode.

Pointing LiveCode to the iOS SDKs

Open the LiveCode Preferences, and choose Mobile Support.

Click on the button next to the Location of developer root for iOS 5.0 and above : field, and you will see a dialog box that asks if you are using Xcode 4.2 or 4.3. If you choose 4.2, then go on to select the folder named Developer at the root of your hard drive. For 4.3, choose the Xcode application itself, in your Applications folder. If you are using an older system that wasn't able to run Xcode 4.2 or 4.3, and had to take the Xcode 3 download, click on the button next to the Location of developer root for iOS 4.0 and above: field, and again, select the folder named Developer at the root of your hard drive. LiveCode now knows where to find the SDKs for iOS.

Before we can make our first mobile app

Now that the required SDKs are installed, and LiveCode knows where they are, we can make a stack and test it in a simulator or on a physical device. We do, however, have to get the simulators and physical devices warmed up.

Getting ready to test for Android

Simulating on iOS is easier than it is for Android, and testing on a physical device is easier on Android than on iOS, but the setting up of physical Android devices can be horrendous!

Time for action – starting an Android virtual device

You will have to do a little digging deep into the Android SDK folders to find the Android Virtual Device setup program, and you might well want to make a shortcut or alias to it for quicker access.

  1. Navigate to the Android SDK tools folder, located at C:\Program Files (x86)\ Android\android-sdk\ on Windows, and in your Documents:android-sdk- macosx:tools folder on Mac.
  2. Open AVD Manager on Windows, or Android on Mac (it looks like a Unix executable - just double-click on it, and the application will open via a command-line window).
  3. If you're on Mac, select Manage AVDs… from the Tools menu.
  4. Select Tablet from the list of devices (there are only two when you have first installed the android SDK - you can add your own custom ones here as well).
  5. Click on the Start button.
  6. Sit patiently while the virtual device starts up!
  7. Open LiveCode, and create a new Mainstack, and Save the stack to your hard drive.
  8. Select File | Standalone Application Settings….
  9. Click on the Android icon, and select the Build for Android check box.
  10. Close the Settings dialog box, and take a look at the Development menu.
  11. If the virtual machine is up and running, you should see it listed in the Test Target submenu.

What just happened?

You have opened up an Android virtual device, and LiveCode will be able to test the stacks using that device, once it has finished loading.

Connecting a physical Android device

Connecting a physical Android device can be extremely straightforward:

  1. Connect your device by USB.
  2. Look at the Development Test Target submenu to see it listed.

There can be problem cases though, and Google Search will become your best friend before you are done! We should look at an example problem case to give you ideas on how to solve any similiar situations you may encounter.

Using a Kindle Fire

When it comes to finding Android devices, the Android SDK recognizes a lot of them automatically. Some devices are not recognized, and you have to do something to help Android Debug Bridge (ADB) find them.

ADB is the part of the Android SDK that acts as a go-between from your device to any software that needs to be able to access the device. In some cases, you will need to go into the Android system on the device to tell it to allow access for development purposes. For example, on an Android 3 (Honeycomb) device, you need to go into Settings | Applications | Development, and activate the USB debugging mode.

Kindle Fire comes with USB debugging already enabled; you don't have to do anything, but the ADB system doesn't know about the device at all. You can fix that!

Time for action – adding a Kindle Fire to ADB

It only takes one line of text to add the Kindle Fire to the list of devices that ADB knows about. The harder part is tracking down the text file to edit, and getting ADB to restart after making the changes. Things are more involved with Windows than Mac, because you also have to configure the USB driver, so the two systems are shown here as separate processes:

For Windows:

  1. In Windows Explorer, navigate to where the file adb_usb.ini is located, at C:\ Users\yourusername\.android\.
  2. Open the text file adb_usb.ini in a text editor. The file has no visible line breaks, so Wordpad would be a better option than Notepad.
  3. On the line after the three instruction lines, type 0x1949.
  4. Make sure there are no blank lines, and the last character in the text file should be the 9 at the end of 0x1949.
  5. Save.
  6. Navigate to where android_winusb.inf is located, at C:\Program Files (x86)\Android\android-sdk\extras\google\usb_driver\.
  7. Right-click on the file, and in Properties | Security, select Users from the list, and click on Edit to set the permissions so that you are allowed to write to the file.
  8. Open android_winusb.inf in Notepad.
  9. Add these three lines to the [Google.NTx86] and [Google.NTamd64] sections, and save the file.

    ;Kindle Fire %SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006 %CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01

  10. You will need to set the Kindle to use the Google USB driver that you just edited.
  11. In the Windows control panel, Device Manager, find the Kindle entry in the list that is under USB.
  12. Right-click on the Kindle entry and choose Update Driver Software….
  13. Choose the option that lets you find the driver on your local drive, navigate to the google\usb_driver\ folder, and select it to be the new driver.
  14. When the driver is updated, open a command window (handy trick: Shift+right-click on the desktop and select Open command window here).
  15. Change directories to where the ADB tool is located, by typing the following:

    cd C:\Program Files (x86)\Android\android-sdk\platform-tools\

  16. Type these three lines, with pressing Enter after each line:

    adb kill-server adb start-server adb devices

  17. You should see the Kindle Fire listed (as an obscure looking number), as well as the virtual device, if you still have that running.

For Mac (MUCH simpler!):

  1. Navigate to where the file adb_usb.ini is located. On Mac, in Finder, select the menu Go | Go to Folder…, and type in ~/.android/.
  2. Open the file adb_usb.ini in a text editor.
  3. On the line after the three instruction lines, type 0x1949.
  4. Make sure there are no blank lines; the last character in the text file would be the 9 at the end of 0x1949.
  5. Save.
  6. Open Utilities | Terminal.
  7. You can let OSX know how to find ADB from anywhere, by typing this line (replace yourusername with your username, and also change the path if you installed the Android SDK to a different location):

    export PATH=$PATH:/Users/yourusername/Documents/android-sdk- macosx/platform-tools

  8. Now, enter the same three lines we did with Windows:

    adb kill-server adb start-server adb devices

  9. Again, you should see the Kindle Fire listed.

What just happened?

I suspect that you're going to have nightmares about all those steps! It took a lot of searching on the web to find some of those obscure hacks. The general case with Android devices on Windows is that you have to modify the USB driver for the device to be handled by the Google USB driver, and you may have to modify the adb_usb.ini file (on Mac too) for the device to be considered as an ADB compatible device.

Getting ready to test for iOS

If you carefully went through all those Android steps, especially on Windows, you will hopefully be amused by the brevity of this section! There is a catch though; you can't really test on an iOS device from LiveCode. We'll look at what you have to do instead in a moment, but first, here are the steps required for testing an app in the iOS simulator.

 

Time for action – using the iOS simulator

The first steps are much like those for Android apps, but then it gets quicker. Remember, this only applies to Mac OS,and you can only do these things on Windows if you are using Mac OS in a virtual machine, and doing that is most likely not covered by the Mac OS user agreement! In other words, it's best to get a Mac if you intend to develop for iOS.

  1. Open LiveCode, create a new Mainstack, and save the stack to your hard drive.
  2. Select File | Standalone Application Settings….
  3. Click on the iOS icon, and select the Build for iOS check box.
  4. Close the settings dialog box, and take a look at the Development menu.
  5. You will see a list of simulator options, for iPhone and iPad, and different versions of iOS.

 

What just happened?

I suspect that you're going to have nightmares about all those steps! It took a lot of searching on the web to find some of those obscure hacks. The general case with Android devices on Windows is that you have to modify the USB driver for the device to be handled by the Google USB driver, and you may have to modify the adb_usb.ini file (on Mac too) for the device to be considered as an ADB compatible device.

Getting ready to test for iOS

If you carefully went through all those Android steps, especially on Windows, you will hopefully be amused by the brevity of this section! There is a catch though; you can't really test on an iOS device from LiveCode. We'll look at what you have to do instead in a moment, but first, here are the steps required for testing an app in the iOS simulator.

 

Time for action – using the iOS simulator

The first steps are much like those for Android apps, but then it gets quicker. Remember, this only applies to Mac OS,and you can only do these things on Windows if you are using Mac OS in a virtual machine, and doing that is most likely not covered by the Mac OS user agreement! In other words, it's best to get a Mac if you intend to develop for iOS.

What just happened?

That was it, all it takes to get going with testing using the iOS simulators! Testing on a physical iOS device requires that we create an application first, so let's do that.

LiveCode Mobile Development Beginner's Guide Create fun-filled, rich apps for Android and iOS with LiveCode with this book and ebook
Published: July 2012
eBook Price: €20.99
Book Price: €34.99
See more
Select your format and quantity:

 

(For more resources on Mobile Development, see here.)

Appiness at last!

By this point, you should be able to create a new Mainstack, save it, select either iOS or Android in the Standalone Settings dialog box, and be able to see simulators or virtual devices in the Development/Test menu item. In the case of an Android app, you will also see your device listed, if it is connected via USB at the time.

Time for action – testing a simple stack in the simulators

Feel free to make things that are more elaborate than asked for in these steps! The instructions will be making the assumption that you know how to find things for yourself in the object inspector palette.

  1. Open LiveCode, create a new Mainstack, and save it to a location where it's easy to find in a moment from now.
  2. Set the card window to a size of 1024x768, and uncheck the Resizable checkbox.
  3. Drag a label field into the top-left corner of the card window, and set its contents to something appropriate. Hello World could do nicely!
  4. If you're developing on Windows, skip to step 11.
  5. Open the Standalone Application Settings dialog, click on the iOS icon, and select the Build for iOS checkbox.
  6. Under Orientation Options, set the iPhone initial orientation to Landscape.
  7. Close the dialog box.
  8. From the Development/Test Target sub-menu, choose the iPad Simulator.
  9. Select Test from the Development menu.
  10. You should be now seeing your test stack running in the iOS simulator!
  11. As discussed earlier, launch the Android virtual device.
  12. Open the Standalone Application Settings dialog box , click on the Android icon, and select the Build for Android checkbox.
  13. Under User Interface Options, set the initial orientation to Landscape.
  14. Close the dialog box.
  15. If the virtual device is running by now, do whatever is necessary to get past the locked home screen, if that's what is showing.
  16. From the Development/Test Target sub-menu, choose the Android emulator.
  17. Select Test from the Development menu.
  18. You should be now seeing your test stack running in the Android emulator!

What just happened?

All being well, you just made and ran your first mobile app, on both Android and iOS! For an encore, we should try it on physical devices, if only to give Android a chance to show how easy it can be to do that. There is a whole can of worms we haven't yet opened to do with getting an iOS device configured so that it can be used for testing. You could visit the iOS Provisioning Portal at https://developer.apple.com/ios/manage/overview/index.action , and look at the How To tab in each of the different sections.

Time for action – testing a simple stack on devices

Get your USB cables ready, and connect the devices to your computer. Android first…

  1. You should still have Android selected in Standalone Application Settings.
  2. Get your device to its home screen, past the initial lock screen if there is one.
  3. Choose Development/Test Target, and select your Android device. It may well say Android and a very long number.
  4. Choose Development/Test.
  5. The stack should now be running on your Android device.

Now iOS…

  1. If you have not have not installed certificates and provisioning files, then you will have to skip this test for now.
  2. Change the Standalone Application Settings back to iOS.
  3. Under Basic Application Settings of the iOS settings is a Profle drop-down menu showing the provisioning files that you have installed. Choose the one that is configured for the device you are going to test.
  4. Close the dialog box, and choose Save as Standalone Application… from the File menu.
  5. In Finder, locate the folder that was just created, and open it to reveal the app file itself. As we didn't give the stack a sensible name, it will be named Untitled 1.
  6. Open Xcode, which is in the Developer folder you created earlier, in the Applications sub-folder.
  7. In Xcode, choose Organizer from the Window menu, and select Devices, if it isn't already selected.
  8. You should see your device listed. Select it, and if you see a button labeled Use for Development, click on that button.
  9. Drag the app file straight from Finder to your device in the Organizer window.
  10. The small colored circle will turn orange for a moment, and then back to green. You can now open the app on your iOS device!

What just happened?

In additton to getting a test stack working on real devices, we also saw how easy it is, once it's all configured, to test a stack straight to an Android device. If you are developing an app that is to be deployed on both Android and iOS, you may find that the fastest way to work is to test with the iOS Simulator for iOS tests, but to test directly on an Android device instead of using the Android SDK virtual devices.

 

Have a go hero – Nook

Until recently, the Android support for the Nook Color from Barnes and Noble wasn't good enough for LiveCode apps to be installed. It seems to have improved though, and could well be another worthwhile app store for you to target.

Investigate the signing up process, download their SDK, and so on. With any luck some of what you learned in signing up for the other stores will also apply to the Nook store. Here is your starting point:

https://nookdeveloper.barnesandnoble.com

Further reading

The SDK providers, Google and Apple, have extensive pages of information on setting up their development environments, creating certificates and provisioning files, and so on. The information does have to cover a lot of topics that don't apply to LiveCode, so try not to get lost! These would be good starting pages:

Summary

Signing up for programs, file downloading, command-lining your way all over the place, and patiently waiting for the Android emulator to launch, means that it could take the best part of a day to work through what we've covered in this article! Fortunately, you only have to go through it once.

We did work through the tasks that you have to do before you can create a mobile app in LiveCode:

  • Download and install the Android SDK
  • Sign up as an iOS developer
  • Download and install Xcode and the iOS SDKs
  • Configure devices and simulators

We also covered some topics that will be useful once you are ready to upload a finished app:

  • Signing up for Android Market
  • Signing up for Amazon Appstore

 


Further resources on this subject:


About the Author :


Colin Holgate

Colin Holgate was originally trained as a telecommunications technician in the Royal Air Force, but with the advent of the personal computer era he transitioned to working as a technical support engineer for companies that included Apple Computer UK.

In 1992 he moved to the USA, to become a full time multimedia programmer, working for The Voyager Company. In that role he programmed several award winning CD-ROMs, including A Hard Day’s Night and This Is Spinal Tap.

For the last 12 years Colin has worked for Funny Garbage, a New York City based web design company. In addition to using Adobe Director and Adobe Flash for online and kiosk application, he has used LiveCode for in-house production tools. At the introduction of LiveCode for Mobile at the RunRevLive Conference in 2011, Colin entered, and won a contest to create a mobile application made with LiveCode.

Books From Packt


Corona SDK Mobile Game Development: Beginner's Guide
Corona SDK Mobile Game Development: Beginner's Guide

Android NDK Beginner’s Guide
Android NDK Beginner’s Guide

jQuery Mobile First Look
jQuery Mobile First Look

Sencha Touch Mobile JavaScript Framework
Sencha Touch Mobile JavaScript Framework

HTML5 Mobile Development Cookbook
HTML5 Mobile Development Cookbook

Windows Phone 7 XNA Cookbook
Windows Phone 7 XNA Cookbook

iPhone Location Aware Apps by Example - Beginner's Guide
iPhone Location Aware Apps by Example - Beginner's Guide

Learning Mobile Game Development with Marmalade: RAW
Learning Mobile Game Development with Marmalade: RAW

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software