Time for action – testing a simple stack in the simulators

Feel free to make things that are more elaborate than the ones we have made through these steps! The following instructions make an assumption that you know how to find things by yourself in the object inspector palette:

  1. Open LiveCode, create a new Mainstack, and save it someplace where it is easy to find in a moment from now.
  2. Set the card window to the size 480 x 320 and uncheck the Resizable checkbox.
  3. Drag a label field to the top-left corner of the card window and set its contents to something appropriate. Hello World might do.
  4. If you're developing on Windows, skip to step 11.
  5. Open the Standalone Application Settings dialog box, click on the iOS icon, and click on the Build for iOS checkbox.
  6. Under Orientation Options, set the iPhone Initial Orientation to Landscape Left.
  7. Close the dialog box.
  8. Navigate to the Development | Test Target submenu and choose an iPhone Simulator.
  9. Select Test from the Development menu.
  10. You should now be able to see 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 click on 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 it takes to get past the locked home screen, if that's what it is showing.
  16. From the Development/Test Target submenu, choose the Android emulator.
  17. Select Test from the Development menu.
  18. You should now see 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 this on physical devices only to give Android a chance to show how easy it can be done. There is a whole can of worms we didn't open yet that has to do with getting an iOS device configured, so that it can be used for testing. This is covered in depth later in Chapter 7, Deploying to Your Device, which you can read now or 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset