Can't save file on iOS device with low free space available

Hi,
I was using SharedObject to save settings in my game. However, recently I discovered on one of our devices it doesn't work. I've found somewhere on this forum discussion that air can't save sharedobject when available space is lower than about 300mb (link here: Bug#3711301 - sharedobjects fail when available storage is low). On my iphone it's about 40mb, but file, which I want to save is just 2 variables.. persistenceManager doesn't work too (well i've looked at source and it's just using SharedObject). So i've decided to just write file by myself:
declarations:
public var mute:Boolean = false;
public static var fullId:String = "";
then in constructor:
flash.net.registerClassAlias("Settings", GameSettings);
load();
and finally save() and load() functions:
public function save():void
  try {
  log("begin save()");
  var file:File = File.applicationStorageDirectory.resolvePath("settings.txt");
  var stream:FileStream = new FileStream();
  stream.open(file, FileMode.WRITE);
  var settings:GameSettings = new GameSettings();
  settings.fullId = fullId;
  settings.mute = mute;
  stream.writeObject(settings);
  stream.close();
  log("end save()");
  catch (error:Error) {
  log("[ERROR] " + error.name + ": " + error.message + "\n" + error.getStackTrace());
  public function load():void
  try {
  log("begin load()");
  var file:File = File.applicationStorageDirectory.resolvePath("settings.txt");
  if(!file.exists){
  log("settings.txt does not exist, created new one..");
  save();
  return;
  var stream:FileStream = new FileStream();
  stream.open(file, FileMode.READ);
  var settings:GameSettings = stream.readObject() as GameSettings;
  mute = settings.mute;
  fullId = settings.fullId;
  log("loaded mute = " + mute);
  log("loaded fullId = " + fullId);
  stream.close();
  log("end load()");
  catch (error:Error) {
  log("[ERROR] " + error.name + ": " + error.message + "\n" + error.getStackTrace());
My GameSettings class:
package
  public class GameSettings
  public var fullId:String;
  public var mute:Boolean;
  public function GameSettings()
This works on desktop, android. Works on my ipad too, which has 10gb of free space. However, like I said, it doesn't work on iphone5s with 40mb free memory.
Here's a log:
begin load()
settings.txt does not exist, created new one..
[ERROR] Error: Error #0
     at Autumn/save()
     at Autumn/load()
     at Autumn()
It's clear that AIR can't open or write to 'settings.txt' file. What can I do to solve that issue (other than making more free space on iphone)? Is there any workaround for that?

Any help please?

Similar Messages

  • Error message while burning DVD with Premiere Elements 13 with Mac Book Pro i7/7200t/mn with 60GO free space available on gard drive. message: "erreur logicielle interne: DVA/premiere/elements/pre12/pre-mediacoreCS7". can someone help burn my DVD (the fil

    Error message while burning DVD with Premiere Elements 13 with Mac Book Pro i7/7200t/mn with 60GO free space available on gard drive. message: "erreur logicielle interne: DVA/premiere/elements/pre12/pre-mediacoreCS7". can someone help burn my DVD (the file goes very well with chapters and scenes before burning). thanks very much, response appreciated, Alain

  • Solved my Illustrator CS4 (Can not save file) issue (same as with Illustrator CS3)

    Using Illustrator CS4, if the OS default printer is turned off, Illustrator will crash when saving the file to a name/format other than what it was opened as. I tested this and it's true, the bug exists in Illustrator CS4 (and was referenced in a ticket in this knowledge base on the CS3 product).
    You'd think ADOBE would figure out how to DOCUMENT this feature!!
    Set your default printer to ADOBE.PDF and all will be fine!

    You do have to have a default printer how you were able to run Illustrator is a mystery unless they change this behavior in CS 3 which I was not aware of but perhaps it is something I forgot.
    But I for one am glad you discovered the cause and cure and that you posted it, I don't have the problem but thank you.

  • Ready-only issue. Can't save files or highlight with Reader 11.7.1 & Kitkat 4.4.2 Samsung Tab 3

    Hello,
    I got several updates last weekend. Since then I can't save my pdf files properly. Before everything was fine.
    When I want to open a pdf now -  a prompt pops-up, saying this:
    Read-only document
    To modify this document save a copy on your device. The document will be available to other applications on this device.
    I found another thread which describes the same error - but I already have 11.7.1 with 4.4.2 and it does not work.
    Can't save files or highlight them on Reader 11.7.0 in Kitkat 4.4.2 Acer A1 Tablet

    Are these files stored on your external SD card or your internal storage? Android KitKat has added restrictions for third party apps from modifying content on the external SD Card. You can find some more information here: KitKat and SD cards — what's fixed, what's broken and what's misunderstood | Android Central
    Could you please confirm if the issue exists for files on the SD card only?
    Thanks,
    Adobe Reader Team

  • Can't save file with futura font?

    Hi
    I'm having a problem saving a file that contains the futura font. This is a font my company had to buy. I never had a problem with CS1 or CS2 using this font.
    Once I place the font in the document it will let me save it once. After making changes and trying to save again I get a window that simply says "can't save file". I've tried unchecking the pdf compatible option and the compression option with no change.
    I found one thread on this site about clearing out the font cache (by deleting the file C:\windows\system32\FNTCACHE.dat) and that didn't make a difference.
    When I'm done with the document I'll be converting the text to outlines but I need a fix will I'm working on the doc.
    Thoughts?

    Mike,
    Glad you got it sorted out. After I sent you back the regenerated fonts, I discovered something which I'm posting here for everyone's benefit.
    Myle nailed it when he suggested an "an issue with font embedding." The fonts you sent me were all embedding-restricted. It's possible you could have saved your documents had you turned off the PDF compatibility option, but it's moot now.
    It's doubtful the fonts I regenerated for you will solve the problem because putting them through my font editor did not remove the embedding restriction. I would bet dollars to doughnuts that your replacement fonts do not have embedding restriction.
    To check for the embedding restriction, you don't need a fancy program. Just download this Windows extension from Microsoft and install it. Then, right-click | Properties on any font file will give you a lot more information about that font, including licensing/embedding restrictions.

  • I can not update or restore any ios device with my iTunes in my macbook but I can with my pc, why?

    I can not update or restore any ios device with my iTunes in my macbook but I can with my pc, why?

  • My iphone 4 bluetooth does not discover any other devices or phones having bluetooth and ofcourse does not pair with other bluetooth devices or phones? How can i transfer files to other devices through bluetooth? Thanx

    My iphone 4 bluetooth does not discover any other devices or phones having bluetooth and ofcourse does not pair with other bluetooth devices or phones? How can i transfer files to other devices through bluetooth? Thanx

    you can't tranfer files with the built in program that apple gives you, you may (i belevie) download an app that allows you

  • HT204053 Can you sync pages files on different devices with different apple ids?

    Can you sync pages files on different devices with different apple ids?  I have a personal iPad and one given to me for work. They are set up with two different apple IDs.  I do all of my lesson plans in pages.  I want to be able to create plans on both devices, but need to know if there is a way to sync the files without emailing, etc.

    Welcome to the Apple Community.
    No, that's not possible. A better way of working around this than emailing the documents to yourself is to use a third party storage solution such as Dropbox and a webDAV server to upload the documents.

  • Hi. I am from Greece and I have an I phone 4 and I want to unlock the Bluetooth, because I can't share files or anything else with another I phone or  I Mac or another device. Can you help me please? Thanks.

    Hi. I am from Greece and I have an I phone 4 and I want to unlock the Bluetooth, because I can’t share files or anything else with another I phone or  I Mac or another device. Can you help me please? Thanks.

    Answered here:
    https://discussions.apple.com/message/19977803#19977803
    Re-posting the same question over and over won't change the answer.

  • Can I sync my 2 new devices with iOS 5.1 with my iTune PC 10.7v previously synronize with iOS 6.0 device. From joe thanks

    Can I sync my 2 new devices with iOS 5.1 on it with my iTune PC 10.7v previously synchronize with my old devices with iOS 6.0 on it. I don't want to update my iOS 5.1. Thanks from Joe

    You can sync as many devices as you like

  • Is it possible to use different iOS devices with the same account of the gamecenter?

    Is it possible to use different iOS devices with the same account of the gamecenter? in that case, can two people play a game with the same account and add both scores to the same leaderboard nickname?

    You should be able to use the same account. The top scores will get updated on the leader board.
    Taz

  • Illustrator cc 2014 can't save files

    Hi!
    I Have a lot of problems with the Illustrator CC 2014. And it freaks me out. I have no idea how to reach Adobe. I've tried another Adobe forum but haven't heard anything.. I would appreciate some sort of help. Or if someone knows where to post the question?
    1) First of all can't save files… I wish this could be the number one feature in a design app but apparently not..
    I got   "unknown error " and all work spent is gone forever. This happens a lot.
    2) also lagging problems. when moving graphics and zooming in illustrator. it is SO stressful.
    I have Two computers, with the same problems.
    Imac 27 " mid 2011
    Processor 3,4 ghz intel core i7
    16 GB 1333 Mhz DDR3
    AMD Redeon HD 6970M 1024 MB
    Osx X lion 10.7.5
    Imac 27" Retina 5k late 2014
    3,5 ghz intel core i5
    32 GB 1600 mhz DDr3
    AMD Radeon R9
    OsX Yosemite 10.10.1

    Nils Petter,
    If no brighter suggestion comes up, you may try the list, see below.
    Did you install fully on both computers (after upgrading the OS if relevant)?
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible), for CS3 - CC you may find the folder here:
    https://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall (ticking the box to delete the preferences), run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • CS6 can not save files over 2GB???????

    I need to make a giant poster at 6ft wide x 5 ft tall. I created a blank document in CS6 at 200ppi. I created some text, and imported a couple of 25MB images. I am unable to save the file as a .PSD because it indicates that PS can not save files over 2GB.
    1. How did this file grow to become over 2GB?
    2. Why can PS not save a .PSD over 2GB?
    3. What do you do if you need to create a large format print such as this?
    Thanks in advance.

    Very true.
    However, Jeff knows exactly what he's doing and he's very, very good at it.  If your image were fortunate enough to end up being printed by Jeff Schewe, he'd be able to tell you exactly what kind of an image file he wants from you. 
    Always check with the printer.

  • Texting a Non-iOS device with Messenger

    If I want to use messenger to send a text and the recipient does not have an Apple device - can it be done with Messenger?

    Hi,
    The Apple App is called Messages on both iOS and Mac OS X devices.
    The iOS version on iPhone can send SMS to non iOS devices.
    At present (although rumoured to be coming) the Mac version cannot SMS to iPhone or non iOS devices.
    However IF you have an AIM Login (AND some Apple issued IDs are valid AIM logins) and the person is using  US phone on one of these carriers then the app will send SMS using the AIM service as  sort of "translator" from IM (Instant Messages) to SMS
    Basically you add a +1 (Country Code) to the Number and Add that to your AIM Buddy like it was  Buddy.
    Messenger tends to refer to MSN messenger or possibly Yahoo IM app that is called Yahoo Instant Messenger.
    7:42 pm      Sunday; September 14, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Can I save files from my pc onto iCloud and access them from my iPhone?

    Hi, I'm new to iCloud. Just set it up on my iPhone and PC. Can I save files on my pc onto iCloud so I can access them from both my iPhone and PC?

    StoneMountainGirl,
    No. You can only music to your iPhone from one computer at a time.  If you try to load music onto it from a 2nd computer, it will erase the current content on the iPhone and replace it with whats in the iTunes library you are connected to,
    B-rock

Maybe you are looking for

  • Problem running Office 2004 applications

    When I try to run any office 2004 for mac application I get the error: Microsoft Word: launch failed with error code -2855 (cfragStdFolderErr) for application /Applications/Microsoft Office 2004/Microsoft Word\n It only happens with office 2004. All

  • Is fully locked i cant restart or shut down.

    .is fully locked i cant restart or shut down. After I connected my iPhone 4s itunes you a message appeared asking if I want to upgrade to iOS 8. I say yes and then downloading it another message appeared saying that an error occurred and then iPhone

  • After ITunes opens an error pops up

    I downloaded the newest version of ITunes 7.0.1 and now right after it opens a window pops up saying that itunes encountered a problem and needs to close. Then when i hit dont send or send error report itunes shuts down

  • Purchase a/c system in B1

    Hi all, I would like to know ,if  using purchase accounting system,what are impacts on system & functionality. can any one guide me. regards, manisha

  • I want high quality SD for DVD

    alright, i've got a 1.1 gig video about 5 minutes long that is in the .mov format (raw out of fcp). I'll let you know what I have already done and if you could, please let me know where I could improve. I took the .mov video and put it in compressor.