Skip to content

Instantly share code, notes, and snippets.

@jchris
Last active December 19, 2015 10:08
Show Gist options
  • Save jchris/5937753 to your computer and use it in GitHub Desktop.
Save jchris/5937753 to your computer and use it in GitHub Desktop.
#import "LiteGap.h"
#import "CouchbaseLite.h"
#import "CBLListener.h"
#import "CBLJSViewCompiler.h"
#import <Cordova/CDV.h>
@implementation LiteGap
@synthesize command;
- (id) initWithWebView:(UIWebView*)theWebView
{
self = [super initWithWebView:theWebView];
if (self) {
// todo check domain whitelist to give devs a helpful error message
[self launchCouchbaseLite];
}
return self;
}
- (void)launchCouchbaseLite
{
NSLog(@"Opening database...");
CBLManager* dbmgr = [CBLManager sharedInstance];
[CBLView setCompiler: [[CBLJSViewCompiler alloc] init]];
NSURL* url = dbmgr.internalURL;
NSLog(@"Couchbase Lite url = %@", url);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment