Packaging Hype as Web App that writes to file

Not sure if this is the best place for this, if not I apologize.

I saw various posts about importing Hype project in Xcode and PhoneGap, and this is great. Thanks. I can't wait to try it out.

Now, I know that in a web server, saving text files is a security risk. But if I use Javascript to read/write files in the Hype Animation, will that carry over to Xcode? Or do I have rewrite everything to use SQLite?

I'm happy to help figure out the best solution; do you mind giving a little more context on your application and the purpose and type of the files that you are writing? It is also a little unclear if you want the files to be stored on a server, or local only for a user. Are the files temporary state files or important for a user to have access to and preserve?

Right now I am looking at a solution that will work for me. I am a decent PHP and JavaScript developer, but am looking at mobile apps. I created a proof of concept app (https://CJBPMP.com/3circles) , but I cannot package it up in PhoneGap or anything since it is PHP based and requires MySQL.

This may be a bit much for Hype to do, BUT I do have some other ideas, but it requires writing data to the local device. In many cases this could be a simple JSON file to remember some Sprite locations when reopening the app. I know I should also be able to replicate some basic database functionality with his approach, BUT it would be a bit awkward.

I assume to access SQLite, I think I would need to use SWIFT or Objective C to access the database, but then would I be allowed to create a hybrid app like that (some JavaScript, some C or SWIFT)? I don’t want to waste my time chasing down a lot of different solutions. I LOVE HYPE. I would like to leverage that.

Gotchya - you're basically looking to make an app that currently stores state on a server operate as a standalone app with a goal to store that state on a local device.

While your approach of calling into natvie (objc/swift) land and writing out would work, my recommendation would be to first look into simply using localStorage, which can all be done via clientside javascript. Other persistent stores would be based on WebSQL or IndexedDB that can get you more of a database experience, but localStorage sounds like it may be sufficient. There's plenty of threads here that discuss its usage (which isn't even tied to specifically being used in a native app!).

Apple even provides APIs to get at this data from the WKWebView.