Skip to main content
Projectitis
Inspiring
April 10, 2013
Answered

SharedObjects path change between AIR 3.4 and 3.5 - now update to 3.7

  • April 10, 2013
  • 2 replies
  • 653 views

Hi all,

We were unaware of the change to SharedObject save path between 3.4 and 3.5, and all people who upgraded their game once the new app went live with 3.5 lost all their game progress data.  However, NEW people that downloaded the game have had no problems.

For the devices that upgraded their game (it was 3.1, now 3.5), SharedObjects have simply stopped working.  They cannot be loaded or saved to the disk, and no new sharedobjects can be saved to the device either - only retained in memory.  Every time the user starts the game, the game thinks they are a new user and they lose their progress - including their in-app purchases (consumables)!

We are now rebuilding the app with AIR 3.7 - I just want to check:  Anybody that downloaded the game fresh with AIR 3.5 has working SharedObjects (at the new/broken path). Will they now loose all of their progress data when they download the update to 3.7 and SharedObjects once again use the old path? 

If so is there a workaround for those people?

Cheers,

Peter

This topic has been closed for replies.
Correct answer Projectitis

We know what the problem is moving from 3.4 to 3.5, but what I am asking is what the problems are moving from 3.5 to 3.6 (or in this case 3.7).

We have solved this problem now, but the workaround is relatively complicated.  Basically we copy the actual SharedObject binary files around the file system to get them where we want them to be.  Hopefully the paths on iOS don't change in the future!

SITUATION 1

Our original app is in AIR 3.1. The sharedObject is called DATA1

People who updated to 3.5 lost all progress, and no new SharedObjects were created

If they now update to latest update in 3.7, they will once again continue to use DATA1 and progress will continue

SITUATION 2 (the complex one)

People who downloaded our 3.5 app fresh have SharedObject DATA2

If they now update to latest update in 3.7, the app will try to use DATA1, so they will potentially lose all progress

But because DATA1 has no data in it, we attempt to manually load the DATA2.sol file from the filesystem using 'File' and manually setting the path to where the sol is located, and we copy DATA2 back to DATA1 (if it exists). Now the player can continue progress.

SITUATION 3

People who download the latest version of the app (AIR 3.7) fresh will create new SharedObject DATA1

Thanks very much for the bug Adobe, it has caused no end of trouble .

2 replies

Adobe Employee
April 11, 2013

https://blogs.adobe.com/airodynamics/2012/12/10/changed-behavior-of-shared-object-on-ios-in-air-3-5/ blospost discusses the issue in details and even offers a workaround for AIR 3.5.

Projectitis
ProjectitisAuthorCorrect answer
Inspiring
April 11, 2013

We know what the problem is moving from 3.4 to 3.5, but what I am asking is what the problems are moving from 3.5 to 3.6 (or in this case 3.7).

We have solved this problem now, but the workaround is relatively complicated.  Basically we copy the actual SharedObject binary files around the file system to get them where we want them to be.  Hopefully the paths on iOS don't change in the future!

SITUATION 1

Our original app is in AIR 3.1. The sharedObject is called DATA1

People who updated to 3.5 lost all progress, and no new SharedObjects were created

If they now update to latest update in 3.7, they will once again continue to use DATA1 and progress will continue

SITUATION 2 (the complex one)

People who downloaded our 3.5 app fresh have SharedObject DATA2

If they now update to latest update in 3.7, the app will try to use DATA1, so they will potentially lose all progress

But because DATA1 has no data in it, we attempt to manually load the DATA2.sol file from the filesystem using 'File' and manually setting the path to where the sol is located, and we copy DATA2 back to DATA1 (if it exists). Now the player can continue progress.

SITUATION 3

People who download the latest version of the app (AIR 3.7) fresh will create new SharedObject DATA1

Thanks very much for the bug Adobe, it has caused no end of trouble .