Reputation: 7036
Encrypted local store doesn't function once an application is installed on my machine. I've been having problems on this computer with encryptedlocalstore, so I setup a basic test program.
Things work fine when run from adl, but do not function when run normally. If I run adl on the installed application from inside the .app/Contents/Resources folder the application works fine, but when run normally it fails.
I've tried deleting my entire ~/Library/Application Support/Adobe/AIR/ELS folder but to no avail. I uninstalled and reinstalled Adobe Air 2.5.1 and still ELS fails. The folder for the Application is created within the ELS folder, but none of the calls to ELS function, and throw an error with the message "general internal error". There is no stack trace attached to the error messages.
I'm running Mac OSX 10.6.6
The code is pretty simple but I'll attach it anyways.
Any ideas?
<?xml version="1.0"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
applicationComplete="init()">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script><![CDATA[
import mx.controls.Alert;
protected function init():void
{
output.text += "before\n";
try
{
var data:ByteArray = EncryptedLocalStore.getItem("testItem");
if (!data)
{
output.text += "Value not set\n";
}
else
{
output.text += "Value Was: " + data.readUTFBytes(data.bytesAvailable) + "\n";
EncryptedLocalStore.removeItem("testItem");
output.text += "Item Removed\n";
}
}
catch (e:Error)
{
output.text += e.message + "\n";
output.text += e.getStackTrace() + "\n";
}
output.text += "after\n";
}
protected function storeItem():void
{
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes(toStore.text);
EncryptedLocalStore.setItem("testItem", bytes);
output.text += "Value Stored: " + toStore.text + "\n";
}
]]></fx:Script>
<s:TextInput id="toStore"/>
<s:Button click="storeItem()" label="Store Val"/>
<s:TextArea id="output"/>
Upvotes: 0
Views: 1624
Reputation: 7036
This problem was resolved on the Adobe Air Forums here http://forums.adobe.com/thread/790858?tstart=0
Upvotes: 1