> On Aug 17, 2014, at 3:34 PM, [email protected] wrote: > > The way to go maybe to get a native extension that would do pretty much what > the plug in does.
I don't know if you have experience writing native Air extensions, but if you know how to do it, the amount of code needed to start up Couchbase Lite is pretty minimal. Here's the code for PhoneGap <https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin/blob/master/src/ios/CBLite.m>. The important part is just two lines: CBLManager* dbmgr = [CBLManager sharedInstance]; CBLRegisterJSViewCompiler(); After that you just need to get the base internal URL of Couchbase Lite and convey it to your JS ActionScript code. self.liteURL = dbmgr.internalURL; Your app then uses that URL as the base of the REST API, which is 99% compatible with CouchDB's API. (Actually I just realized that Air may be using its own HTTP client implementation instead of using NSURLConnection. If it does, things are a little bit trickier; instead of using the normal 'fake' HTTP interface, you'll have to have CBL open a real socket, bind it to the loopback interface only, and talk to that. If it comes to that, I can give you more details.) —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/E8D4CB59-4047-417C-8E4E-CB8F31AC094B%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
