Tag Archives: AIR

Flash to iOS: A Step-by-Step Tutorial (Part 4)

Flash to iOS: A Step-by-Step Tutorial

This is the fourth part of our tutorial series by Intern Sina on creating an AIR application for free on a PC using FlashDevelop, and deploying it as a native app on an iOS device like the Apple iPad, iPhone or iPod Touch.

Jump to other parts in the series:

In this section of the tutorial, the rubber meets the road. You’ll make all the finicky adjustments to FlashDevelop and the AIR bundling files to get your Hello Planet app up and running on your testing device.

Point FlashDevelop to the Merged SDK Folder

Now that your (cr)app is successfully up and running, you have to make a few tweaks and adjustments to FlashDevelop. You’ll start by telling FlashDevelop all about that merged SDK folder you created in Part 3.

  1. In the Project panel on the right, you’ll see a file called AIR_iOS_readme.txt. Double click that file to open it.

    This txt file lists a number of settings needed to get your ipa file working. The ipa file is the Holy Grail- the native app file that you’ll send to your testing device to see everything working properly. A window pops up with a bunch of options.

  2. Click the Project Properties button at the top of the Properties Panel (alternately, you can use the menus to navigate to Project>Properties).

    FlashDevelop Project Properties

  3. Change the version of your AIR SDK from 2.7 to 3.0 because (at the time of this writing), that is the latest version.

    FlashDevelop Project Properties Options

  4. Click on the SDK tab, and click Manage.

    FlashDevelop Project Properties Options - Manage

  5. On the next screen you will see list of installed Flex SDKs. Click the ellipsis (…) button at the end of that line. An InstalledSDK Collection Editor window pops up.

    FlashDevelop Project Properties Options - Flex SDK Location

  6. You’re going to point FlashDevelop to the location of our recently-downloaded Flex SDK (the same folder that contains both the Flex SDK and AIR SDK that you created earlier in this tutorial). First click the Add button, and then click on the Path line to get another ellipsis. Click on THAT ellipsis to browse your computer.

    Add

  7. Once you have clicked the ellipsis button, a Windows File Browser appears. Navigate to the merged SDK directory. Select that folder and click OK.

    Navigate to your merged SDK folder

  8. Click OK again to exit the InstalledSDK Collection Editor window.
  9. Click Close.
  10. In the drop-down menu, you should see the Default option. Click on the drop-down list and choose the SDK location you just told FlashDevelop about.

    Choose your Merged SDK profile from the drop-down menu.

  11. Click Apply.
  12. Click OK. Voila! Your SDK is now setup for your FlashDevelop Project.

    Let’s just test it out quickly to see if it works. The code you pasted in the previous tutorial prints out the words “Hello Planet” within your app. Well, I’m going to change mine to say “Sina is Cool”, just because I can, and also because I AM COOL. (You may be tempted to replace “Sina” with your own name. Please don’t, because uh … your code won’t work.)

    Your resulting app should look like this:

    Breaking: Sina is cool.

    A beautiful sight, isn’t it?

    (At this point, Sina actually is pretty damned cool. – Ed.)

Delete the Extra Icons Folder

Now you have FlashDevelop set up to create mobile-formatted AIR apps. Your app compiles, and you have your Mobile Provisioning Profile and your .p12 Signing Certificate waiting in the wings. All you need to do is combine all these amazing files together to create the Holy Grail .ipa file.

The .ipa file is the Holy Grail of this tutorial series

Ah – this is truly the .ipa of a FlashDeveloper.

An .ipa file is like the program file – the Windows executable (.exe) – that you need to test your iPhone/iPad App on a device, and ultimately upload it to the Apple App Store.

The creators of FlashDevelop 4 made a minor error when they created the Mobile App template: the template generates a duplicate icons folder that will cause a conflict when you try to bundle your .ipa file. You need to get rid of this extra folder to make sure your .ipa file to builds properly.

  1. Look in the right sidebar that lists your files and folders. You’ll see a folder called bin. (This is one of the folders that FlashDevelop created for you automatically when you created your project.)
  2. Click on the little plus sign beside the bin folder to expand it. You will see a folder called icons tucked inside. Right-click the icons folder and click Delete. Problem solved.

    Delete the icons folder to avoid a conflict later

Integrate Your Cert Files

  • Copy your Mobile Provisioning Profile and your .p12 Signing Certificate into the certs folder of your project. If you’ve been following along with this tutorial from the beginning, you probably saved these two files in the bin folder of your OpenSSL install.

    Once the files are in the right place, they should show up in your Project sidebar:

    You put yer WEED in there.

    To create the .ipa, you have to edit a couple of lines in a batch file so that the app compiles properly. Don’t be scared: a batch file (.bat) is simply a text file that runs a script when you double-click it in Windows. You can open up a batch file by using a text editor of any kind. Since you’ve already got FlashDevelop open, it makes a lot of sense to use it to edit the batch files.

    In the following screenshot, I’ve opened up the ReadMe file that describes the iOS compilation steps. Step 5 talks about editing a batch file. Take a read if you’re nervous.

    iOS compilation readme

  • In the sidebar, find the bat folder and expand it.
  • Double-click the SetupApplication.bat file. The file should open in FlashDevelop.
  • In the batch file, you should see some green text that says ios packaging, and a bunch of set options beneath it. This is where you have to add or adjust some text. In the IOS_DEV_CERT_FILE line, type the path to your .p12 Signing Certificate file (the one you just copied into the certs folder). You only have to use a relative path (one that describes where the file is in relation to the compilation target), so just copy what I have and you should be fine:
    cert\iphone_dev.p12
  • In the IOS_DEV_CERT_PASS line, you have to enter password that you set when you made your Signing Certificate. (Don’t come crying to me if you don’t remember it – i told you to write it down – Ed.)
  • In the IOS_PROVISION line, type the name of your Mobile Provisioning Profile.

    All in all your SetupApplication.bat should look like this:

    SetupApplication.bat

    Note: Make sure you have the path properly setup as well as the same exact filename. If you have any sort of typo, it’s not going to work.

    Get Your Ducks in a Row

    You’re almost there! All you have to do is edit the SetupSDK.bat file.

    1. Double-click the SetupSDK.bat file to open it in FlashDevelop.
    2. At the top of the file, you’ll see a line that says path to Flex SDK in green. Right under that line is the path to the SDK. However, it’s not pointing to the merged SDK folder that we created earlier. Replace the default path with the path to your merged SDK folder. It might look similar to this:

      SetupSDK.bat

      Note: Remember to save often!

    3. Open the application.xml file. This xml file is the descriptor file for your application. You have to double-check to ensure everything in there is correct. Everything from your App name to the version of your App is located in this file.

      Application.xml

    4. Change the version number at the end of the xmlns parameter of the root application node to the version of AIR you’re running. In this case (and at the time of this writing), it’s 3.0.
    5. In the id node, enter the package name that you created for your Mobile Provisioning Profile.

      Application.xml changes

      If you don’t remember what your Bundle ID was, go to the Provisioning Portal on the iOS developer website and click on Provisioning.

    Compile Time

    After all that, you’re finally ready to compile your .ipa file to test on an iOS device.

    1. In the sidebar, right-click the PackageApp.bat file and select Execute.

      Execute!

    2. You’ll see a bunch of options. Since this is only a test, you can pick the fast test option. This option will quickly create an .ipa file for you to throw onto your iWhatever. Once you choose fast test, sit back and relax.

      Choices

    3. Look in the dist folder in the sidebar. You now have an .ipa file!

      Success!

    Test Your New App

    Take a moment and soak in what you’ve accomplished. You’re in the final steps of your epic journey of iEnlightenment. All you have to do now is load the hard-fought .ipa file up on your iWhatever.

    I made a copy of my Mobile Provisioning Profile and my .ipa file and put them in a separate folder. I suggest you do the same as a backup measure … better safe than sorry. Now let’s get that sucker onto your device.

    1. Plug in your iPhone/iPad/iPod Touch/iEtCetera and let it sync in iTunes.
    2. After it’s synced, go to Library -> Apps.

      iTunes

    3. To add your Mobile Provisioning Profile, click and drag it from your folder into the iTunes Library.
    4. Follow the same process to add your .ipa file.

      Note: You have to add your Mobile Provisioning Profile before you add your .ipa file! If you add these files in the wrong order, you may get errors!

      Drag and drop your files into iTunes

      After dragging your .ipa file into iTunes, you’ll see a generic App icon that FlashDevelop/AIR generated for you.

      Generic Apple App Icon

    5. In the left sidebar, click on Devices -> Your iPad/iPod/iPhone.
    6. Click on the little Apps button at the top of iTunes. You’ll see a screen that displays all your Apps. Within that screen, you should be able to find your App (you may have to scroll around a little to find it).
    7. Click the Apply button to transfer everything to your device.

      iTunes will go through the syncing process, and will add your App to your device. You can click sync a few more times just to make sure everything is good – iTunes doesn’t always behave perfectly on a PC.

      Note: If you get an error saying that the App failed to install, your Bundle ID or something within your Application.xml may be wrong. Double-check everything! There is no harm in deleting your App and from iTunes and transferring it again. You can also overwrite your Mobile Provision Profile with a corrected one.

      DOUBLE NOTE: If you change anything in your project, you must compile your .ipa file again, because it contains all the new information necessary for iTunes to run your App.

    8. Fire up your iPad/iPhone and BAM!

      AIR on iOS

      It’s so … beautiful. *sniff*

    To the App Store … and Beyond!

    In this section of the tutorial, you:

    • Pointed FlashDevelop to your merged AIR/Flex SDK folder
    • Corrected an error with the Mobile AIR template by deleting an extraneous icons folder
    • Copied your Mobile Provisioning Profile and your .p12 Signing Certificate into your project and pointed FlashDevelop to them
    • Pointed the SetupSDK.bat file to the merged SDK folder
    • Modified the application.xml descriptor file to match your project settings
    • Compiled your project and created an .ipa file
    • Copied your .ipa file and Mobile Provisioning Profile into iTunes
    • Synced your app and ran it on your testing device!

    With your project set up, you can continue developing your application until you have an amazing thing that you’re ready to foist on the app-buying public. There are still a few more things you need to know to deploy your app to the live iTunes store. What about that generic AIR icon? Wouldn’t you like to see something nicer in its place? And how do you get your .ipa file in front of the app-approvers at Apple to get it to show up in iTunes? And are we finished with certificates and profiles, or is there more to do?

    Short answer? There’s more to do.

  • Flash to iOS: A Step-by-Step Tutorial (Part 3)

    Flash to iOS: A Step-by-Step Tutorial

    This is the third part of our tutorial series by Intern Sina on creating an AIR application for free on a PC using FlashDevelop, and deploying it as a native app on an iOS device like the Apple iPad, iPhone or iPod Touch.

    Jump to other parts in the series:

    Luke Loses His Hand

    Part 2 of this tutorial was like The Empire Strikes Back. It was the crisis moment in the story of deploying a Flash project to the Apple iOS platform. It was dark, it was difficult, and Han Solo wound up frozen in carbonite. Part 3 is redemptive: with all that command line and certificate red tape out of the way, you can finally build our AS3 app using FlashDevelop. Watch closely, friends: you may spot some ewoks.

    It's a trap.

    It’s a trap.

    Install Flash Develop

    As I mentioned earlier in the series, FlashDevelop is a FREE, PC-only coding environment that is used throughout the industry and loved by many. If you haven’t installed it, head here to download the latest version.

    FlashDevelop 4

    FlashDevelop is an IDE (Integrated Development Environment) where you can create many different types of applications from scratch. The most amazing thing about FlashDevelop is that you don’t actually need to buy Adobe’s Flash Professional software to create Flash (swf) content. FlashDevelop has amazing, time-saving features like importing code libraries on the fly, and numerous awesome templates. At the time of this writing, the latest edition of FlashDevelop is 4.0.0. This version of FlashDevelop contains a template for Mobile AIR applications which you can use for iOS and Android development. In this tutorial, you’ll use the iOS version of the template.

    Create a Merged SDK Folder

    There are two SDKs (Software Development Kits) you’ll need to deploy Flash content to the iOS platform: Flex and AIR. Depending on the version of FlashDevelop you install, these two SDKs may already be included in the download. You’re going to download them both anew and put them in a single folder. That way, if you mess anything up, you can take off and nuke the site from orbit instead of messing up your main FD install. It’s the only way.

    1. Download the latest AIR SDK (which, at the time of this writing, was v3.0)
    2. Download the Flex SDK.
    3. These two packages download as .zip files. Extract them wherever you like on your computer – just make sure you know where you put them.
    4. Once you have both SDK’s extracted to separate folders, copy everything in the AIR SDK folder into the Flex SDK folder. Windows will ask you if you want to overwrite certain files. Say “yes” to everything.

      Merged SDK folder

      You now have a folder with the Flex SDK and the AIR SDK merged into one. This is a Good Thing™.

    Point FlashDevelop to the Flex SDK

    In order to compile (build and execute) your app, you have to point FlashDevelop to the merged SDK folder that you just created.

    1. Open up FlashDevelop and hit F10 or go to Tools->Program Settings in the menus.

      Program Settings

    2. In the Program Settings menu, click on AS3 Context.
    3. Find the Language section, and the Flex SDK Location line within it.

      AS3 Context

    4. Click the ellipsis button at the end of that line, and navigate to the merged SDK folder.
    5. Click Close to commit the change.

    Set Up Your Mobile AIR Application

    Once you have downloaded and installed FlashDevelop, open it up and you should see it in all its glory:

    FlashDevelop 4 Interace

    To begin with, you’ll need to create a new FlashDevelop project, which is a group of folders governed by a file filled with metadata about your project.

    1. Create a new project by clicking Project -> New Project in the menu.
    2. Now you will see a screen with a multitude of options. These are all project starter templates that FlashDevelop has for you to use. The one you want is the AIR Mobile AS3 App. Select this template, choose a location on your hard drive to save it, give a name to your project, and hit OK.

      Note: A package name is not required but the option is there if you’d like to use it.

      FlashDevelop 4 Project Templates

      After you hit OK, FlashDevelop creates a number of folders and files for you, including:

      • The .as3proj file, which is a FlashDevelop project file filled with metadata that keeps track of various aspects of your project.
      • The bin folder. This is where your finished files end up.
      • The lib folder, where you can put your “construction” files and artwork.
      • The src folder, which contains your .as AS3 code files.
    3. Once you’ve created your project file, FlashDevelop starts you off with a blank screen. To open up your code, click on the src folder in the Project sidebar on the right. (The Project sidebar lists your computer’s actual directory structure so that you can access your Actionscript files quickly and easily.)
    4. Inside the src folder, double click the Main.as file to open it. This is your project’s point of entry, where you can start writing the code for your app.

      FlashDevelop 4 Main.as

    5. Push the F5 key on your keyboard, or the click the little play button at the top-middle of FlashDevelop to compile and run your project.

      FlashDevelop 4 Compile Button

      The first compile will take little bit of time, but any compile after that should be quick, because the compiler builds on an as-needed basis, compiling only your most recent changes (as opposed to Flash Professional, which compiles your ENTIRE project every single time. Bleh!). Once you run your new project, the FlashPlayer should pop up and you should see a blank screen. Luckily, this is exactly what we want. As of right now, this is your App.

      FlashDevelop 4 Blank App

    Hello, Planet

    This is nice and all, but let’s try to the write a simple message on screen so that when we are testing, we know it actually works. Let’s write “Hello Planet” on-screen.

    1. Just below the green commented line where it says //entry point in your Main.as file, copy and paste these lines into your code:
      var tf:TextField = new TextField();  
      var format:TextFormat = new TextFormat();  
      format.font = "_sans";  
      format.size = 48;  
      tf.defaultTextFormat = format;  
      tf.text = "Hello Planet";  
      tf.width = stage.stageWidth - 20;  
      tf.x = 10;  
      tf.y = 10;  
      addChild(tf);

      Code Entry Point

    2. Click the compile button (or press F5). Did it screw up? Good. There are a couple more things you have to do before you are ready to compile without errors.
    3. In your code, click to place your cursor carat on the word Textfield and hit Ctrl+Shift+1 on your keyboard. The word turns blue. If you scroll to the top of the class, you’ll notice that there is an extra import line at the top of your code. CTRL+SHIFT+1 is a special feature of FlashDevelop that does code completion. In this instance, CTRL+SHIFT+1 automatically handles your import statements for you. You need to import the TextField code with this statement if you want your TextField to work.
    4. Use CTRL+SHIFT+1 on the TextFormat word and you should see this:

      Import Statements

    5. Now click Compile (or press F5).

      Hello Planet

      Thar she blows!

      (It works, but it’s no Angry Birds. – Ed.)

    Bust Out the Hardware

    This is moving along nicely. You:

    • Installed FlashDevelop, a free and open-source IDE for creating Flash and AIR content
    • Downloaded and sunk the latest AIR SDK and Flex SDK into a single, merged folder
    • Pointed FlashDevelop to the Flex SDK to use its superior compiler
    • Created a new FlashDevelop project using the Mobile AIR application template
    • Wrote and compiled a new Hello Planet AIR app that you can deploy to a testing device

    In the next part of the tutorial, you’ll fine-tune FlashDevelop and modify a number of settings and batch files to create the magical, mystical .ipa file, and you’ll see that file running on your testing device.

    Continue to Part 4

    Flash to iOS: A Step-by-Step Tutorial (Part 2)

    Flash to iOS: A Step-by-Step Tutorial

    This is the second part of our tutorial series by Intern Sina on creating an AIR application for free on a PC using FlashDevelop, and deploying it as a native app on an iOS device like the Apple iPad, iPhone or iPod Touch.

    Jump to other parts in the series:

    Drudgery

    Without a doubt, this section of our tutorial series on bundling your Adobe AIR App for Apple’s iOS platform is the pits. You have to use a complicated command line interpreter, you have to juggle what may feel like a million different certificates and profiles, and you have to jump through a dizzying array of hoops just to get everything set up … and you’re not even going to start building your app at all! But trust me: once you’ve cleared these hurdles, the rest of the process is gravy.

    Gravy

    Thick, delicious gravy.

    The first goal of this tutorial is to create a signing certificate, which is used very much like a hot brand on cattle. It’s the digital signature of you or your company that identifies an app as your own. We need to use a program called OpenSSL to create this signing certificate.

    Install Open SSL

    In order to turn your future AIR project into a native app, you need to create two important files: a Signing Certificate and a Mobile Provisioning Profile. If you are working on a Mac, you actually use a program called Keychain to do some fancy voodoo magic and get the certificate you need. We are working on a PC and we do not have that luxury, so there are a couple of confusing steps that we must go through.

    The first thing you have to do is go to http://www.slproweb.com/products/Win32OpenSSL.html. Scroll down, and then download the Visual C++ 2008 Redistributables and install the resulting file. Next, download the Win32 OpenSSL v1.0a Light file and install that after you have installed the first package. These two files will help you create the Signing Certificate Request you so richly deserve.

    OpenSSL

    Be sure to keep track of where you installed those last two elements. Next, visit this site:

    http://help.adobe.com/en_US/as3/iphone/index.html.

    These are Adobe’s help files for generating your signing certificate and then converting that certificate into a .P12 file. If you get lost in this tutorial, that page will be your safety net.

    Adobe Help Page

    On that Adobe support page, you will see some instructions for Mac machines. Ignore them. Scroll down to the Windows instructions and give them a once-over.

    Instructions

    The instructions say that you have to install Open SSL. You’ve already done that. Open a command prompt window. You can do this by going to your Start button and typing in cmd in the search field. (You can also hold the Windows key on your keyboard and hit the “R” key (for “Run”), then type cmd and hit Enter.)

    CMD

    Once you are in the command prompt, travel your way to your Open SSL bin folder. Depending on where you installed it you will have to travel to a different path than in this example. (For your sake, i hope you installed Open SSL in a location that you can remember!)

    If this is your first time using the command prompt, here’s a quick primer on the commands that will help you get around:

    • cd This command means “Change Directory”. If you are in a directory and you want to go into one of its sub-directories, use this command plus the directory name (example: cd directoryName)
    • cd.. This command will pull you up one level in your directory structure
    • dir Type this command to see a list of all of the files and folders within your current directory
    • dir /w The /w (wide) switch spreads a directory listing across multiple columns. This is useful for seeing all the folder names at a glance, instead of in one big long scrolling list.

    CLI Commands

    You may have some problems getting some of the following commands to work. A fine commenter (and Ontario resident!) named Dan Zen mentioned on the Adobe guide’s comments section that you may need to input set RANDFILE=.rnd in your command prompt before the following commands will work properly.

    RANDFILE command

    Generate a Signing Certificate Request File

    With all of that taken care of, you can start inputting some commands to create your Signing Certificate Request file. Once you have that file, you’ll use it to ask Apple for your proper Signing Certificate file that you’ll use to identify your app.

    1. Punch this command into your command line interpreter and hit the ENTER key when you’re finished:
      openssl genrsa -out mykey.key 2048

      You should see this response:

      response

    2. Next, type (or highlight the line, right-click, choose “Copy”, and right-click/”Paste” in the command line interpreter):
      openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest  -subj "/emailAddress=yourAddress@example.com, CN=John Doe, C=US"
    3. Now, before you hit ENTER you’ll want to edit a couple of things. First, replace “John Doe” with your own name or company name. Then replace the “yourAddress@example.com” email with your own email. Then press ENTER.

      You should get a message similar to this:

      response

      You just generated the Signing Certificate Request file that you’ll use to ask Apple for your Signing Certificate. The Signing Certificate Request file is located in the bin folder of your Open SSL install. It has a .certSigningRequest file extension and should look like this:

      Certificate Signing Request file

    Obtain a Signing Certificate for Development

    You have to upload your Signing Certificate Request file to the Apple Provisioning Portal to get your signing certificate.

    Note: There have been instances where this upload does not work with Google Chrome. Just to be safe, use another browser like Firefox.

    1. Navigate to the iOS Provisioning Portal after logging in with your developer account and click on Certificates.

      Certificates

    2. Click Request Certificate.

      Request Certificate

      Note: If you are a team member and/or you have not paid the annual developer fee of $99 dollars, then you cannot request a Signing Certificate. Only the Team Admin – the person who has paid the development fee – will be able make this request.

      On the next screen, you will upload the Signing Certificate Request file that you generated in the previous section.

      Generate Certificate

    3. Click the Browse button and navigate to the bin folder located within your OpenSSL folder.
    4. Once you have selected the Signing Certificate Request file, click Submit. Your next screen should show this:

      Certificate Pending

    5. Just hit Refresh a couple of times on your browser and you should eventually see this:

      Certificate Ready

    6. It’s your Signing Certificate! Go ahead and download it. Just to make things easier, you can save that certificate in the bin folder in the Open SSL folder, where your Certificate Signing Request file is sitting.

    Save Certificate

    Save Certificate 2

    Convert the Signing Certificate to a .p12 File

    Are you having fun yet? Yeah, me neither. We are making good progress though. The next step is converting that Signing Certificate to a p12 certificate, because Apple loves certificates.

    1. From the Adobe help page, visit the link describing the process of converting a developer certificate to a p12 file. You get a list of more commands that you’ll have to punch into your trusty old command prompt.

      Adobe Help Page 2

    2. Copy the first command (highlight the text, right-click and select “Copy” from the context menu):
      openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM
    3. Open up your command prompt as I showed earlier, and navigate to the bin folder of your Open SSL directory.
    4. Once you’re there, paste in the first command (right-click and select “Paste” from the context menu), and press ENTER.
    5. Skip ahead to Step 3 of the Adobe help guide and copy that command. (The command in Step 2 is for Macs only.)
      openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12
    6. Once you punch in the command, enter a password and then verify that password. Make sure the password is something that you will remember. (Save it in a .txt file in that folder if you’ve got a lousy memory like me – Ed.) When you are typing in your password, the command prompt does not give you the luxury of seeing dots or asterisks to indicate how many letters you are typing in. Rest assured that the command is accepting your input.

      Note: You may get an error mentioning a “random state”. Just type in the command set RANDFILE=.rnd and it should fix the problem for you.

    7. Go into the bin folder in your Open SSL directory and you should see your .p12 file. Hooray!

      p12 Signing Certificate

    Create an App ID

    Now that you have the precious file you need, it’s finally time to create your Mobile Provisioning Profile. You’ll start by setting up a unique ID for the app you’re creating.

    1. Navigate back to the Provisioning Portal in your web browser to create an App ID for your app. Log in, click on Provisioning Portal, and click on App IDs.

      App IDs

    2. Click New App ID.

      Note: If you have not paid the developer fee, or if you are just a team member of the Team Admin, you will not see this option. Ask your Team Admin to complete this step.

      New App ID

    3. On the next screen you’ll start by writing a Description for your app, which can be anything you want. (This is what the player will see when he sees your app in the App Store. Obviously, there’s a whole marketing concern here that’s outside the scope of this tutorial. Since we’re just building a test app, i recommend you punch SOME CRAZY NONSENSE in there for your description. Take THAT, marketing. -Ed)

      Within the Bundle Seed ID (App ID Prefix) you will have various options, depending on your account status. If you are the Team Admin, you’ll have a “Generate New” option. Team Members will only see a “Use Team ID” option. (If this is not your first App, you could also choose the Bundle Seed IDs for previous project). Either way, leave it at the default.

      The Bundle Identifier lets you create a specific package for your App. The standard way to make this package is to reverse the name of your website domain. I used com.sina.ipadtest. (Our team uses com.untoldentertainment.whatever – Ed.)

      Alternately, you can use a generic Bundle Identifier by just putting an “*” in the field.

      Note: There have been cases where the asterisk does not work for some people. It is a safe bet you make a specific namespace like the examples above.

      App Description

    4. Click Submit.

      Voila – you have now created your App ID! On the next screen you will see all of the app profiles you’ve created.

      App ID Results

    Create a Mobile Provisioning Profile

    Now that you have an App ID, you can now create your Mobile Provisioning Profile. This is the crowning touch to everything we’ve done in this tutorial so far. The Mobile Provisioning Profile glues your developer(s), your Signing Certificate, your app ID and your testing device together. Once you have this file, you’ll be able to test an app on your device.

    1. Within the Provisioning Portal website, click Provisioning in the sidebar.

      Apple Provisioning Portal

    2. Click on New Profile.

      Note: You only see this option if you are the fee-paying Team Admin.

      New Apple Provisioning Portal

    3. Give your provisioning profile a Profile Name.

      Apple Name Your Provisioning Profile

    4. Choose the Signing Certificate(s) that you want to use with this profile.
    5. Use the drop-down list to indicate the app for which you’re creating this profile.
    6. Finally, indicate the testing device you want to test it on.
    7. Click Submit.

    You’ll be taken to a screen that says your Mobile Provisioning Profile is pending. Just click your browser’s refresh button a couple of times until the Downloadbutton appears, and download your precious, hard-fought profile. Make sure to save it in a location you’re likely to remember.

    Apple Provisioning Profile

    Are We There Yet?

    That was a big pile of hoops to jump through just to test an app on your device, and we haven’t even begun building the app yet! Here’s what you just accomplished:

    1. You used the command line and OpenSSL to create a Certificate Signing Request file.
    2. You sent that file to Apple. Apple responded by enabling you to download your Signing Certificate file. This file identifies you as the developer of your app.
    3. You converted your Signing Certificate to the .p12 format.
    4. You created an ID for your app.
    5. You created your Mobile Provisioning Profile, the glue that holds all these elements together and enables you to test your app on an iOS device.

    The good news is that you DO NOT need to repeat the steps to create your Signing Certificate for additional apps. Now that you have that file, you’ll use it to sign all of your iOS apps from here on in. Similarly, you won’t have to re-enter your developer ID or device ID for future projects (unless, of course, you gain a new team member or device). The App ID and Mobile Provisioning Profile are the two pieces that are unique to your app – you WILL need to repeat those steps for additional projects.

    The next part of this tutorial series will cover the process of creating your actual Adobe AIR app using FlashDevelop, bundling it up with this mess of certificates and profiles you just built, and deploying the app to your testing device.

    Continue to Part 3

    Dear RIM Blackberry Playbook People: Please Put that Shit on a Button

    Dear RIM Blackberry Playbook People,

    Thank you for sending me a Playbook. i like it very much. i didn’t very much like the steps involved to put my work on the device, though. It was the most needlessly complicated thing i’ve had to do in all my life. i’d like to see the Playbook succeed, but you need to put more effort into helping your developers succeed first.

    Here are a few of the issues i ran into while porting my game Heads to your platform:

    1. i had to download Many Things, and sign up for Many Accounts. Each Thing and each Account came with 15 pages of legalese with an “I Agree” button at the bottom. I Agree … that this stinks.
    2. One of the Many Things i had to download was Adobe AIR 2.5. i followed the link on your site to Adobe AIR 2.6, which i downloaded instead. When i tried to follow your workflow, i was told that only AIR 2.5 would work, so i had to cast about the Internatz to find the 2.5 download, which wasn’t made immediately and obviously available on the Adobe site. If i’m creating something for your platform, everything i do should ideally be immediate and obvious.

      Click here

    3. i downloaded VMWare and your VMWare Playbook profile so that i could run a virtual Playbook. But the emulator stalled at the startup screen for a very long time. i checked message boards, and found two possible solutions:
      1. Leave it overnight.
      2. Alternatingly restart your computer or VMWare multiple times (some reports said “six or seven”) until it works.

      i opted to restart VMWare and my computer multiple times until it worked. This was very frustrating. i’m not the only one who experienced this problem, as evidenced by this web comic by my Twitter pal @IQAndreas:

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

      Developing for the Playbook: Chapter 3

    4. In order to deploy my game to the virtual Playbook, i had to know its IP. To get that, i had to swipe the “development” option into the “on” position and punch in my password. i had to use the software keyboard to punch in my password, because my computer keyboard didn’t work. And worse than that, it took about 4-5 tries swiping the slider and punching in my password before the Developer hammer icon would appear on the home screen … for whatever reason, that slider kept undoing itself.

      Playbook Development Slider

      Somebody call Jerry O’Connell, cuz this slider be busted.

    5. When it came time to bundle my files together in a .bar file, i was dismayed to find that since i don’t use Flash Builder (but, rather, FlashDevelop), i would need to use the command line to continue. i hate the command line. HAATE it. i know that eggheads love it, and that you employ Many Eggheads at RIM, but you have to understand that even though the command line is useful and powerful and 1337 and everything, i absolutely can’t be arsed with it. Like, not at all. So knock it off.

      Here is what i had to type into the command line in order to bundle my project into a .bar file:

      C:\dev\BlackBerryTabletSDK\blackberry-tablet-sdk-0.9.3\bin\blackberry-airpackager -package MyGame.bar -installApp -launchApp MyGame-app.xml blackberry-tablet.xml MyGame.swf blackberry-tablet-icon.png -device 192.168.58.128 -password 123456

      This is not a fun thing to have to type. Know what i want to do? Click a button. Can you make it so that i just click a button? Buttons good, typing bad. It may not be 1337, but it also doesn’t eat up my entire afternoon.

    6. i am currently rocking three Blackberry accounts: one to develop my game, one to sell my game, and one to talk about my game on your forums. This is Too Many Accounts. Know how many there should be? One. Know why? Because it’s easier. Know what’s not easy? You.
    7. When i signed my application, i had to download a file that you sent to me two days after i emailed you and asked you for it. That’s Too Many Days. That’s because you also took two or three days to approve my vendor account. Why not do this in one step instead of two? Clearly, a vendor is always going to need the application signing file. See how you don’t make things easy, when you potentially could?
    8. Then i had to use the command line (which, as we’ve already established, is bad) to create a file that i could send to you so that my computer could sign files. At least i think that’s what i was doing. Here’s what the command looked like:

      blackberry-signer -csksetup -cskpass DesiredCSKPassword

      Then i had to use the command line (bad. BAD!) to send you my .csj file to receive permission to sign my other file. i think. i’m not quite sure what was going on, because it was tough to interpret the command, which looked like this:

      blackberry-signer -register -csjpin PinEnteredWhileRequestingCSJ -cskpass PasswordEnteredWhileGeneratingCSK client-RDK-XXXXXXXXXX.csj

      Next, i had to create a .p12 certificate using this command:

      blackberry-keytool -genkeypair -keystore DesiredCertificateName.p12 -storepass NewPassword -dname “cn=MyCompanyName” -alias author

      Then i had to get you to sign the file using this command:

      blackberry-signer -verbose -cskpass CSKPassword -keystore CertificateName.p12 -storepass StorePassword BarFileNameForRIMToSign.bar RDK

      Then i had to sign the file myself using this command:

      blackberry-signer -keystore CertificateName.p12 -storepass StorePassword RimSignedBarFile.bar author

    9. When i finally went to upload my file, in the web form you asked me for an additional icon in some bizarre size (243×717 or something like that). i went away and produced that icon, and by the time i returned, the web form had timed out. Know what would be easier? A checklist!

      YOU WILL NEED:

      • A swf
      • An xml file called whatever.xml – download it HERE!
      • A thumbnail icon – download a template HERE!
      • A second icon – download a template HERE!
      • A brief description of your application – max X words
      • A long-form description of your application – max Y words

      And HERE’S an image of how all this stuff looks when it’s in the Blackberry App World! We’ve LABELLED everything for you, so you know where the descriptions and icons appear and how they’ll look to the user.

      Really, though – how long does that kind of thing take to set up? An afternoon? Why does this not exist yet?

    10. To add insult to injury, my game was initially rejected because it did not contain the icon.png. i figured i must have forgotten to include the .png filename when i created the .bar file, so i went through all of those horrible steps again. For a second time, my game was rejected. Same reason.

      Know what the problem was? i hadn’t added this to the xml file:

      <icon>
          <image>whatever.png</image>
      </icon>

      N’awesome.

    i didn’t enjoy doing this, and i don’t want to have to do it ever again. Know what i want? i want a big blank area where i can drag and drop my file, with a huge shiny juicy button that says “GO BITCH GO” which, when i click it, does all the bullshit i just described above. Please get your eggheads on that.

    In addition to all of the brilliant software and hardware engineers you employ, you simply need to hire more people to evaluate this process. An egghead will tell you that using the command line is cool and awesome and that everyone loves doing it. A person will tell you the actual truth: using the command line blows, and you need to put that shit on a button.

    Please let me know if and when you plan to put that shit on a button, and i’ll gladly continue developing for your device, because it’s pretty cool.

    Sincerely,

    Ryan Henson Creighton

    President, Untold Entertainment Inc.

    Sheet Happens! – Pre-production phase

    Temporary Sheet Happens! logo

    Temporary Sheet Happens! logo

    Pre-production on Sheet Happens!, a hobbyist sheet music app build in AIR (Adobe Integrated Runtime) is in full swing!

    The final product is being planned for an open-source release so that the Flash/Flex development community can learn this exciting new technology. For those of you just joining us, AIR allows devlopers to create cross-platform desktop applications using Flash, Flex, or HTML. (Yes – HTML.)

    In keeping with our open philosophy on this project, we have opened the Sheet Happens! Development Wiki to the public! You can check in to see how the project is coming along. You can also watch us track things like hours spent and milestones on the wiki calendar to get a sense of how speedy (or not) AIR is for development. If you are a student or are just getting started in the industry, you might pick up some do’s and don’t’s for your own project.

    We will also post developer diaries on this blog from time to time to update you on our progress.

    Sheet Happens! gives users an iTunes-style interface to manage their lyric and chord charts. Songs can be transposed on the fly. A number of viewing options allow you to customize your songs to help you play them more easily.

    Sign up to test this exciting app by emailing us at info at untoldentertainment.com!