Archives for the ‘Appcelerator’ Category

15 Sep 2015

Appcelerator Video Tip: Reduce EventListeners and increase performance

In this video I show you how to eliminate unnecessary Event Listeners in your Appcelerator Mobile App by making use of the Bubble Parent property. This is a great way to increase performance and responsiveness in your mobile app, especially when it requires some advanced processes.

The video below demonstrates the the Bubble Parent technique when using Text Fields inside Table View Rows for an iOS app. I’m sure you’ll immediately understand how you can apply it elsewhere in your mobile application, whether developing for iOS or Android.

As always just a thanks to David Leedy for hosting this video on NotesIn9. Always appreciated :)

Enjoy :)
22 May 2015

Appcelerator Tip: How to recover a GIT Reset in Titanium Studio

This post is an example of how a GIT reset in Appcelerator’s Titanium Studio almost cost me 6 hours worth of work and how I managed to recover what I lost.

My Working Environment

Apple OSX 10

Titanium Studio

eGit and Mylyn for Bitbucket

Let me add some context

Once upon a time, about a year ago, I spent the most part of my day working on a mobile app, when a critical issue arose that forced me to switch my project’s current source control branch (using eGit Source Control), to its Master branch. After switching branches on my project, I made one small temp modification to the tiapp.xml file in the Master branch, then published a mobile build of the project to iOS.

I sent the updated mobile app to my client and all was right with the world again.


After I was done deploying the iOS fix, I switched back to the branch I was working on, when I received the following message:

Funny though that I didn’t get this message when switching from my current branch to Master initially, but anyways. I clicked on “Reset” because the change I made was temporary, so I was happy to have it reset to what is was prior to the change.

Then, came the fear. All my current work was gone. 6 good hours GONE!!! This was not my finest moment. While reacting to my client’s request, I accidentally forgot to commit my work to BitBucket. I tried all sorts of rollbacks against my project, but nothing was working. I searched online and only get mentions of reflogs, which won’t help in my case.

I was ready to take a walk…cry a little…and come back to start over. Before doing that though, I opened one of the JS files that was reset, to see how many changes I would need to make, when i tried the following:

I right-clicked on the JS file and noticed the option “Replace With\Local History“.

Screen Shot 2014-05-21 at 7.28.17 PM

Now, when you perform this action directly against the project’s root folder (which is an option and was the first thing I tried), you don’t get any positive results. But, if you do this directly against the file in your project….IT WORKS!!!

Eclipse/eGit was managing my saves per file automatically, so all I needed to do was perform individual replacements for every file in my project that was affected.

5 minutes later I was good to go.


First and foremost…based on what happened to me, I strongly recommend creating a habit of checking in your code in multiple increments per day and not just at the end of the day. I would’ve cried hard had I needed to spend an additional 6 hours unnecessarily.

Finally, what I mentioned above is relevant to Titanium Studio, but I’m almost positive this same exercise could work in other development environments, especially Eclipse.

Till next time

John :)

31 Mar 2015

Appcelerator workaround for ACS Publish “Request is not recognised” error

This is a workaround when getting a ‘Request is not recognised” Error when trying to publish a Node.ACS App to the Appcelerator Cloud.

The problem seems to be with the latest version of Node.ACS (In my case version 1.0.23) not compatible with the public Appcelerator Cloud platform. As per this post, it’s recommended to downgrade to version 1.0.21. This worked for me.

To downgrade your version of Node.ACS, do the following:

  1. Open Terminal
  2. Enter the following command: “sudo npm install -g acs@1.0.21
  3. Provide administrator password if requested
  4. Restart Titanium Studio (Just in case)
  5. Once Titanium Studio is restarted, select Node.ACS app and Deploy.

That’s it. Hope this helps.


3 Oct 2014

Appcelerator fix for Ti.Map on iOS after upgrading to Titanium 3.4.0

This is a quick tip on how to get Ti.Map working again on your iOS7 builds after upgrading Titanium to SDK 3.4.0.

Quick Note

For the sake of those who just want to know how to fix the problem and not why it occurred, I will commence this post with the fix and then after that explain what I assumed happened.

Also, thanks to Tim Poulsen and Boydlee, please see below Option 1 on how to resolve this issue best. I’ve kept my option as Option 2

How to fix the issue – Option 1 (Thanks to Tim and Boydlee)

  • In Titanium Studio, open the tiapp.xml file in your mobile project
  • Under the Modules section, double click on the entry “”
  • Change the version to 2.0.2 (Which seems to be the version that will work with SDK 3.2.0 and up)


How to fix the issue – Option 2

  • In Finder, navigate to “Library > Application Support > Titanium > modules > iphone >
  • Starting with the latest version of Ti.Map, open the relevant folder (e.g. 2.0.5)


  • Open the manifest file using TextEdit
  • Check the mindsdk property. If it says 3.4.0, then it will only work for iOS 8 Builds


  • If you want to still develop for iOS7 and use Ti.Map globally for all your apps, then you will need to delete the version of Ti.Map relevant to the above-mentioned
  • In my case, I needed to delete the 2.0.4 and 2.0.5 folders. Now, my latest version of Ti.Map is 2.0.2

The error I was getting

I mentioned in a previous post of mine, that the reason I upgraded Titanium Studio to version 3.4.0, was because Xcode 6 silently installed itself on my machine. When I upgraded Titanium to 3.4.0, I got the following error message when trying to run a build for an iOS7 app that makes use of the Ti.MAP module:



My assumption of what happened

So, here’s a shot in the dark of what happened. When upgrading to Titanium Studio 3.4.0, Appcelerator saw that I had the Ti.Map module (which Appcelerator developed) and immediately downloaded the latest version (2.0.4 or 2.0.5), which I assume is required for iOS 8 development.

The truth is, I can’t remember what version of Ti.Map I installed last, but I do know that it was working. When I opened the modules folder on my Mac, the latest version was 2.0.4.

At this time I thought that maybe I downloaded 2.0.4 a while ago, and during the update of Titanium Studio this module was modified accidentally by the update.

My first attempt to fix the problem

First thing I did was check on Github what the latest version of Ti.Map was. I noticed 2.0.5 was released and downloaded that to my modules folder.

Sadly this did not fix the problem. I still received the same error as before.

My second attempt to fix the problem

I got a bit clever and opened the manifest file for version 2.0.5. I noticed that the minsdk parameter had a value of 3.4.0. I changed this to 3.2.3.

The good news is that my app was successfully running again. The bad news is that when launching any window that made use of the Ti.Map module I got the following error:


It was here that I finally made the assumption that Ti.Map 2.0.4 was automatically downloaded, as it contains code that only works in XCode 6.

My third attempt which finally fix the problem

What I did next was started from the latest version of Ti.Map, and checking backwards which version had a minsdk lower or equal to 3.2.3. In my case, it was version 2.0.2 of Ti.Map. So I deleted the 2.0.4 and 2.0.5 folders, reran my iOS7 build and Boom. Everything is working again.

I hope this helps everyone. I welcome any input that would assist in understanding what happened here.

Cheers for now
1 Oct 2014

Appcelerator Tip: Switch between iOS SDKs for mobile app development

Thanks to Apple forcing my hand by auto installing Xcode 6, I had to quickly manage multiple versions of Xcode on my mac for Appcelerator mobile development.

Why multiple versions?

Xcode 6 has the iOS 8 SDK and Simulator by default. For some reason, I couldn’t get it to include the iOS7 SDK, which is what I require for my current development projects. This meant that I needed Xcode 5 back on my machine. I was quite nervous to delete Xcode 6 and replace it with Xcode 5 again, so I decided to install multiple versions of Xcode instead.

My first attempt failed

My first attempt was to do the following (Note: Here’s my blog post on how to achieve the below-mentioned):

  • Download Xcode 5.1.1 from the Apple Developer Center
  • Extract the 7.1 SDK and Simulator from Xcode 5.1.1 and paste it into Xcode 6
  • Restart Titanium Studio

This used to work in the past, but not this time. I kept getting random errors that I  haven’t seen before.

My second attempt succeeded

Thankfully, there’s more than 1 way to skin a cat. The following worked for me:

  • Download Xcode 5.1.1 from the Apple Developer Center Website (I named the file “xcode_5.1.1.dmg“)
  • Double click the DMG file and drag the “” icon on to the “Applications” icon.
  • When prompted if you want to “Replace” or “Keep Both” files, choose “Keep Both“.



  • Once the copy is complete, navigate to the Applications Folder and rename the new to “”


Now, what we need to do is tell Titanium which Xcode to point to. By default, Titanium looks at the default “” file in the Applications folder. In this scenario, we want Titanium to point to the “”.

To achieve this, do the following:

  • Open Terminal
  • Type in “sudo xcode-select -switch /Applications/”
  • Restart Titanium Studio
  • In the Top Menu, navigate to “Titanium Studio > Preferences > Studio > Platforms > iOS”
  • Next to iOS SDK Home, click on the “Refresh” button.



And that’s it. Hopefully this will do the trick for you as well.

Till next time