Search code examples
xcodegitcocoapodsipaappium-ios

CocoaPods could not find compatible versions for pod "MatrixSDK"


I'm trying to build application from xcode.
I cloned the project from git repo.
I opened .xcodeproj file and from Product > Build I tried to build but build is failed.
From terminal I executed below commands and receiving compatible version error

I searched for solution and tried few ways like:

sudo gem intall cocoapods
sudo gem intall cocoapods --pre
pod setup
pod deintegrate
pod install
pod update
pod install --repo-update

Below is terminal output:

Analyzing dependencies
Pre-downloading: `BarcodeScanner` from `https://github.com/htothee/BarcodeScanner.git`
Pre-downloading: `MatrixKit` from `https://github.com/N-Pex/matrix-ios-kit.git`, branch `fix_apns_push`
Pre-downloading: `MatrixSDK` from `https://github.com/matrix-org/matrix-ios-sdk.git`, branch `develop`
Pre-downloading: `QRCode` from `https://github.com/brackendev/QRCode.git`
[!] CocoaPods could not find compatible versions for pod "MatrixSDK":
  In Podfile:
    MatrixKit (from `https://github.com/N-Pex/matrix-ios-kit.git`, branch `fix_apns_push`) was resolved to 0.10.1, which depends on
      MatrixSDK (= 0.13.0)

    MatrixSDK (from `https://github.com/matrix-org/matrix-ios-sdk.git`, branch `develop`)

Below is Podfile

platform :ios, '9.3'
use_frameworks!

def shared_pods
    pod 'ProjectCore', :path => '../'
    pod 'MatrixKit', :git => 'https://github.com/N-Pex/matrix-ios-kit.git', :branch => 'fix_apns_push'
    pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
end

target 'Project_Example' do
  shared_pods

  pod 'BarcodeScanner', :git => 'https://github.com/htothee/BarcodeScanner.git'
  pod 'QRCode', :git => 'https://github.com/brackendev/QRCode.git'

  pod 'Project', :path => '../'

  target 'Project_Tests' do
    inherit! :search_paths
  end
end

target 'ShareExtension' do
  shared_pods

  pod 'ProjectExtension', :path => '../'
end

Expected:
.ipa file need to be created

Please let me know how can I solve it.


Solution

  • Your problem is explained in the error:

    [!] CocoaPods could not find compatible versions for pod "MatrixSDK": In Podfile: MatrixKit (from https://github.com/N-Pex/matrix-ios-kit.git, branch fix_apns_push) was resolved to 0.10.1, which depends on MatrixSDK (= 0.13.0)

    The branch fix_apns_push of MatrixKit needs a fixed version of MatrixSDK, as you can see in its Podspec file

    pod 'MatrixSDK', '0.13.0'
    

    So, In order for your project to work, you need this version.

    Try this:

    def shared_pods
        pod 'ProjectCore', :path => '../'
        pod 'MatrixKit', :git => 'https://github.com/N-Pex/matrix-ios-kit.git', :branch => 'fix_apns_push'
        pod 'MatrixSDK', '0.13.0'
    end