Archive for December, 2011

CommonJS Module Guide for 1.8

Wednesday, December 28th, 2011

As many of you know, as a platform we’re embracing the CommonJS module specification as the preferred means of structuring JavaScript code in Titanium Mobile applications. To help developers properly use our implementation of this spec, we’ve included a guide for using CommonJS modules in Titanium 1.8 in the wiki.

If you are using CommonJS modules in your applications, this guide should help you understand how we intend the CommonJS module implementation in Titanium to be used. Thanks!

Titanium Documentation Survey: Your Input Requested

Wednesday, December 28th, 2011

Developer documentation is critical to success with any technology platform. For that reason, we’re planning further big investments in our API and written guide documentation in 2012. To help us in our planning process, we’d like to collect feedback from our developer community regarding the current state of our documentation, and where you’d like to see us go in the future.

Please take a moment (it’s one page – shouldn’t take but a minute or two), and fill out the following survey. We appreciate your valuable feedback, and we look forward to working with you to improve our docs and learning resources in 2012!

>> Fill out the survey now! <<

Upgrading Android Modules to 1.8.0.1

Friday, December 23rd, 2011

As part of the release of Titanium Mobile SDK 1.8, a number of changes were made to our Android platform APIs in order to support multiple Javascript runtimes (V8 and Rhino). Android Modules that have been built with versions of Titanium Mobile SDK prior to 1.8.0.1 will NOT work with applications built using version 1.8.0.1 or newer (and vice-versa). We have converted all of our internally developed modules as well as the publicly available modules to work with release 1.8.0.1. It is necessary to download updated Android modules in order to develop applications with Titanium Mobile SDK version 1.8.0.1.

Application Configuration for Android Modules

Appcelerator modules updated for 1.8.0.1 contain two versions of the Android module, one for use with pre-1.8.0.1 SDKs and one for use with 1.8.0.1 or newer. In your tiapp.xml file, make sure that you specify the version of the module that corresponds to the version of Titanium Mobile SDK that you are targeting. For Appcelerator modules, specify the 1.X version of the module if building for versions of Titanium Mobile SDK prior to 1.8.0.1 and specify the 2.X version of the module if building for versions of Titanium Mobile SDK 1.8.0.1 or newer.

For non-Appcelerator modules, check the module documentation for the specific version required for your application.

Module Development Resources

Porting Guide

If you are a module developer, you will need to update your module source code to build and run with release 1.8.0.1. As part of our internal effort to upgrade our modules we have compiled a list of specific changes that you may have to make to your source code. The Android Module Porting Guide for 1.8.0.1 is a resource to assist you in updating your source code.

Module Packaging

Since not all of the application developers using your Android module will have upgraded to Titanium Mobile SDK 1.8.0.1, it will be necessary to maintain and distribute two versions of your module for a period of time. In distributing your module to application developers you have a couple of choices to consider:

  • Distribute individual module zip files for Titanium Mobile SDK 1.8.0.1 and pre-1.8.0.1. In this scenario, you maintain separate distribution zip files for each version of Titanium Mobile SDK
  • Distribute a single combined module zip file (Recommended). In this scenario, you will first need to assign a unique version number to each version of the module. For Appcelerator modules we decided to set the version number of our upgraded Android modules to 2.0 to indicate that the modules had been upgraded to module API version 2. Our Android modules built with module API version 1 will continue to utilize their 1.X version numbering scheme. After building both versions of the module you can combine the two zip files into a single zip file that contains the modules.

Marketplace Packaging

To distribute your module on the Appcelerator Marketplace you will need to create a single downloadable zip file for each product. The downloadable zip file should contain both versions of your Android module as well as the iOS version of your module (if applicable). The naming convention that we have adopted is module name-iphone-versions-android-versions.zip. For example, the file

ti.barcode-iphone-1.5-android-1.5.zip

contains the 1.5 iOS version and 1.5 Android version of the barcode module. However, with the combining of multiple Android versions in the zip file, the name may change to designate that multiple versions are contained in the file. For example, the updated barcode module is now

ti.barcode-iphone-1.5-android-1.5-2.0.zip

and contains the 1.5 iOS version, the 1.5 Android version, and the 2.0 Android version of the barcode module.

You can also use the following python script to assist with packaging your module:

To use this script, specify the target folder containing the distribution zip file, specify the source folder containing the various versions of your module zip file (should not be the same as the target), and specify the name of the module. For example,

./package.py dist release ti.paint

The script will enumerate the module zip files in the source folder and prompt you for inclusion in the target zip file and will automatically build up the name of the zip file utilizing the selected version numbers. Feel free to use or modify this script to suit your needs. Your combined zip file will be ready for uploading to the Appcelerator Marketplace.

New Titanium Release Speeds Apps, Extends Reach & Improves Productivity

Thursday, December 22nd, 2011

Titanium Mobile 1.8 and Titanium Studio 1.0.7 are now available for immediate download. With these latest additions to the Titanium integrated mobile development platform, developers can speed up their apps, deploy to more platforms and build apps more quickly than ever!

To help our developer community come up to speed with this huge release, we’re hosting a SEVEN WEBCAST series on January 5-13 we’re calling "Titanium Week" . Learn about the new Titanium products, ask questions of Titanium engineers, hear from experienced Titanium community members and take full advantage of all that is possible for mobile success with Titanium. Webcasts are targeted toward both novice and experienced Titanium developers. Check out the agenda and register.

Read on to learn more about the many reasons to upgrade to Titanium Mobile 1.8 and Titanium Studio 1.0.7. The official release notes for Titanium 1.8.0.1 and Titanium Studio 1.0.7 provide further details on the features and fixes made available in these releases.

Upgrade Now

Updating Titanium Studio

You should be automatically prompted to update your Titanium Studio software. If you do not see the prompt, you can select “Check for Updates” from the “Help” menu from within Titanium Studio.

Updating the Mobile SDK

Similarly, you should be prompted to automatically upgrade your Titanium Mobile SDK from within Titanium Studio. If you do not see the prompt below, you can manually check for updates by selecting “Check for Titanium SDK Updates” from the “Help” menu within Titanium Studio.

Perspective Tweaking

One of the new features in Titanium Studio is the ability to create module projects directly from within the IDE. However when this update is applied, you won’t see the option in the “File > New” menu as you might expect. To rectify this, you can select “Reset Perspective” from the “Window” menu in Studio to see this new option from that menu.

New! V8 Runtime Support on Android: Drop Google’s Superfast JavaScript Engine into Your Applications

V8 RuntimeFasten your seatbelts Android developers: Titanium Mobile 1.8 introduces dual-runtime support for Android, enabling you to take advantage of the new and faster V8 JavaScript runtime in Titanium. How much faster is V8? Our benchmark tests show loading 1,000 TableView rows is more than twice as fast, and parsing a 50KB JSON file is nearly 15 times faster than the legacy Rhino Javascript runtime.

Video: What’s New in Titanium Mobile 1.8

New! Titanium Mobile Web Beta 2 SDK: Expanding Your Mobile Reach

Mobile Web BetaTitanium Mobile 1.8 expands your reach beyond iOS and Android with the introduction of Titanium Mobile Web Beta 2. This all-new product gives Appcelerator developers the ability to develop both mobile apps and mobile websites from a single Titanium API. While we’re still innovating and improving Mobile Web, you can leverage the advantages of Titanium and HTML 5 to create engaging mobile web experiences that run in browsers on any device that share a common foundation with your native mobile apps. The Titanium Mobile Web SDK Beta 2 was previously in private beta and is now available to the entire Titanium community. Give it a try and let us know what you think!

New! Native APIs and Functionality for iOS and Android

Native APIsThe new 1.8 release pushes the number of Titanium mobile APIs for iOS and Android to over 3,000. New capabilities include:

  • Platform Parity: 37 improvements aimed at making it easier to develop across iOS and Android, including improvements in namespace consistency.
  • XML Module for iOS and Android approaches 100% DOM Level 2 compliance.
  • New iOS-specific Functionality: Longpress and Pinch gestures on views, Register a file type with an app, High Density Screenshots and more.
  • New Android-specific Functionality (Beyond V8): Embeddable video player, animation of backgroundColor, multiple attachments in the Email Dialog, gzip and deflate encodings in HTTPClient, plugins for WebViews and more.
  • Updated System Requirements: Apps built with Titanium Mobile 1.8 are compatible with Android 2.2 or later and iOS 4.0 or later. Android 2.1 and iOS 3.1.3 are no longer supported.

Improved! Developer Productivity for Common Tasks

ProductivityProductive developers are happy developers, and the new Titanium developer productivity features are going to make you very happy. To help you succeed faster than ever, we’ve made a number of improvements across the entire Titanium Mobile development lifecycle, including:

  • Configuration Wizard: found in the new dashboard in Titanium Studio 1.0.7, the configuration wizard diagnoses Android and iOS configuration errors and ensure your SDKs are up-to-date.
  • Code Snippet Library: Speed development by inserting code snippets drawn from common use cases. Instead of searching for examples within Kitchen Sink, go to the Titanium Studio Commands menu, choose “Titanium Mobile," type the desired phrase and press the tab key to insert the code into your app.
  • API Doc Improvements: Reference documentation for more than 40 popular API calls have been updated for accuracy and completeness. And we’re just getting started. Look for more changes to API doc content and formatting in the coming weeks.
  • Training Videos: Appcelerator’s popular and free training on-demand training videos are now accessible from the Titanium Studio Dashboard. Access more than 10 hours of classes and sample apps through the introductory "Zero to App" and intermediate "Building Native Mobile Apps" on-demand video training classes.
  • Marketplace Integration: Learn about new and popular modules available that you can quickly download and add to your projects.

Video: What’s New in Titanium Studio 1.0.7

 

Titanium Week: Seven Great Webcasts featuring Titanium Mobile 1.8

Titanium WeekWe’ve created a great agenda for Titanium Week, January 5-13, to help you get the most out of the all of new Titanium capabilities and to succeed using the Titanium Platform. Check out and register for any and all of the following free webcast sessions:

Titanium Week is your chance to learn from Appcelerator engineers, get answers to your questions and improve your Titanium skills. The content is suitable for both experienced and novice developers…so join in!

Thank You For a Great 2011!

As we approach the end of 2011, we want to express our thanks to the Titanium Community for all your activity, feedback, inspiration and, of course, your great mobile apps.

Because of your collective efforts, nearly 40 thousand Titanium-powered applications have been installed on over 30 million unique mobile devices—a 12-fold increase over last year!

Best wishes for a wonderful holiday season and a happy, healthy and prosperous new year.

Titanium Mobile SDK 1.8 RC2 Is Live

Friday, December 16th, 2011
Update 18 Dec 18:40  There was an issue with 1.8.RC2, preventing it from building apps for Android, which has now been resolved. Version 1.8 RC3 supersedes RC2. The attached packages have been replaced and all references in this post updated accordingly. Apologies for any inconvenience caused.

We’re excited to announce Titanium Mobile SDK 1.8 Release Candidate 3 is now available. This release fixes some issues in 1.8 RC1 and improves stability. For more information on the release, see the original blog post for 1.8 RC1.

To get the most out of the 1.8 SDK, you should also get the new Titanium Studio 1.0.7 Release Candidate. If you have already installed the Titanium Studio 1.0.7 RC, you do not need to reinstall, but make sure you have the latest updates. Click Help > Check For Updates to get the latest updates.

Read the Release Notes for additional details on all new features and improvements available in the release candidate.

Fixed Issues

This section lists high-profile issues that were fixed in RC3.

iOS Issues

  • Disabled timestamping on distribution builds. The addition of a timestamp to the version bundle string can make the string too long for Apple’s submission guidelines. This timestamp has been removed from distribution builds, but retained in adhoc and simulator builds. (TIMOB-6293)
  • DashboardView is leaking memory. (TIMOB-6229)
  • CommonJS: Module variables not updated. (TIMOB-6688)
  • Packaging: Failing to include all optional icons during packaging causes errors in Xcode pre-submission verification (TIMOB-6575).
  • Some modules designed for CommonJS not exporting, even with the “export” variable set. (TIMOB-6573)

Android Issues

  • V8 Debugger: Add a list of filtered variable names for TiStudio. (TIMOB-6549)
  • V8 Debugger: Filter stack variables by regular expression from the Mobile SDK. (TISTUD-894)
  • V8 Debugger: Collapse all JavaScript scopes into the top variables list. (TISTUD-895)
  • V8 Debugger: Filter stack frames that have a prefix of “ti:/”. (TISTUD-897)
  • Use the “ti:/” prefix for all platform JavaScript files. (TIMOB-6550)

Download and Installation

If you have Titanium Studio, you can download the 1.8 SDK from inside Studio. See below for instruction to install the SDK with or without Studio.
Download Links for Titanium Mobile SDK 1.8 Release Candidate 3:

OSX: http://builds.appcelerator.com.s3.amazonaws.com/RC/mobilesdk-1.8.0.1.RC3-osx.zip

Linux: http://builds.appcelerator.com.s3.amazonaws.com/RC/mobilesdk-1.8.0.1.RC3-linux.zip

Win32: http://builds.appcelerator.com.s3.amazonaws.com/RC/mobilesdk-1.8.0.1.RC3-win32.zip

To install the 1.8 RC3 SDK from Titanium Studio

  1. Click Help > Install Titanium SDK from URL.
  2. Paste in the appropriate URL and click Finish.
  3. After the SDK finishes downloading, you’re ready to try it out.

Before running a project, double-click the tiapp.xml file and make sure the selected SDK is 1.8.0.1.RC3

To Install without Titanium Studio

If you don’t have Titanium Studio installed, you’ll want to download the appropriate distribution above and then extract into your Titanium directory.

For example, on OSX, your Titanium directory will be under either /Library/Application Support/Titanium or~/Library/Appcelerator Support/Titanium.

On Linux ~/.titanium.

On Windows Vista/7 C:\ProgramData\Titanium and on Windows XP C:\Documents and Settings\All Users\Application Data\Titanium

Once you locate your Titanium directory, extract the zip file into this directory. The zip file will expand the contents and create/overlay some new directories for 1.8.0.1-RC3.

NOTE for OSX users who use Safari to download: Safari by default will auto uncompress your downloads, how handy. However, if you have a directory named mobilesdk, your extracted directory will be renamed.

Now, you’ll need to restart Titanium Developer to pick up the new release. Once restarted, remember to change your application SDK version and then click the ‘Save’ button.

You should now be able to test with the release candidate software.

For More Information

For more information, you may view the related API Documentation: Titanium Mobile SDK 1.8 Release Candidate 3 API docs.