Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a fork repository to "s.dependency" attribute in .podspec file of a CocoaPod?

I have been working on a AFNetworking forked repository and wants to add to my private pod. I am doing something like this.

s.dependency 'AFNetworking', '~> 2.3' , :git => 'https://github.com/Codigami/AFNetworking.git', :commit => '9f9f4fe5b5959e0f2ea89e472eccf7aea6f37eea'

While doing

pod install 

in terminal I am getting

[!] Invalid `ios-authentication-pod.podspec` file: [!] Unsupported version requirements. Updating CocoaPods might fix the issue.

on the other hand I tried to add this in a new project podfile using this.

pod 'AFNetworking', :git => 'https://github.com/Codigami/AFNetworking.git', :commit => '9f9f4fe5b5959e0f2ea89e472eccf7aea6f37eea'

This works. I didn't able to understand what the issue in above case?

like image 553
kidsid49 Avatar asked Sep 09 '14 07:09

kidsid49


1 Answers

http://guides.cocoapods.org/syntax/podspec.html#dependency there is no :git and :commit options in podspec dependency specifier. You might be able to create your own private spec repo and put AFNetworking podspec there pointing with s.source to specific location.

like image 133
Andrei Shender Avatar answered Sep 23 '22 08:09

Andrei Shender