views:

18

answers:

1

I would like to have an AIR application available for web download, but have some data customized per-user-download. Think CD-key, or in this case an encryption key and user name, so that the downloaded version can connect to a website and know who it is that downloaded it. As a fail-back if this is not possible, I could require the user to log in once and set one up and then store it locally, though I'd like to make it one-click and seamless. However, if the latter is the only way to do so, what's the best cross-platform-safe way to store local persistent data available to AIR?

A: 

Best is subjective. You could use an SQL Lite Database or any sort of local file you prefer. I have distributed XML files with AIR applications before and used them for configuration purposes. I'm not sure if I'd consider an unencrypted XML file secure, but there is no reason you can't encrypt it on disk and decrypt it in memory.

It sounds like you're trying to create a form of licensing scheme. IF so, you can check out third party licensing schemes for AIR applications such as NitroLM, Sharify, Zarquon, or Adobe Shibuya.

www.Flextras.com
So how do you "distribute an XML file with an AIR application"?
eruciform
When you export the project, be sure to include the XML file as an asset. I believe it's a checkbox on the directory structure list somewhere in the export release build process; but it's been a while since I've done it.
www.Flextras.com
@flextras - that would mean recompiling with each new xml. I was looking more for something where I could release a static foo.air file complete with badge, and when someone loads up a page with the badge on it, the server would include some info in the arguments there (or something) such that when it's installed, some per-download data would be baked in...
eruciform
In theory, you could use the command line SDK and compile the app on the server "on the fly" for each user. I don't see a way around this implementation if you want to include user specific information int he AIR app. Normally the app would have the user enter their user credentials (username / password) and then ping a server for the rest of the relevant info.
www.Flextras.com
thanks, the latter is what i ended up going with. they need to log in anyways, so i might as well use the normal authentication system.
eruciform