AIR b2

I am happy to see AIR b2 released but the tailwind it caused some minor migration head scratching. Change list in AIR release notes was helpful so don't miss that. The main problems I had were:

  1. Getting adt to work again because code signing is now required. Solution: generate a self-signed cert (see below).
  2. Embedded WebKit browser wasn't firing event handlers injected dynamically using innerHTML. Solution: hook them using DOM methods. JQuery comes in handy for this.

A common hassle is routing hyperlinks in DHTML to default browser. I haven't found a way to do this automatically so I am marking all external links with 'xlink' CSS style and injecting click event handler that block default behavior and route href to air.navigateToURL, messy but easy with jQuery.

Generate self-signed cert:

adt -certificate -cn Foo [-ou org_unit][-o org_name][-c country] ("1024-RSA"|"2048-RSA") {pfx_file_name} {password}

Sign AIR file using the cert:

adt -package -certificate foo.pfx -password 123456 …