Archive for December, 2012

Titanium Studio 3.0.1

Wednesday, December 19th, 2012

We’ve just released a new version of Titanium Studio, Studio 3.0.1, which fixes several high-priority issues:

TISTUD-3062 – Unable to install modules via Dashboard my modules section.
TISTUD-3064 – iOS: Unable to select mobile provisioning profile.
TISTUD-3071 – Studio loses connection settings on restart.

Note that 3.0 introduced a new dependency on the Python OpenSSL module for working with provisioning profiles. This was not identified as a dependency because OpenSSL is included in the default Python installation on OS X. However, if you are using a non-default version of Python, you must install the PyOpenSSL and PyCrypto modules. If you still cannot select mobile provisioning profiles after installing Studio 3.0.1, you may need to install these modules.

If you don’t know whether you have the modules installed, you can test whether the modules are installed by attempting to import crypto from the OpenSSL module:

python
>>> from OpenSSL import crypto
>>> quit()

If the import statement returns no errors, the modules are installed.

If you installed Python using MacPorts or Homebrew, use the same utility to install PyOpenSSL and PyCrypto.

Featured Developer – Jason Kneen

Tuesday, December 18th, 2012

Jason Kneen Headshot In today’s “Featured Developer” post we’ll be talking with Jason Kneen, a long time developer who has recently seen some great success with latest app Adrian James Bootcamp.

As an active Titan, Jason is also a valued member of the Titanium community. Rather than stealing his thunder, I figured I’d let Jason introduce himself.

In His Own Words

I’ve been developing since the early 80s when I wrote my code on a VIC-20. From there I went through several Commodore machines (plus an Atari ST along the way) and settled on the Amiga before my move to PCs in the 90s.

It’s funny how we take for granted the ability to create a button or textfield but back then I had to write my own controls – literally building the entire interface from scratch from the borders of buttons to rendering a cursor and controlling how it moved. Drop down menus with multi-levels were fun and I even wrote iOS style tumbler selectors in Amiga Basic.

In the 90s I moved to PCs and also started developing for Psion organisers which is where my mobile development began. I wrote apps for the Psion Series 3s, 5s and Windows Mobile devices. In the early 2000s I was developing web sites and also playing with WAP developing tools to allow editors to post and update web content from their phones.

(If anyone is old enough to remember, the apps were Backlite+ and Extrabars. I believe people still use them today and someone even ported Extrabars to colour for the Series 7!)

In recent years I’ve been playing with Objective C and Xcode but got into full-blown mobile development when I discovered Titanium Developer a few years ago. Since then I’ve been working more in mobile developing cross-platform apps for myself and my clients. I’ve also been working on some CommonJS modules to help with Titanium development, available in my GitHub account.

Right now I’m freelancing working for clients developing apps in Titanium with a little web on the side.

Interview with Jason Kneen

First off, congratulations on the quick success of Adrian James Bootcamp. Tell us a little bit about it.


No.1 in Health & Fitness and No. 6 in the whole AppStore!


Bootcamp is a total fitness routine in an app. In just 5 minutes and without any equipment you can have a full-body workout, anywhere. Since it’s release in December 2012 it’s already gone to No.1 in Health & Fitness and has reached No. 6 in the whole AppStore! Bootcamp is part of a suite of apps focusing on different aspects of the body OR goals of the user and we’re releasing more over the next few months.

Why did you pick Titanium for your app development?

I came into the team after Titanium was already selected – I believe it was chosen for the flexibility and speed at which apps could be developed and made to work on multiple platforms.

What were some of the highlights of Titanium development for you?

Speed. For the first time I can take a thought, idea or requirement for an application and in a fraction of the time it would take in Xcode and Objective C, write an application. That plus the fact it’s using a well-known, established language means you have easily accessible resources online.

Which online resources did you use to learn and develop with Titanium?

The Appcelerator web site and community forums mainly, then there’s GitHub and resources like CodeCanyon.

Was your app built with the Community edition of Titanium?

Yes.

Do you have plans for updates to Adrian James Bootcamp or future Titanium apps? Care to share some details?

We’ve just released the Android version which required minimal changes and tweaks and now sits within the same codebase as iOS. I’ve just published the German version and working on Lite versions at the moment. We have new apps coming in the New Year so there’s plenty to do! In the backend I’m working on implementing i18n multi-language features and converting a lot of the back-end code to CommonJS format to improve re-usability and performance.

Any additional thoughts or notes on Titanium development?

My big wish at the moment is to have multiple build configurations per project and I’ve had a ticket raised for that. Basically it would allow you have a single project and then build multiple outputs that have different TiApp.xml and info.plist files, use/not use specific asset folders etc. The idea being that you’d be able to create white label apps more easily, maintain separately language versions or lite/full versions of apps.

A big thanks to Jason for taking the time to give us some insight into his experience and success with Titanium app development. We know the rest of the community, as well as the Appcelerator team ourselves, get excited when we see beyond what is possible with Titanium to what is now reality.

Jason’s Links

Announcing Titanium 3.0

Friday, December 14th, 2012

As we wrap up the year 2012, I’m pleased to announce what is undoubtedly the most significant release of Titanium, version 3.0. It’s also a time to look back at the year that was and take pride in some of our achievements around Titanium and our thriving developer community.

Some of the highlights include:

  • Developer community now exceeds 400,000 registered developers worldwide
  • Over 50,000 apps publically available
  • Titanium apps now deployed on over 90 million devices (66% growth in 8 months)
  • Over 320 Marketplace Modules available in the first year
  • Over 1,400 enterprise customers including eBay, Merck, Mitsubishi Electric, NBC, PayPal and Ray-Ban

 
With the new Titanium 3.0 release we focused on the following key themes:

  • Accelerating developer productivity from initial download to app creation
  • Improved scalability and efficiency of code to promote reuse and maintainability
  • Delivering higher-quality apps

 
One of the key capabilities of Titanium 3.0 is Alloy, a Model-View-Controller (MVC) Framework.
Alloy essentially decouples the visual components of the app code (in an XML-like format) from the business logic making the code significantly easier to read, manage and re-use. After 4 months in a community pre-release format, we had over 11,500 downloads and an enormous amount of positive feedback.

Alloy helps all of our users, from the novice developer to the most advanced Titans. As one of our Titan’s, Jongeun Lee, recently shared: “I’m happy to share this amazing development experience. It took ONLY 40 hours to develop the CC10Musicians app. This wouldn’t have been possible without Titanium and Alloy.”

Using Alloy, developers can build out a library of components (widgets, business logic, skins, etc..). Over time, this facilitates the creation of an “app factory” allowing them to quickly stitch together these proven components to create higher quality apps even faster. Novice users can also get up to speed even faster by leveraging our built-in sample Alloy templates. To read the Alloy docs, click here.

Regarding application quality, in Titanium 3.0 we’ve introduced on-device debugging. This allows developers to further improve the realism of the code testing and validate the actual user experience on the device. It also means you can test specific features of the app that rely on device-specific functions such as the accelerometer for movement, GPS for geo-location services and even phone calls. Also, since many device simulators aren’t available until some time after a new device ships, on-device debugging helps deliver apps for these new devices quicker. To read the debugging docs, click here.

Titanium 3.0 also includes a new CLI (Command Line Interface) aimed at helping developers improve their automation by integrating into their own development tools such as editors and continuous integrations platforms. This allows developers to automate common activities such as build, run, and directory cleanup right from the command line. To read the CLI docs, click here.

All in all, we added over 170 new features and enhancements in this release. Read the Release Notes for those additional details.

For new users, download Titanium 3.0 by clicking here.

For existing Titanium Studio users, you will be prompted to update automatically on the next restart. You can also manually check for updates by selecting the “Check for Titanium SDK Updates” from the “Help” menu within Titanium Studio.

I would like to thank our development community for all the help, support, and feedback they have given us in delivering this latest release.

Integrate Your Mobile App with DENSO. Enter to Win a Navigation-Entertainment Receiver

Thursday, December 13th, 2012

Appcelerator Titanium Developers, we invite you to participate in the Appcelerator DENSO NaviBridge Challenge! This is your opportunity to stay on the cutting edge and develop a new breed of apps.

Just a short while ago, it was hard to envision mobile devices connecting with your automobile’s navigation system.  Today, DENSO’s NaviBridge module, makes this a reality, marking the evolution of the connected car. The NaviBridge Module facilitates the integration of point-of-interest geo pins from iOS mobile applications to DENSO In-Dash navigation systems. This allows you to take your mobile apps map features to the next level.

Integrate your mobile app with in-dash Automotive navigational systems by January 31, 2013 and enter to win a Kenwood KW-NT800HDT Navigation-Entertainment touch Panel (MSRP: $1299.95). Learn more about the contest, example integrations, how to get started, prizes and more……

Kenwood KW-NT800HDT Navigation-Entertainment

 

 

Breaking Changes in Titanium SDK 3.0

Thursday, December 13th, 2012

There are a lot of exciting new features in SDK 3.0 and Studio 3.0 we’ll be talking about more in the upcoming days. But as with any major release, there are also a few gotchas. We try to be as transparent as possible about important changes that could impact your development. So as we’re getting ready to roll out the latest version of the Titanium SDK, 3.0, there are a few things that developers should be aware of before updating.

The following changes may break existing applications working on SDK 2.1.4 and earlier:

  • Android TabGroup changes
  • Android ActivityIndicator changes
  • End of official support for the Android Rhino runtime
  • Removal of APIs deprecated prior to 1.8
  • iOS group TableView background changes (2.1.4 change)

Android TabGroup Changes

The changes made to enable the action bar on Android required changes to the way that TabGroups operate. These changes affect all android applications that use tab groups, whether or not they use the action bar.

Action Bar Tabs

When building an application with targetSdkVersion of 11 (Android 3.0/Honeycomb) or later, tab groups will be represented with action bar tabs, instead of with the older-style tab group. If you are already building your application with targetSdkVersion of 11 or later, the appearance of your tab groups will change when you build with SDK 3.0.

A subsequent blog post will describe how you can take advantage of the action bar in SDK 3.0.

TabGroup Activities

In previous versions of the SDK, each tab group window was in its own activity. In SDK 3.0, the tab group has its own Android activity (exposed as TabGroup.activity). The individual tab windows all share the same activity. This may affect you, for example, if you are creating a different options menu for each window, since you can only associate a single onCreateOptionsMenu callback with the tab group.

To switch menu items when the tabs are switched, you can use the new Activity.invalidateOptionsMenu method whenever you want to change the contents of the options menu. For example, you could call invalidateOptionsMenu in the focus event handler for each tab window, and add logic in the onCreateOptionsMenu callback to create the appropriate menu items for the active tab.

Application Title Bar

In previous versions of the SDK, the tab group was automatically set to fullscreen, so no title bar appeared. In SDK 3.0, the window title bar is shown by default, as it is for iOS tab groups.

To restore the previous behavior, set the TabGroup.navBarHidden property to true. This property, which works identically to the Window.navBarHidden property, is new in SDK 3.0.

Android ActivityIndicator Changes

In SDK 3.0, the Android ActivityIndicator has been reimplemented to create parity with iOS and Mobile Web. The old ActivityIndicator presented a modal dialog on Android. The new ActivityIndicator is a view that must be added to another view or window in order to be displayed, as on iOS and Mobile Web. (Unlike the iOS activity indicator, however, the Android activity indicator can’t be placed in the window title bar.)

In addition, Android and Mobile Web now support Ti.UI.ActivityIndicatorStyle, which contains the same constants as Ti.UI.iPhone.ActivityIndicatorStyle. iOS will support Ti.UI.ActivityIndicatorStyle in a subsequent release.

A new, Android-specific ProgressIndicator object replaces the old Android activity indicator. You can use ProgressIndicator to create either a modal dialog or a progress bar in the window title.

Code using the old Android activity indicator will break, since the new activity indicator must be added to a view. To update code for 3.0, you can switch to using the new activity indicator like you do on iOS or Mobile Web. Or to retain the previous behavior, switch to a ProgressIndicator.

For example, given the sample code for ActivityIndicator in prior releases:

var activityIndicator = Ti.UI.createActivityIndicator({
  color: 'green',
  font: {fontFamily:'Helvetica Neue', fontSize:26, fontWeight:'bold'},
  message: 'Loading...',
  style:Ti.UI.iPhone.ActivityIndicatorStyle.DARK,
  top:10,
  left:10,
  height:'auto',
  width:'auto'
});

// On iOS, the activity indicator must be added to a window or view for it to appear
if (Ti.Platform.name === 'iPhone OS'){
  win2.add(activityIndicator);
}

This legacy code looks different on iOS and Android and won’t work at all on Mobile Web. But a few small changes gives you the same results on all three platforms:

var activityIndicator = Ti.UI.createActivityIndicator({
  color: 'green',
  font: {fontFamily:'Helvetica Neue', fontSize:26, fontWeight:'bold'},
  message: 'Loading...',
  style: (Ti.Platform.name === 'iPhone OS' ? Ti.UI.iPhone.ActivityIndicatorStyle.DARK : Ti.UI.ActivityIndicatorStyle.DARK),
  top:10,
  left:10,
  height:'auto',
  width:'auto'
});

win2.add(activityIndicator);

To use the modal activity dialog instead, you’d add code something like this:

var activityIndicator;
if (Ti.Platform.name === 'android') {
  activityIndicator = Ti.UI.Android.createProgressIndicator({
    message : 'Loading...',
    location : Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,   // display in dialog
    type : Ti.UI.Android.PROGRESS_INDICATOR_INDETERMINANT // display a spinner
  });
} else {
  activityIndicator = Ti.UI.createActivityIndicator({
    ... // etc.

Like activity indicator, you must call show on the progress indicator to make it appear.

End of Official Support for Rhino Runtime

The Rhino runtime is no longer officially supported in SDK 3.0. With most developers using the V8 runtime exclusively, the decision was made to stop supporting Rhino in order to avoid spending development and test resources maintaining two runtimes.

As a result, Titanium Studio 3.0 no longer presents the Rhino runtime as an option when building with SDK 3.0 and later. Rhino is still included with the SDK, and may still be enabled by manually adding the ti.android.runtime property to the tiapp.xml file.

Removed APIs

The following APIs are being removed in this release. All of these APIs were deprecated prior to Release 1.8.

API Recommended Replacement
Titanium.Media.VideoPlayer.contentURL Use the url property instead.
Titanium.Network.addConnectivityListener Use the change event to monitor connectivity changes.
Titanium.Network.removeConnectivityListener Use the change event to monitor connectivity changes.
Titanium.UI.ImageView.url Use image instead.
Titanium.UI.orientation property Use Titanium.UI.Window.orientationModes instead.

iOS Group TableView Background Change (2.1.4 Change)

This change is not new in 3.0, but it caused confusion for some users in 2.1.4, and other users may be seeing it for the first time in 3.0.

In SDK 2.1.3 and earlier, an iOS group TableView defaults to a transparent background color. To obtain the iOS system background texture for group table views, you must specify it explicitly by using a color of "stripped" (sic) or Ti.UI.iPhone.COLOR_GROUP_TABLEVIEW_BACKGROUND. (The system texture is a pinstriped blue background on iPhone and iPod touch, and transparent on iPad.)

In SDK 2.1.4 and later, the logic is reversed: a group TableView uses the iOS system background texture by default. If you want the background image of an underlying view or window to show through, you must explicitly set the table view background color to "transparent".

This is related to a change in iOS 6. iOS 6 removed support for explicitly specifying the default group tableview background texture as a color. Using the Titanium SDK with previous versions of iOS, you can specify either "stripped" (sic) or Ti.UI.iPhone.COLOR_GROUP_TABLEVIEW_BACKGROUND anywhere a color is required, and iOS will render the striped texture. If you specify either of these values on iOS 6, iOS renders it as black instead.

Stay Tuned For More

Watch this space for more updates on SDK 3.0 and Studio 3.0.