sharedObject not working on iphone?
I've got a shared object that for some reason is working perfectly fine on the desktop but won't work on an iphone, the data is just not saving/loading. Does anyone have any ideas as to what the issue could be? Publishing with air 3.4.0.2710 to an iphone 5 running the latest version of iOS 6 if this makes a difference? Some code samples below...
The code I've got for saving is:
so = SharedObject.getLocal("pGame");
so.data['levelData'] = levelStats
so.data['numCoins'] = totalCoins
so.flush();
And on load it just reads the data back as below:
so = SharedObject.getLocal("pGame");
levelStats = so.data['levelData']
totalCoins = so.data['numCoins']
I'm saving the state on exit, and also on major events. First time I ran this code on the phone the app just froze because it couldn't find the shared object at all. When I wrap the shared object in an if statement to check that it exists before attempting to load data, it runs on the phone but no data loads. Any ideas?
