PhoneGap, Rants

Playing with Evil: Using PhoneGap Build for iOS in Linux

As I am not “fortunate” to have an AppleOS machine to compile a custom plugin for a PhoneGap app. Rather than wait indefinitely for one to be ordered I managed to work around the XCode dependency but still faced the prospect of getting said modified app onto an actual device. Here lies the log of the removal of my immortal soul to be sacrificed to our blessed overlords of Apple. Hail.

Step 1 – Pay for your sins

There is no getting out of forking cash to Apple – even if you plan on just developing test apps for yourself. This. Is. Sad.

So pay for your sins literally. Go through the iOS registration process. Have a cry or strap yourself down to prevent inadvertently killing all living beings (not good for future job prospects) within a 10 mile radius when the registration process goes wrong/takes too long/doesn’t tell you you put your phone number in a format Apple doesn’t like since you’re not in the US*.. dumbass.

Anyway; crisis averted (if you heed my advice about a nice straightjacket). Mourn the loss of your eternal soul.

* BTW: for UK numbers this means that the region code is ’44’ and if you don’t have an extension like I don’t then I put ‘-‘

Step 2 – Get stalked

You will need to register at least one device, which will require knowing the UIID. Plug in your iPhone and run*:

lsusb -s :`lsusb | grep iPhone | cut -d ' ' -f 4 | sed 's/://'` -v | grep iSerial | awk '{print $3}'

*From dakira

Step 3 – Register pointlessly even if it’s just for development

Follow roughly in the steps of this beginner’s guide and ignore 1) the mention of Dreamweaver and 2) the expectation you have a Mac..

Step 3.1 – p12 certificates

You need to download your developers key, which you get from your developer account console. You then generate a file called ios_development.cer


// replace {Your-Apple-Stalk-ID} with the account name you are associating the stalkyness with
openssl req -subj "/CN={Your-Apple-Stalk-ID}/O=User" -nodes -newkey rsa:2048 -keyout private.key -out request.csr
// download your ios dev cert, then:
openssl x509 -inform der -in ios_development.cer -out certificate.pem
openssl pkcs12 -export -in certificate.pem -inkey private.key -name "iOS Developement Certificate" -out certificate_with_key.p12
// you should be prompted to input password

You thus have certificate_with_key.p12 generated. Remember your password – stick it in a file with the rest of that crap.

Step 3.2 – Provisioning profiles

You now have 1) a registered device 2) a p12 certificate to register the provisioning profile. Follow the prompts to register an App ID. Associate all 3, then rejoice. Briefly. Minor victory is yours

Step 4 – PhoneGaaaap

Ensure you have your app ready to go. Notice that the iOS build is broken due to the missing profile and certificate. Use the prompts and then recall that password you saved – things aren’t unlocked for use. Once the lock symbol isn’t revelling in your insufficiencies to handle such overly complicated processes rebuild your app in the evil overlord format.

Things should have worked. If not, follow these steps then ‘Build’.

You are still dealing with the evils. Ignore urge to motion your head swiftly and violently onto your desk/nearby wall/friendly police officer.

Step 5 …

:/ Observe the QR code. Attempt to scan said QR code with iPhone as if it were an Android device with the ‘Camera’ application. Pick up jaw from floor realizing that there is no built-in scanning application. Attempt to download QR scanning app. Discover this needs the Apple-Stalk-ID for installing on your test-department device (hell as if you’d have one otherwise). Weep. Go to the URL of the ‘install binary’ for iPhone and get a generic 404 message. Scratch head and stop yourself from introducing the test iPhone to the floor with extreme prejudice..

Go to the PhoneGap build login page on the evil-device iPhone. Log in with your PhoneGap Build details. Go to ‘Apps’. Click download.

Watch as the app gets installed automatically.


Also, if you don’t have a paid PhoneGap Build account you will need to delete your old app and redo the key sign-in before rebuilding. Normally one would say “happy coding” but “faffing” is more accurate. :C

It.. updated.. yay...

It.. updated.. yay…

** Image credits to MS Paint Adventures

Android, Random, Rants

Ever since registering to Google Play to punt out a couple of simple apps I have been receiving some ads through the (developer registered) email address regarding advertising my apps to “drive higher revenue and get paid weekly”.

These apps, I may point out are free, so though I would *love* to get mo4r cash my development output at this stage isn’t exactly going to to buy me a house.

Fuck off AirPush – I hate your invasive advertising tactic and I hate finding your emails advertising yourselves. And the rest of the other guys eager to promote my apps – I’ll go find you if I wanted promotion. But somehow, I think I’ll take a flame thrower..

Not interested in dirty advertising, so fuck off with your ads


Rinse, repeat.. Jaaaavaaaaaa! D:<



Updates applied, then a broken Eclipse.

It’s like having a Windows machine again, where I have to burn everything and install it all again.. Except there isn’t much else to do but share the frustration with the Google results. Even PHP doesn’t carry as much bad press because it’s easy to install

My family has a history of high blood pressure; and you aren’t helping. Nor does this help reduce the angry, angry people out there.

Rants, Web

It’s almost a year since the ‘Great Harddrive Fire of 2011’ and just as long when I switched over to the darkside (WP) despite my reluctance to use PHP* and yet I still find there are more ‘procedures’ for customization. Invoking maintenance mode doesn’t appear to use the server’s built-in 503 error settings so I had to create a custom maintenance 503 page. I wonder what other wonderfully roundabout ways I can enhance my installs? :/

* If there was the incentive (ie: paid) to get the manpower to create a non PHP alternative to WordPress – a dedicated team to write a better solution and a slew of powerful optional plugins – then things might change. Until then, I too join the ranks of using ‘that strange toolbox’ and ‘bemoaning the awfulness of PHP’.

Random, Rants

Growing up in a fairly metropolitan part of Australia, I consider that I’ve lived a privileged life in a multicultural environment. Surrounded by academics that had more geeky issues pressing their grey matter, I did sometimes find myself in the company of a strangers which small chatter lead to this question:

“But I mean, where are you from, originally? What are you Thai? Malaysian?”

This question was not very common back home, but in certain places it did happen. I felt mildly irritated that in modern times that this was even worth expending the effort in asking. And why do I have the obligation to divulge some of my history – isn’t it (at least borderline) personal information? Even during primary and high school I don’t recall a time when this was asked.

Now in the UK, I came across this beautifully written article by pure accident and all those moments flooded back. Some of those are fresh from last week: volunteering at the local beer festival. And it’s happened in all the festivals I’ve volunteered for. I get it in pubs too. That irritation I feel each time when I get asked – the article explains rather neatly.

So next time you see a short south-east asian woman and ask which part of south-east asia where she’s from, don’t be surprised to get this response “I’m fuckin’ Australian. Any questions?”

Are you fucking kidding me?

Are you fucking kidding me? I don't look like one of the major ethnic groups? No shit!

Rants, Web

Gallery3 + WordPress 3.2.1 = FFFFFFFUUUU


I know that a WordPress on top of Nginx isn’t all unique but unfamiliar to me, but this fiddling was ridiculous!

I have set up a Gallery3 install (since they’ve stopped maintenance of Gallery2 I believed that I should also use the most active and stable version). Oh boy, was that awful: I realized late that they have intended to depend on Javascript; signs of a design approach I am strongly against. Later, after much pain of creating a custom theme for my gallery (deserving it’s own rant mainly containing one four-letter word rhyming with ‘truck’), I wanted to be able to import images from this to WordPress using the Gallery3 Picker plugin. Given that it had rave reviews and a good method of integrating with WordPress, I thought the install would be painless. I guess anything mainstream written in PHP is going to be anything _but_..

So, after much frustrating FFFFFFFUUUUUUUUUU away from sharp pointy objects and a large crowd of random victims, I found this (gallery3-picker/picker.php line 320):

if ($http_status == 302)

Now, the plugin tries something smart: it first tries the /index.php then if that fails retries with the plain URL – assuming that it does SEO rewrites.

If you took a moment to examine my Nginx setup you may have noticed this line:

location ~ \.php$ {
        try_files $uri =404;

.. So if it cannot find a file, it throws a 404 – naturally. Delving into it, the final URL the plugin was after adds a /path/to/rest at the end: so the actual URL hit for me would return 404 at the first pass, not to retry the next.

I have my tweak at least:

if ($http_status == 404 || $http_status == 302)

Geez, it’s as if you are hungry but the only option is a greasy burger at a fast-food joint you wanted to avoid. Then you discover that your patty is underdone and they demand that you use their unintuitive stove to cook it yourself. Hmmm.. this food talk makes me slightly less angry and more hungry – time for lunch!

Android, Random, Rants

Java is like a variant of the game of Tetris in which none of the pieces can fill gaps created by the other pieces, so all you can do is pile them up endlessly.

Steve Yegge (2007, Codes Worst Enemy)

From cat -v

Installing a fresh Eclipse, then running into getting the Android SDK to work with it – another activity that wants me to gouge my eyes out. Goddamn, this is why I really like vim.

I really wish we can break up, Java