Last active
December 19, 2015 10:08
-
-
Save jchris/5937753 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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