Skip to content

Getting Started with iOS Development

TomAuger edited this page Nov 6, 2015 · 5 revisions

This tutorial is a work-in-progress that will walk you through the very minimal steps you will need to take in order to get an app up and running using Flash CC and Kestrel.

Additional Tools

While technically you don't need anything other than Flash CC and an Apple Developer account to get started, we recommend at least the following for smoother development:

  • An ActionScript 3 IDE, such as FlshDevelop
  • An actual iDevice (iPad, iPod or iPhone) so you can test as you go!

Setting Up

The following is NOT required, but we recommend a similar structure when setting up:

Creating your base FLA file

Linking in Kestrel, your main entry point and any libraries

Setting up your Apple publishing targets

Subclassing AppBase

Once you're all set up with your directory structure and your Apple certificates, and you're ready to go, it's time to create your main document class. This will be the main entry point, and this is where you basically tell Flash that you're running a Kestrel application.

If you have the same directory structure as described in "Setting Up" (above) you should have a src folder. Create a new class inside this folder, and have it extend AppBase (com.zeitguys.mobile.app.AppBase).

package 
{
	import com.zeitguys.mobile.app.AppBase;
	
	/**
	 * My awesome Kestrel app Main entry point.
	 * 
	 * @author Tom Auger
	 */
	public class App extends AppBase {
		public function App() {
			super();
		}
	}
}

Set this up as your Document Class in the ActionScript settings inside Flash CC, and do your first Debug Publish!

Your first Debug Publish to device

  1. Make sure your device is connected via iTunes, and that it's the right kind of device (iPad if you're developing an iPad app, etc)
  2. File > AIR for iOS Settings
  3. Check settings under General (see Flash documentation for more info)
  4. Deployment: set up your certificate and provisioning profile (see Apple Developer website for more info)
  5. iOS Deployment type: Devicve debugging in interpreter mode (for fastest feedback)
  6. Post publishing check "Install application on the connected iOS device"
  7. Check the checkbox next to the name of your connected device.
  8. Press OK (DON'T press Publish).
  9. Debug > Debug Movie > On device via USB > Check the name of your device. (CTRL + SHIFT + Enter subsequent times)
  10. "IPA file has been installed on the connected iOS device successfully." (Press OK)
  11. Launch the app on your iDevice, and wait for it to connect to the debugger.

If all goes well, you should see the first "screen" of your app, and in the Output tab of your Flash CC, you should see some debugging information that Kestrel is giving you, such as the OS type and version, screen size and resolution, device model and some App state traces.

And you should see your first Kestrel notice: "Abstract method initialize() should be over-ridden in child App classes." That's telling you that what you should do next is create an initialize() method inside your new App class, and that's where your customization of your Kestrel app will start!

Publishing error messages

If things went that smoothly for me the first time I ever tried to publish an iOS device to my iPhone, I probably wouldn't have written Kestrel, so don't be disheartened. It's usually one of a handful of things:

  • Your certificates are not right (out of date or expired, your device has not been added to the Provisioning profile, your certificate and profile don't match etc). You usually get an "Application Verification Error" with these types of problems

  • Flash is just being a pain ("PackageInspection Error"). This can usually be solved by just trying again without making any changes, or by choosing control > Clear Publish Cache and then debugging again.

See more in this Wiki about troubleshooting errors (yet to be written).

Next Steps

Kestrel's AppBase class has done and set up a ton of stuff for you, such as what happens when the user switches to take a phone call, or changes device orientation. But you can harness so much more. Here are some things you'll want to learn about to take advantage of the Kestrel framework:

  • Handling different Operating Systems (iOS, Android etc)
  • [Setting up your ScreenList and switching between Screens](ScreenLists and Routing)
  • Handling animated screen Transitions
  • Adding interactive Assets to your Screens
  • Localizing your app (supporting multiple languages)
  • Setting up and using Modals and Alerts