does anyone know how to create a javascript interface in iOS that can be called from javascript? My aim is to save data from a website in a native fashion and not using html5 local storage.
-
What do you mean "javascript interface in iOS that can be called by javascript?" Take a look at this:http://stackoverflow.com/questions/4675476/can-i-write-ios-cocoa-apps-in-javascript – self Jun 04 '12 at 07:44
-
Do you mean you have a web view inside your app and want to save data from a website called within that view? – Michael Jun 04 '12 at 07:50
-
any progress so far? I'm interested in an optimal solution too, I might need to do it in future... – Dmitry Pashkevich Jun 10 '12 at 23:01
1 Answers
If I understand correctly, what you need is a mobile webapp packaging solution.
The most popular here is, perhaps, PhoneGap, it supports many platforms including iOS. The product is free and open source. You will still need to use Apple's iOS platform SDK and have a developer account. As for storage mechanism, I believe PhoneGap has a solution for it (allowing the storage to be persistent, not cleared out like browsers' localStorage).
If you want to simplify your deployment process, you may want to check out appMobi, they build on top of PhoneGap, providing their own development kit and cloud deployment services.
Also refer to this thread that discusses different kits: Comparison between Corona, Phonegap, Titanium
UPD. Have you tried the PhoneGap SQLite plugin for storage?

- 1
- 1

- 13,431
- 9
- 55
- 73
-
thanks Dmitry, i'm familiar with Phonegap and what I'm looking for is very similar to Phonegap plug-in. I want to store one value from a website and then save it locally in the SQLite DB. I want to create the function that stores the value in obj-c, than wrap it with some sort of an interface and call it from the website. – danisoft_2 Jun 04 '12 at 08:41