I am trying to add the following dependency to my Podspec
s.dependency 'Apollo/WebSocket', :git => 'https://github.com/apollographql/apollo-ios'
Here's what I get in my Terminal whenever I try to run pod lib lint MyPodName.podspec
:
- ERROR | spec: The specification defined in `MyPodName.podspec` could not be loaded.
[!] Invalid `MyPodName.podspec` file: [!] Unsupported version requirements.
# from <PathToMyPodspec>/MyPodName.podspec:36
# -------------------------------------------
#
> s.dependency 'Apollo/WebSocket', :git => 'https://github.com/apollographql/apollo-ios'
#
# -------------------------------------------
I have successfully used it as a Pod in one of my iOS projects. But now that I am creating a pod myself, I am struggling to understand what I should do to make it work.
Thank you in advance!
cocoapods-repo-update is a CocoaPods plugin that checks your dependencies when you run pod install and updates the local specs repositories if needed.
You can add dependencies on subspecs. Specify the minimum deployment target version for the Pod library. Re-import the project.
You can manually create a Podfile with a text editor or execute the pod init command at the root of your Xcode project. This command creates a Podfile at the root of your Xcode project. Open the file in your favorite text editor.
It looks like it is not allowed to define dependency in PodSpec like this. Please refer CocoaPod guideline document on Dependency
It seems it should contain only version information like mentioned below. Other formats are not allowed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With