Location where saveLocalData is stored.

Does anybody know the exact path / name that’s used when the saveLocalData(“filename”,“key”) function is used.

I’m assuming it’s stored in the app documents folder in a file called filename

The reason I’m asking is that I released an app to the app store that was built in Codea, however I now have an update that I want to release which for many reasons (which I don’t really want to get in to here) is NOT written in Codea, but if at all possible I’d still like to be able to access the data that was saved in the first version.

Is this possible?
Does anyone know if it’ll cause massive issues effectively installing a new app over the top of a Codea app.

Thanks in advance.

@TechDojo I’ve been looking for a path also. So far I haven’t found one.

@TechDojo while you may not want to get into on this thread, I and I’m sure lots of others would be curious to hear the journey that your app’s been on. Can’t help with the path I’m afraid.

Thanks guys, I’m guessing @Simeon is probably the best person to answer this.

As for the other stuff - basically the first version of my app was done in Codea - I initially prototyped the idea in Codea and because progress was so fast and I was easily able to share the project (via iExplore) with my partner in Canada and all was going sweet.

However I did run into a few niggling problems that made me rethink my dev strategy, firstly Codea IS an AMAZING app and for prototyping ON the iPad there’s nothing better and being able to add in plugin’s was a god send (Google Analytics just dropped in) and the fact that I can output an app store build direct from the app is just the icing on the cake.

That said I needed to add in IAP support (which I started as a plugin but was giving me grief), I wanted to not have to stress over compiling / obfuscating the source - again I know others have already solved this but…, upgrading to iOS 8.3 was a mistake (on my part) which meant I could no longer easily export projects to share code with my partner (who’s not the most technical of people) AND…

Given that we’d actually seen a glimmer of promise with the first version of the app we felt that to really capitalise on the project we HAD to go cross platform and this (through no fault of it’s own) is where Codea gave me the biggest hurdle.

So for this project (after a lot of thought) I opted to use a cross platform alternative instead - which just left the headache of moving from a direct mode to retained mode graphics system and porting over the source code, but but using a Lua based one that process is a LOT easier.

I don’t want to name the other product - not because I’m ashamed or wish to start any kind of flame war, but I don’t want to be seen to advertise a potential competitor as I don’t think it’s appropriate, nor do I wish to be seen as a deserter or a Codea detractor.

I will say however that no system is 100% perfect - each has it’s own quirks and understanding all of the pro’s and con’s allow’s an individual (or team) to make the best decision as to which tool to use and is most appropriate for a given job.

Lessons learnt…

  1. Codea IS an AMAZING app that has 100% of my support.
  2. Codea still is my first choice for prototyping (and dev when I don’t want, or I’m not able to drag my MacBook around).
  3. Writing code in a modular fashion and using classes properly makes the inevitable porting process a lot easier
  4. It’s probably worth my time creating my own retained mode / flash like display hierarchy just to make 3. even simpler.
  5. This community is still a large part of what makes Codea so awesome and I fully intend to remain an active part of it!
  6. If you’re an indie and you feel your project actually has some commercial value then not embracing other platforms is a big mistake

All of the above is just my $0.02

I don’t know where Codea saves this data either, but I had the same question.
My guess: plist files! - because if it was saved in actual files, then we would have had the saveText api much earlier.

Thanks @se24vad, that’s got me thinking, I might be able to track it down using the exported project and checking the simulator app sandbox, or alternately is’t a previous version of the runner been open sourced?

after running http.reqeuest and without downloading file?while i discennect wifi?it still works?why so?is there history url in codea?what is the app sandbox?

As an update to this - I found the directory :slight_smile:

After a quick google search I found this link.

http://pinkstone.co.uk/where-is-the-documents-directory-for-the-ios-8-simulator/

And in it this snippet of code

#if TARGET_IPHONE_SIMULATOR
// where are you?
NSLog(@"Documents Directory: %@", [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);
#endif

Which if you add to the end of your applicationDidFinishLaunchingWithOptions function - will print out to the log the location (buried deep within ~/Library/CoreSimulator/Devices

Ultimately you’ll find that the data is indeed stored within your app’s Library/Preferences folder as a .plist file stored in a reverse url style name that matches your app’s unique reference.

The plist file contains a single key for your App’s name with a dictionary of key / value pairs for each key that you create when using saveLocataData

@TechDojo Thank you for finally resolving this myth! Very good to know about such details.