Signed AIR App started but looked weird

The subject says what I foccussed today. I am currently working on an AIR application which connects to a local socket server. I am developing under OS X but the socket server I have to use is only for Windows so I started Parallels with Windows Vista and started the server there to test from OS X. The only thing I had to change from the production settings is the IP address from localhost to the IP of my Windows Vista instance.

For that reason I added a config.xml to my application where I can overwrite localhost. My mistake was that I packaged the config.xml within my .air file. After installation I browsed to the folder (under OS X you have to right-click the app and select Show Package Contents) and changed the IP manually. This worked fine to the point where I added the certificate and packaged a signed app. After chaning the IP I still could launch the application and even the custom IP was read out correctly and also connected to the socket server BUT the UI looked weird. The buttons had no roll over and lists showed up without content and so forth. When I changed the IP back to localhost it worked as expected.

So I guess AIR signs all package contents and if something does not match I would expect that the application does not start but shows some kind of verbose message to the user that the content is not trusted …

However the workaround/solution was to look for a config file in the File.userDirectory where I can overwrite the IP. I should have done this in the first place since with that I also could have avoided that I always had to change the IP back to localhost before packaging the app. Nevertheless I thought sharing this experience makes sense because it is not obvious why an app starts looking weird without any verbose error.

I have not searched about it so if someone has a link to the docs or perhaps a filed bug please drop a comment.

Comments are closed.