Devlog

TiShadow

TiShadow enables you to test faster on multiple devices at once. This is a step by step article to use it. If you want to use it on Android Genymotion emulators, you first have to install Google Apps on these emulators. TiShadow consists of 3 elements: The server that pushes apps and updates to the […]

Node.js installation and npm prefix

Some things regarding Node.js installation and setup: When installing Node.js with the installer, it will install the npm inside the Node.js location. So if you've set another prefix, you have to delete the npm packages from within the Node.js location, so they won't shadow the one in the prefix location. The npm prefix variable is […]

Find sqlite location

Te find the sqlite location for your iOS simulator, you first have to know the simulators uid. To see all available simulators and their device UIDS: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl list The sqlite location is: ~/Library/Developer/CoreSimulator/Devices/<device-id>/data/Containers/Data/Application/<application-id>/Library/Private Documents/<db>.sql Unfortunately it's (as far as I know) not possible to get the application id. If you know the name of the […]

Backbone in Titanium

Using Backbone in Titanium Alloy is a very powerful mechanism but it can backfire on you if you don't take into account how it works. Remove event listeners from singletons A common pattern is to create a singleton when a window opens¬†and attach a¬†change event handler to the model so the views will update when […]

Store mcrypt values from PHP in MySQL

The mcrypt functions return a binary string, so you can store it in a VARBINARY or BLOB field or as VARCHAR or TEXT if you first base64 encode it. When using the CBC (Cipher Block Chaining) mode, the input is divided into blocks of X bytes. The last block is then padded with NULL bytes […]

Android UI thread

I wanted to query a database on the onCreate method, but I ran into issues when doing this from another thread. First I tried to do it with the View.post() method, but it seems like the View is not always attached to the window, so the run() method of the Runnable was never called. Another […]