Skip to main content
Inspiring
Jul 9, 2011 6:45 PM UTC
Answered

anyone else having problems with shared objects in iOS?

I've got a program that uses shared objects to keep track of level information. It is working fine in android but it has stopped working in iOS. It used to work in iOS I think. What could be happening? My shared object is always returning undefined in iOS

-Scott

This topic is closed to new replies. Start a new post to keep the conversation going.
blazejewiczCorrect answer
Participating Frequently
Jul 9, 2011 9:45 PM UTC

Hi Scott,

It appears you've to explicitly "flush" data into SharedObject instance on iOS, see similar topic:

http://forums.adobe.com/message/3731055

try implementation details from linked thread and post if it works,

hth,

kind regards,

Peter

4 replies

blazejewiczCorrect answer
Participating Frequently
Jul 9, 2011 9:45 PM UTC

Hi Scott,

It appears you've to explicitly "flush" data into SharedObject instance on iOS, see similar topic:

http://forums.adobe.com/message/3731055

try implementation details from linked thread and post if it works,

hth,

kind regards,

Peter

Translate
Inspiring
Jul 10, 2011 1:24 AM UTC

Thank you so much Peter for taking the time out of your day to help me fix my problem. It works!

Translate
Inspiring
Jul 9, 2011 8:48 PM UTC

It has failed to work on two of my iOS devices. I am using air 2.6.

This is my code:

Bookmark = SharedObject.getLocal("bookmarkData", "/");

if (Bookmark.data == undefined){

     Bookmark.data['lessonIndex'] = 0;

}

lessonIndex = Bookmark.data['lessonIndex'];

LessonIndex is always 0 at the start of the program. This is a product killing problem. If I cannot resolve this 3 years of work has just been flushed down the toilet.

Translate
Inspiring
Jul 9, 2011 8:54 PM UTC

Look this is simple stuff. You can see this working correctly in a browser here:

http://literacysoft.com/primer/index.html

Translate