Posts Tagged ‘titanium’

Path menu with Appcelerator Titanium

Here we go again…


Yep, another cross-post from the Appcelerator blog. This time it shows off how I managed to implement the dynamic and unique Path menu in Titanium. From a single code base the menu is fully functional, with native performance, on both Android and iOS.

Video


Titanium Developer Tips

Overview

First I want to start by pointing out that this Titanium Developer info will likely be moot in a short amount of time.  Titanium Appcelerator has recently acquired Aptana and is likely to release an IDE with deployment integrated, thus making Titanium Developer obsolete.  It should be tremendous for the workflow, but the beta isn’t due until March and there’s no certainty as to when it will be an official release.  So for the time being, let’s make due with Titanium Developer.

This isn’t a post on how to use Titanium Developer or develop apps with it.  For that information please reference Titanium’s own documentation:

Also remember that Titanium Developer is not an IDE, it is just a project and deployment platform.  For creating and editing content for your apps, you’ll need your own IDE.  I’d suggest one that specializes in HTML, CSS, and Javascript.  TextMate seems to be the weapon of choice for Mac based Appcelerator developers (among others) and there’s a bunch out there for other OSes, like Aptana, WebStorm, Notepad++, jEdit, and many more.  Obviously I’d suggest Aptana as that’s the new IDE of choice for Appcelerator.

OK, enough back story, here’s the things to consider when using Titanium Developer and some issues you may run into.  For reference, I was using Windows XP for Android development when most of this was uncovered.  I believe Appcelerator has a more natural focus on iOS workflow, so other Windows/Android developers will benefit most from this.   HUGE thanks goes out to Tony Guntharp and Chad Auld ( and respectively).  Without their help I probably would have quit Appcelerator before I got started.

Guide & Troubleshooting

  • First thing, be sure to follow the “Getting Started” guide completely.  Most issues that arise with Titanium Developer are a direct result of not doing one of the things specifically mentioned in this guide.
  • Make sure you installed the Java JDK (not just JRE) and that you add the JDK’s bin directory to your PATH environment variable.  If you don’t you are liable to run into some weird behavior in Titanium Developer including:
    • [ERROR] JDK version ‘javac’ is not recognized as an internal or external command
    • Your Run Emulator and Run on Device tabs may just appear as blank, grayed out panels
    • Other errors relating to compiling your application
  • Here’s some things you MUST have if you want the app to run on Android
    • Latest Titanium Mobile SDK (1.5.1 at the time of this post): you can download and install it through the status updates in the upper right corner of Titanium Developer
    • Kitchen Sink source code: Pull the source from Github for Kitchen Sink, don’t use the Downloads section.  The Kitchen Sink installed but would force close immediately after the splash screen finished on my Droid X when using the 1.5.0-update2 download.  You can use your favorite git client (like for me) or just download the source as a or .
    • Google APIs by Google Inc., Android API: You can download and install this using the Android SDK and AVD Manager that comes with your Android SDK installation.  It is available through Available Packages -> Third Party Add-ons -> Google Inc. add-ons

  • Android 1.5 is no longer supported and 1.6 is going to be end-of-lifed for Appcelerator soon.  They also have no yet dug into Android Honeycomb.
  • Titanium Developer projects can have problems deploying caused by artifacts of old builds, old Titanium SDK versions, or iOS/Android SDK changes.  Here’s a small list of brute force troubleshooting to try and get past these issues:
    • Uninstall apps before reinstalling: This isn’t often necessary, but it is a good first measure to take when getting deployment or execution issues with an Appcelerator app.  Think of it like your sys admin telling you to reboot before he digs into the real troubleshooting.
    • Restart Titanium Developer: see above
    • Try deleting and re-importing your project: This will ensure that all of your profile and project specific settings are being properly applied to your project.
    • Create a new project and copy your existing project’s content into it: Yeah, it ain’t pretty, but if the above doesn’t work this might help.  A fresh project will sometimes fix any corrupted project settings.
    • Delete the {PROJECT_PATH}/build/android and {PROJECT_PATH}/build/iphone folder: I’ve heard this advice but had no luck with it myself.  In fact I ran into even more errors when trying to emulate or run my project on a device.  Some, though, claim it will cause a full rebuild of your project in Titanium Developer and that it can often fix any build or deployment issues.  Try at your own risk.  I would make a backup of the directories you intend to delete.

Summary

While it may a bit of a bumpy road getting started, I have a feeling the investment in time will be worth it in the end.  If I was a patient person I would just wait until the new IDE beta came out and start working with he new, sanctioned workflow.  But I’m not a patient person.  Cross platform mobile development, with access to native components and near native performance, is just too cool to wait for.

I’m a Titanium Titan!

As of last night I have been accepted into the Titanium Titans program. To quote the description of the program itself:

Titanium Titans are experienced contributors to the Titanium Project who are responsible for representing, promoting, and expanding the Titanium Project and its ideals to the larger mobile community and the public at large.

I have to believe that my admission into the group was due in large part to Appcelerator coming out on top in my popular mobile framework comparison a few weeks ago. While that might be my only publicly visible lauding of Titanium Appcelerator, I assure you there is more behind the scenes. I am currently working on an internal app for my employer that will be securely delivering business critical data to various types of mobile devices via the Appcelerator framework.

I feel like big things are coming with Appcelerator. With the recent acquisition of Aptana and the launching of the Titans, its plain to see that they are making aggressive, yet calculated moves to be the #1 cross-platform mobile framework on the market. I am just glad that I will get to be a key part of it.

So I know a lot of my blog readers out there aren’t big HTML/CSS/JS fans, which is the core of Appcelerator development.  In fact, I know a lot of you hate it.  Seantheflexguy, I’m looking in your direction.  But I’m sure that many of you are curious.  I mean, come on, native components and near native performance without having to learn a native SDK… how can you turn a blind eye to that?  Dig in, give it a shot, and let me know what you think.  I’m sure the Titanium staffers would love to hear your perspective on their framework.  And I’ll make sure they hear it! ;)