Skip to main content
Inspiring
August 25, 2012
Question

How to handle shared Objects on phone with no space

  • August 25, 2012
  • 1 reply
  • 431 views

Hi guys,

I use sharedObjects to save some states in my latest iOS game, and have received reports of the app not starting on some devices. It turns out that if the device is running low on file space my app crashes as it can't flush the Shared Object.

How do you guys handle saving files or states on iOS devices that doesn't have enough space left?

Thanks,

Karl

This topic has been closed for replies.

1 reply

Mark.fromOP
Inspiring
August 27, 2012

I cant imagine that sharedobjects take up that much space, its all just data they its probably no more than a few kbs, plus when the app launches it is not using the sharedobjects until you try to call them in. So the app should launch but perhaps it crashing after launch when it does call the SO. Do you have back up plans for your SO when there is no value for a SO? Lets say you are setting a variable to a shared object

var myVariable = so.data

but are you then adding a back up option

if (! so.data)

{

myVariable = 1;

}

What might be happening is your app is trying to a refrence a null SO and then use it in the code and that causes it to crash.