Copy link to clipboard
Copied
Hi there,
we developed an Application in which we save the data like this:
FlexGlobals.topLevelApplication.persistenceManager.setProperty("noAds","purchased");
FlexGlobals.topLevelApplication.persistenceManager.save();
The data on iOS won't save if we close the app (not minimize - close!).
The strange thing is that this only happens in some applications.
We developed a game in different languages. The source code is completely the same only the strings were different.
We don't think that the problem could be the character set of the different languages.
We also read a lot about the problem of saving variables on iOS with the persistanceManager and it is recommended to call the save(); method.
So we published an update and inserted the save method. It is still not saving the variables.
On Android everything is working as expected.
Best
omi
Copy link to clipboard
Copied
No idea?
Shall I report a Bug?
Copy link to clipboard
Copied
I'm having the same issue myself. If the app is closed, all the data is lost. I'm using AIR 3.6. Can anyone confirm is this is a known bug?
Copy link to clipboard
Copied
Hi,
Thanks for your bug report. Could you please share below information:
1. Is this reported for English lauguage only? As you have mentioned that it has been working fine for some applications developed in different lauguages.
2. Is this a new application or you had saved the string(setProperty) in AIR 3.5 and now trying to get that string(getProperty) from AIR 3.6?
3. Which AIR SDK, iOS version you are using?
Also, I would recommend you try(if not using) the AIR 3.7.x beta http://labs.adobe.com/downloads/air.html , to see if that makes any difference.
-Nimit
Copy link to clipboard
Copied
Hi there,
what do you mean with English language only? We just published it with no <supportedLanguages> tag.
We have the same applications in the AppStore and it is working very well except for the Danish version.
The only difference between the apps are text/label elements and the descriptor.xml is different in ids, filenames, names.
Really strange is that we tested it as debug version and it worked fine.
As we published it on the AppStore and downloaded it, it doesn't work anymore.
This happened as we use AIR 3.6 and AIR 3.7.
2. No. First version with AIR 3.6 has not worked and second version with AIR 3.7 has not worked.
3. iOS 6.1.3
Best regards and a nice day,
omi
Copy link to clipboard
Copied
Ok, now it becomes really strange!
We deleted the app and downloaded it again in the AppStore.
Now it is working fine?!?!
Copy link to clipboard
Copied
So now it is really sh***.
The next app has the same problem.
Some customers give bad reviews because if this issue.
We tested it and downloaded our App from the AppStore.
The first time we had the same bug as the customers report.
Then we deleted the app and downloaded it again and it worked...
This time we used SharedObject.
var mySharedObject:SharedObject = SharedObject.getLocal("bla");
We save an Array:
mySharedObject.data.myArray = theArray;
mySharedObject.flush();
It is a really really bad bug.
Why is it working if we delete the app and download it again from the AppStore?
Copy link to clipboard
Copied
Could it be in your initialization code for the shared object? Make sure you don't overwrite it each time the app runs, but only create it once. I experienced that before, and it would always work after reinstalling the app, but never after colsing the app and restarting.
Copy link to clipboard
Copied
What do you mean with "Make sure you don't overwrite it?".
If we want to update the shared object or the FlexGlobals we have to call:
var mySharedObject:SharedObject = SharedObject.getLocal("bla");
FlexGlobals.topLevelApplication.persistenceManager.setProperty("noAds" ,"purchased");
How is it possible that it works in some apps that are identical except the language and in some it won't work...
There is something really strange going on...
Copy link to clipboard
Copied
Still some customers on iOS can't save the data of the app.
It is really a serious Bug.
Apps developed with Flash Builder 4.7 and AIR 3.7.
Copy link to clipboard
Copied
Hi there,
It is really annoying that this happens.
We have different apps in which the user can save their data.
We already got many bad reviews because they can’t save the data...
Best
Omi
Copy link to clipboard
Copied
Hi there, this is the code I use with shared data which seems to work
var storeddata:SharedObject = SharedObject.getLocal("hs");
var high_score_level:Array;
// check to see if the storage file is initially empty....if empty, initialize it ....else retrieve the high scores.
if ( storeddata.data.highScore == null) {
storeddata.data.highScore = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
high_score_level=storeddata.data.highScore;
}
else {
high_score_level=storeddata.data.highScore;
stars_per_level=storeddata.data.starsperlevel;
}
Copy link to clipboard
Copied
Hi there,
this is exactly what I'm doing.
This is definitely a bug because it works on some installations and on others not...
Example:
I download the App from the AppStore and the saveProperty does not work.
I delete the app and download it again. This is what I'm doing several times until the saveProperty works.
Best
omi
Copy link to clipboard
Copied
What I meant was, if you're calling setProperty everytime your app runs then it will overwrite it each time, making it seem that the value is not stored.
I've been able to use it fine so far, so perhaps there is something else somewhere that is clobbering it.
Copy link to clipboard
Copied
Yes, I want to overwrite the data with setProperty on viewactivate and viewdeactivate.
Don't think that this should be a problem!?
The strange thing is that it all works well on some installations and on others not...
Copy link to clipboard
Copied
No news here?
Some customers want to save the game state but they are not able to...
Copy link to clipboard
Copied
Still no news here?
I have this problem, too. I use
AIR 3,9
Apache Flex 4.11
FB 4.7
And it seems like the issue also occures on Android devices.
Seems like strings are saved better than arrays. I have an app saving both types and the array
"vanishes" every second start whereas the string stays.
Copy link to clipboard
Copied
We haven't had any problems since air 3.8.
Can you post a snippet?
Copy link to clipboard
Copied
I found the problem!