actionscript-3ipadapache-flexflex-mobilepersistence-manager

Flex Mobile: PersistenceManager not saving data (only on some iPads)


Using AS3 and AIR 14. I have a function (save()) that saves a username after user login and a function (get()) that gets the username every time the App is restarted so the user doesn't have to log back in and can work offline. This works on my iPad 2 and 3, but I have another iPad 3 that this does not work on. When the App is fully closed and reopened the "username" is not held onto. Is it my code or the device?

All 3 devices have iOS 7 and stay up-to-date. This problem just started a couple weeks ago and had been working fine on all devices.

Example:

public var saveData:PersistenceManager = new PersistenceManager();

public function save():void
  {
saveData.setProperty("username", txtUsername.text);
  saveData.save();
}

public function get():void
  {
  var username:String = null;

  if(saveData.getProperty("username"))
  {
     //This comes back null on one iPad but not the others
  username = saveData.getProperty("username").toString();
  }
}

Solution

  • Could have to do with the iPad being low on memory. Removing Apps and clearing space seems to help with this issue.