Thanks for the reply Bink. I decided to keep investigating after you said people were using it successfully.
I've narrowed it down a small test case.
It's related to using netconnection.
I'm on a Mac. I've got my firewall turned on. Mojave. Air 19.
If I increment the build number and publish a new release ELS will throw an error message the second time I open the new release version.
`package
{
import flash.data.EncryptedLocalStore;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.NetStatusEvent;
import flash.net.GroupSpecifier;
import flash.net.NetConnection;
import flash.net.NetGroup;
import flash.text.TextField;
import flash.utils.ByteArray;
public class ELSTest extends Sprite
{
private var _netConnection:NetConnection;
private var _group:NetGroup;
public function ELSTest()
{
addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
}
protected function addedToStageHandler(event:Event):void
{
var _textfield:TextField = new TextField();
addChild(_textfield);
_textfield.text = "starting...";
_textfield.width = 300;
var _textfield2:TextField = new TextField();
addChild(_textfield2);
_textfield2.text = "starting...";
_textfield2.width = 300;
_textfield2.y = 40;
saveString("test", Math.random().toFixed(4));
_textfield.text = getString("test");
connectRTMP();
_textfield2.text = "loaded app";
}
private function connectRTMP():void{
_netConnection = new NetConnection();
_netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
_netConnection.maxPeerConnections = 16;
_netConnection.connect("rtmfp:");
}
private function netStatus(e:NetStatusEvent):void{
switch (e.info.code)
{
case "NetConnection.Connect.Success" :
setupGroup();
break;
case "NetGroup.Connect.Success" :
_group.post({type:"connected"});
break;
case "NetGroup.Posting.Notify" :
break;
case "NetConnection.Connect.NetworkChange":
break;
}
}
private function setupGroup():void{
if(!_group){
var groupspec:GroupSpecifier = new GroupSpecifier("test");
groupspec.postingEnabled = true;
groupspec.ipMulticastMemberUpdatesEnabled = true;
groupspec.addIPMulticastAddress("225.225.0.1:30303");
_group = new NetGroup(_netConnection, groupspec.groupspecWithAuthorizations());
_group.addEventListener(NetStatusEvent.NET_STATUS,netStatus);
}
}
public function saveString(stringName:String, value:String):void
{
var _bytes:ByteArray = new ByteArray();
_bytes.writeUTFBytes(value);
EncryptedLocalStore.setItem(stringName, _bytes, false);
}
public function getString(stringName:String):String
{
var _bytes:ByteArray = EncryptedLocalStore.getItem(stringName);
if(_bytes){
return _bytes.readUTFBytes(_bytes.length);
}
return "";
}
}
}`