Skip to main content
Inspiring
July 9, 2011
Answered

anyone else having problems with shared objects in iOS?

  • July 9, 2011
  • 2 replies
  • 1297 views

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 has been closed for replies.
Correct answer blazejewicz

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

2 replies

blazejewiczCorrect answer
Participating Frequently
July 9, 2011

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

Inspiring
July 10, 2011

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

Inspiring
July 9, 2011

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.

Inspiring
July 9, 2011

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

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