How to fix TiShadow not showing verbose error logs

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

A problem I’ve been struggling with for a long time was that whenever I’m developing and make a typo e.g. missing closing bracket, the TiShadow log would only show “Alloy Compile Error” and not give any details about the filename or line number.

This made looking for the error pretty troublesome on occassion.

The feature of verbose error logs with filenames and line numbers has been on TiShadow’s master branch for some time it seems but every time I tried to update, I still couldn’t see them.

The problem turned out to be that I had multiple TiShadow hooks inside ~/.titanium/config.json linking to older versions.  I removed these older versions and left only references to the single installation I wanted to use and now I finally see verbose error messages!

To install from master do:

$ sudo npm install -g dbankier/TiShadow

 

Views without Controllers in Titanium + Alloy

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

Anyone using this:http://docs.appcelerator.com/titanium/3.0/#!/guide/Views_without_Controllers

By doing e.g. “alloy generate view viewnamhere” then trying to use the controller-less view might get an error message that the module could not be found like this:

[DEBUG] [android, 4.2.2, 10.0.3.15] Native module:alloy/controllers/pricelist
[ERROR] [android, 4.2.2, 10.0.3.15]
Type: Error
Message: Requested module not found
File: ti
Line: /module.js
At: Module.require

Just had to do a ti clean and re-build, now it’s working!

(Currently testing on iOS FWIW)

How to use HighCharts with Titanium

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

We made a sample app based on Appcelerator’s post here: http://www.appcelerator.com/blog/2013/09/interactive-charts-in-appcelerator-titanium/

The good thing about HighCharts is that they allow offline usage while Google Charts doesn’t.

Here’s the GitHub link: https://github.com/foolprooflabs/TitaniumHighCharts

EDIT: Just seen this https://github.com/ricardoalcocer/TiAlloyCharts/tree/master/app/widgets/com.alco.highcharts which I expect does pretty much the same thing except in Widget format.  You should probably use that instead if there are no issues with it.

How to customise the Titanium Android Tab Bar (and other elements)

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

The Appcelerator documentation does have all the information for you but if it’s too much to take in, here you go:

1. Generate the Tab Bar styles you want here: http://jgilfelt.github.io/android-actionbarstylegenerator/ [If you want black font, choose Light; if you want white font, choose Dark; if you want any other colour, you’ll have to edit the XML file yourself based on the instructions here]

2. Click Download

3. Copy the “res” folder in the ZIP you downloaded to projectRoot/platform/android/ (i.e. it should be a sibling of the app folder not inside it)

4. Put this inside your tiapp.xml but replace “StyleName” with the style name you entered on the github.io link above:

<android xmlns:android=”http://schemas.android.com/apk/res/android”>
<manifest>
<application android:theme=”@style/Theme.StyleName”/>
<uses-sdk android:targetSdkVersion=”17″/>
</manifest>
</android>

5. Clean & Build

That should get you started.

If you want to theme other elements, you’ll need to use the Android Holo Colors Generator and if you want to combine the Android Holo Colors with an ActionBar Style (above), read the Titanium custom Theme docs look for the section “Using Both the Android Holo Colors Generator and Android Action Bar Style Generator”

Android and iOS version usage statistics

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

Not sure which Android version to use?

86% of Android users now use Ice Cream Sandwich or higher (that’s Android 4.0+) [1]

91% of users are now on iOS7 [2]

Here are the links to the full statistics and a couple of screengrabs.

[1] https://developer.android.com/about/dashboards/index.html?utm_source=ausdroid.net
[2] https://developer.apple.com/support/appstore/

Screen Shot 2014-08-21 at 9.51.32 AM 10599461_10204373170546311_9197676246289506262_n

TiDynamicGrid combined to read data from a blog

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

On the day of our TiAlloy training 2 days ago, a module was released called TiDynamicGrid (Gittio link) which lets you quickly create a dynamic grid of content in your app.

As a quick bonus for the attendees of our training, I did a quick, basic combination of both TiDynamicGrid and concepts from FokkeZB’s tutorial slides.  Works on iOS and Android.

The code should be pretty self explanatory for those who attended, it’s a very simple implementation but a good example of what you can do with Titanium in a very short space of time.

Any post that doesn’t have a Featured Image set in WordPress (which is most of them at time of writing :P) defaults to our company logo:

iOS:

Screen Shot 2014-08-11 at 7.37.06 AM

 

Android:

Screen Shot 2014-08-11 at 7.59.23 AM

 

Github repo: https://github.com/foolprooflabs/dynamicgridblog

Progressing from TiShadow Express

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

Building by adding “–shadow” to your build process is pretty cool if you’re building for one OS only but if you want to build to iOS and Android at the same time, you’ll need to go a little deeper.

This process requires there be a TiShadow App on your device already which will connect to the TiShadow server running on your machine.

Here we go:

1. Install TiShadow: $ npm install -g tishadow

2. Create a TiShadow Titanium app to be installed on your device [NB: this is totally unrelated to the application you’re building] $ mkdir ~/tishadowapp && tishadow app -d ~/tishadowapp

3. Install this app on your devices/simulators, e.g.:

$ cd tishadowapp 

$ ti build –p android 

$ ti build – ios

OK, now your TiShadow app should be installed on your devices/simulators.

4. Run the TiShadow server: $ tishadow server

5. Open your simulator/device and open the TiShadow App then type in the IP of your local machine. For me, on iOS “localhost” was enough but this wouldn’t work on GenyMotion and I had to type my actual IP which was “192.168.43.190”

OK, now your two simulators/devices are connected to your TiShadow server on your machine

6. Now, run either $ tishadow run OR $ tishadow @ run –update The second will watch for updates, the first will only push updates once.

This is the TLDR; version. For a detailed explanation of TiShadow, you can try this: http://olivalabs.com/2013/10/tishadow-for-titanium-development-part-2/

TiShadow Github URL: https://github.com/dbankier/TiShadow

TiShadow project homepage: http://tishadow.yydigital.com/

FREE Titanium Workshop Summary

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

Very educational and fun! Learned a whole new engine!”

It’s a super fantastic seminar where you can actually learn something new in less than a day.”

The workshop is awesome I learned a lot. Great jumpstart to learning Ti.”

Big thanks to all the attendees from today’s free workshop in Makati, Philippines…we had a great time and I think you all learned something quite valuable.

There’s still so much more about Titanium to learn about that we didn’t have time for but I think you all got a great introduction which should be enough to get you started exploring more about Titanium.

We’re planning more workshops in the future both on the same topic and some others that will go more in-depth on particular topics.

Thanks again to @FokkeZB for his work on the slides, they’re the reason for the great testimonials!

Here’s a pic of today’s attendees:10589982_10203753282766283_1987051079_n

Shame about the two who cancelled at the last minute and couldn’t make it today, bawi kayo next time!

Stay tuned for further updates and the schedule for the next workshop!

 

FREE Titanium Training Workshop August 9

Interested in a hands-on tutorial in Titanium? Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services

UPDATE: The Saturday Workshop is now full but we plan to hold another workshop in the near future so watch this space.

Foolproof Labs is happy to announce that we will be holding a free workshop for anyone interested in learning about cross-platform mobile native UI application development with Appcelerator’s Titanium.

It is a very hands-on workshop where you will end the day with a working Android and iOS application that pulls data from a blog, displays it in a list and displays the blog post in full when the list item is clicked.

A very simple app but a great intro to Titanium that will cover:

  • Alloy Framework
  • Intro to views and styling elements with TSS
  • Optimising your development workflow with TiShadow
  • UI elements:
    • ListView
    • NavigationWindow
    • Labels
    • WebViews
    • SearchBar
  • Collections/Models with BackboneJS
  • Data Binding + Sync Adapters

That’s a lot to get through in one day! And we won’t just cover the theory, you will be expected to use all of the above to create your own app by the end of the day.

To register your interest, click here

Key info for those attending:

At this point, please take note of the following:
  • Before the training: please setup Titanium, TiShadow and if you want to develop Android: GenyMotion (the default Android emulator is very slow).  
  • It can take a long time to setup (and download!) and you can encounter a lot of problems so please don’t leave it until Friday night or even worse Saturday morning.  Please try to install it as soon as you can.  It’s very likely that you’ll encounter some problems with the setup so we’re having an “open surgery” for Titanium issues in our office next week.  Just bring your laptop (or desktop if you must :P) to our office before Saturday and either me or Rhys will be happy to help you debug the problem.
Other than that, looking forward to meeting you all next week where we’ll have free coffee, free lunch and lots of free Titanium Training 🙂

 

Search replace db WordPress

Developing a site on localhost or on a local domain and need to push the database live? Worried about how to switch all of the hard-coded URLs in the database? Worry no more!

http://interconnectit.com/products/search-and-replace-for-wordpress-databases/