Thursday, June 27, 2013

virtual device lab for android

Working on my current project (an android port of an iOS app) has got me thinking that with thousands of different Android devices out there, it would be neat to have a virtual device lab community of developers and testers, where we could register our various devices and collaborate on testing our apps on those devices.  I know there are device labs out there, but these tend to be web app only, with no native apps allowed.

I know that there are issues in terms of competition - we are all competing for work, after all, I but think that an element of co-opetition could be beneficial.

This is how I see it working;

1) we use a testflight project to register our devices and apps

2) we use a unit test runner like ti-jasmine to produce an app in "test mode"

3) we upload the app to testflight and inform those people with relevant devices to download it

4) the users install and run the app

5) the developer gets feedback via TF or some other way TBD

Clearly there has to be some trust relationship involved here and the choice of whether to install the app and run it has to remain with the device owner.

Is this feasible? what would we need to do to make it work?

Interested?

drop me a line or tweet @paulatstepup if you are interested

Monday, June 17, 2013

Installing Node.js for ACS under current user

Installing node using a package manager is simple on most platforms, but NPM still wants to run as root for most things.  BAD idea unless you want your machine to be pwned.

Here is how I did it;

1) download node.js source from the distro site.  I downloaded it to $home/local/src.  At the time of writing Node 0.8.13 is the minimum version needed for ACS support.
2) decide where you want to install it.  I chose $HOME/local
3) create/edit the file ~/.npmrc and add the following;
root =    /$HOME/local/lib/node_modules
binroot = /$HOME/local/local/bin
manroot = /$HOME/local/share/man

4) cd into your source folder and install node
./configure --prefix=~/local
make
make install

5) Create a ~/.node_modules symlink
cd
ln -s local/lib/node_modules .node_modules

6) Add the following to your ~/.bash_profile directory
export PATH=$HOME/local/bin:$PATH

7) type
which npm

If it says ~/local/bin/npm you are done

I adapted the instructions 1 to 7  from this original blog

8) install ACS
npm install -g acs

9) check your ACS install
acs login

10) you will be promoted for your username and password
ACS: Appcelerator Cloud Services Command-Line Interface, version 1.0.3
Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.

username:

11) if successful you should see
Welcome back, xxxx! You are now logged in.

12) Now you need to ensure Titanium know where your install is.  On a mac, go to Titanium Studio > Preferences > Studio > NodeJS

Set your Node Executable and Node Source paths as appropriate.  Your detected path should match the path set in step 4 above




Monday, June 3, 2013

Cross Platform Development with Titanium - differences between iOS and Android pt2

A really simple (and brief) one today;

I was using a callback to update  button title from a picker;  I was defining a callback as follows;
When no selection is made, the above code made my app crash on Android. On iOS it worked fine. This threw a cast exception on Android.
The fix was a simple one. Just add an empty string to the selection;