Details
Description
CBL iOS cannot be used in the app extensions.
Warning:
Linking against a dylib which is not safe for use in application extensions: /Users/wayne/Library/Developer/Xcode/DerivedData/.../Debug-iphonesimulator/CouchbaseLiteSwift.framework/CouchbaseLiteSwift
Currently, we are setting APPLICATION_EXTENSION_API_ONLY to NO. One of the reasons that we are setting it to NO is that we are using the sharedApplication object to detect whether the app is in the background or not for the replicator's backgrounding feature.
It might be possible that we could remove this restriction by accessing sharedApplication dynamically and limit the backgrounding feature for app extension (not sure how to do it yet).
Strangely the CBL Swift can be built with APPLICATION_EXTENSION_API_ONLY = YES. We will need to do more test if the actual library can be used or not. Also, this seems to be working in 2017 (https://blog.couchbase.com/couchbase-lite-with-ios-app-extensions/)