Skip to main content
Participant
July 24, 2014
Question

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

  • July 24, 2014
  • 1 reply
  • 141 views

I have a function (save()) that saves a username after user login and a function (get()) that gets the username everytime 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?

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();

  }

}

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
July 24, 2014