Greetings,

I'm trying to solve the same issue from this thread 
- 
https://groups.google.com/forum/#!searchin/mobile-couchbase/cors/mobile-couchbase/a80GfiBwkuI/Io-nzwOylE4J
 
- only for iOS and having trouble building CouchbaseLiteListener.Framework 
for Couchbase-Lite-PhoneGap-Plugin.

I've successfully cloned couchbase-lite-ios and added the following changes 
(stab in the dark on whether or not these will actually fix the CORS issue):

/* Allow OPTIONS method */
if ([method isEqualToString: @"OPTIONS"])
    return kCBLStatusOK;

/* Add response headers */
[_response.headers setValue:@"*" forKey:@"Access-Control-Allow-Origin"];
[_response.headers setValue:@"GET, PUT, POST, DELETE" 
forKey:@"Access-Control-Allow-Methods"];
[_response.headers setValue:@"content-type, accept" 
forKey:@"Access-Control-Allow-Headers"];

The "CBL Listener iOS" target archives successfully, but when I drop the 
CouchbaseLiteListener.framework into Couchbase-Lite-PhoneGap-Plugin, then 
when I try to add the plugin it complains that it can't 
find CouchbaseLiteListener.a.

I can see the CouchbaseLiteListener file (without the ".a").  If I just 
rename it and add the .a, I can add the plugin to the cordova project, but 
then when I build, I get things like:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CBLQueryOptions", referenced from:
      objc-class-ref in 
CouchbaseLiteListener.a(libCouchbaseLiteListener.a-i386-master.o)
  "_OBJC_CLASS_$_CBL_GCDAsyncSocket", referenced from:
      objc-class-ref in 
CouchbaseLiteListener.a(libCouchbaseLiteListener.a-i386-master.o)

Any tips on what I might be doing wrong?

  Nick

-- 
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/e7f79e89-e94a-4206-9901-913fd1a995cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to