0

I have trying to install DJI iOS SDK 4.5 using cocoapods in sample code downloaded from DJI website.

Every-time I try pod install it throws error saying

CocoaPods could not find compatible versions for pod "DJI-SDK-iOS":
In Podfile:
DJI-SDK-iOS (~> 4.5)
None of your spec sources contain a spec satisfying the dependency: `DJI-SDK-iOS (~> 4.5)`

I even tried uninstalling cocoapods and reinstalling it again, but no luck.

Pavan
  • 443
  • 5
  • 21

2 Answers2

0

Error appeared because your source repository is out of date. You can resolve the issue by running:

pod install --repo-update


If this does not solve your problem, check if your cocoa-pods version is updated one. You can follow the below link for the same.

update cocoapods version


Explanation:

When you will run pod install, you will found the possible reason of this error as:

None of your spec sources contain a spec satisfying the dependency: DJI-SDK-iOS (~> 4.5).

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.

Community
  • 1
  • 1
Ankit Jayaswal
  • 5,549
  • 3
  • 16
  • 36
  • I went through the same flow but I was not able to do the Pod update as it kept on throwing me Updating spec repo master [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down Now I am able to download after I followed steps in my answer. – Pavan Apr 16 '18 at 05:56
  • That's because your pod version was out of date too. I think you have updated that by updating ruby environment of homebrew of your mac. – Ankit Jayaswal Apr 16 '18 at 05:59
0

I tried pod install --repo-update it was not able to update as it kept on throwing error

Updating spec repo master [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

Finally I found the solution my prob in: https://stackoverflow.com/a/48962041/32140

After this I was able to install the new pod version

Pavan
  • 443
  • 5
  • 21