A newer version of this documentation is available.

View Latest

Installation - Couchbase Lite on Objective-C

    March 23, 2025
    + 12

    Description — Installing Couchbase Lite on Objective-C

    Get Started

    Create or open an existing Xcode project and install Couchbase Lite using one of the Install Methods methods shown.

    Xcode 12.3 Work Around

    If you have downloaded a .framework package to install, you may be impacted by an existing issue in Xcode 12.3. The issue prevents use of certain frameworks, displaying the error: Building for iOS Simulator, but the linked framework was built for iOS — see: Apple Developer Forum.

    The recommended solution is to use an .xcframework package, where possible. Alternatively, as an interim solution, you can do the following workaround in your Xcode project:

    1. Navigate to the target’s Build Settings

    2. Locate the Validate Workspace setting

      xcode 12x3 fix
    3. Set Validate Workspace to Yes, then return it to No

    Install Methods

    • Download Couchbase Lite.

    • Drag CouchbaseLite.framework from your Finder to the Xcode navigator.

    • Click on Project > General > Embedded Binary and add CouchbaseLite.framework to this section.

    • Import the framework and start using it in your project.

      objc
      #include <CouchbaseLite/CouchbaseLite.h> ...