Unable to find a specification for CouchbaseLite-Enterprise (~> 2.0.0)

#1

Hello,

I am trying to integrate Couchbase lite swift through POD installation in my iOS Xcode 10.1 project.

POD file:

pod ‘CouchbaseLiteSwift’, :git => ‘https://github.com/couchbase/couchbase-lite-ios.git’, :tag => ‘2.0DB021’, :submodules => true

I have used the below command as mentioned in the documentation,

$ pod --verbose install

pod install error says: Unable to find a specification for CouchbaseLite-Enterprise (~> 2.0.0)

Running prepare command
$ /bin/bash -c set -e sh Scripts/prepare_cocoapods.sh “CBL Swift”
Preparing CouchbaseLite framework …
** BUILD FAILED **

** BUILD FAILED **

** BUILD FAILED **

[!] Failed to download ‘CouchbaseLiteSwift’.

I didn’t get any solution for this. Can someone can help me?

#2

You are trying to access an obsolete Developer Preview version of 2.0.0 release . 2.0.0 went GA over a year ago .
Please follow instructions in our docs to download the latest version. Not sure where you got the above instructions from.

    target 'Example' do
      use_frameworks!
      pod 'CouchbaseLite-Swift-Enterprise', '~> 2.1.6'
    end
#3

Thank you. I tried that first,

pod ‘CouchbaseLite-Swift-Enterprise’, ‘~> 2.1.6’

$ pod install

Analyzing dependencies

[!] Unable to find a specification for CouchbaseLite-Swift-Enterprise (~> 2.1.6)

This is NOT working.

Then, when i was going through the below forum i got some steps, which i had doubt whether correct or not.

This is NOT working as well.

#4

I just tested and it is working

~/projects/temp/temp | => cat Podfile

target 'temp' do

use_frameworks!

pod 'CouchbaseLite-Swift-Enterprise', '~> 2.1.6'

end

~/projects/temp/temp | => pod install

Analyzing dependencies

Downloading dependencies

Using CouchbaseLite-Swift-Enterprise (2.1.6)

Generating Pods project

Integrating client project

Sending stats

Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

#5

Oh ok, I am not sure i tried multiple times, it says Unable to find a specification for CouchbaseLite-Swift-Enterprise (~> 2.1.6)
Is there any other way?

#6

hmmm… try updating your pod repo and pull again

pod repo update master

Is there any other way?

You can always download the binary from our downloads page

#7

I tried integrating couchbase lite enterprise iOS Swift framework, but i couldn’t success with that. Downloaded from https://www.couchbase.com/downloads

Following are the steps that I am following and error.

Xcode 10.1:

1. Added Build Phases -> Link Binary with libraries -> CouchbaseLiteSwift.framework

2. Added CouchbaseLiteSwift.framework in framework path of the Xcode project

3. Added #import <CouchbaseLite/CouchbaseLite.h> in …Bridging-Header.h

Compile Error :

Apple Mach-O Linker Error: Linker command failed with exit code 1

clang: error: linker command failed with exit code 1 (use -v to see invocation)

then, trying to use pod installation.

pod repo update master
and then,
pod install

doesn’t work either.

#8

The steps you are following for linking the framework manually are incorrect. You don’t need a bridging header if you are linking a swift framework with a swift project. Please follow instructions in docs (look under “Frameworks” tab)

#9

Yes sure, thank you. As you mentioned, i already followed that for framework integration manually. Sorry that i didn’t mention properly earlier.

The error i face is,
Module compiled with Swift 5.0 cannot be imported by the Swift 4.2.1 compiler: CouchbaseLiteSwift.framework/Modules/CouchbaseLiteSwift.swiftmodule/x86_64.swiftmodule

then, i found that i need to have Xcode 10.2 for this. But, we are not allowed to work on 10.2 for now, we can work on 10.1.

#10

Well, you certainly missed that key error message in your previous posts. And I got that you did manual- my point was you had not followed the instructions correctly.

Yes, as indicated in the error, you would need swift 5. If you need something compatible with earlier versions of swift, then you can pull down one of the previous releases (2.1.3 should be swift 4 compatible)

target 'temp' do
  use_frameworks!
  pod 'CouchbaseLite-Swift-Enterprise', '2.1.3'
end
#11

Downloading 2.1.3 couchbase lite framework and integrated manually in Xcode worked fine.