0

I'm trying to use cocoapods to install crypto swift and am having trouble with what to place in the pod file.

I have tried:

pod 'CryptoSwift', :git => "https://github.com/krzyzanowskim/CryptoSwift/tree/swift2", :branch => 'master'

And I get the error:

fatal: repository 'https://github.com/krzyzanowskim/CryptoSwift/tree/swift2/' not found

I'm not sure how to target the particular version needed. In the git instructions it states for Swift 2.2, 2.3: branch swift2 version <= 0.5.2. I can't seem how to target 0.5.2 syntactically, I also tried:

pod 'CryptoSwift', '<=0.5.2' :git => "https://github.com/krzyzanowskim/CryptoSwift", :branch => 'swift2'

and I got errors about unexpected commas.

jww
  • 97,681
  • 90
  • 411
  • 885
user2363025
  • 6,365
  • 19
  • 48
  • 89
  • The repository is `https://github.com/krzyzanowskim/CryptoSwift`. `tree/swift2` helps you browse github but is not part of the address of the git repository. – Benoit Dec 21 '16 at 10:13
  • @Benoit Ok, but how to target the version for swift 2.3? i.e. <= 0.5.2? – user2363025 Dec 21 '16 at 10:15
  • 2
    Have you tried `pod 'CryptoSwift', '0.5.2'` ? – Luca D'Alberti Dec 21 '16 at 10:17
  • @LucaD'Alberti I have tried the following: pod 'CryptoSwift', '0.5.2' :git => "https://github.com/krzyzanowskim/CryptoSwift", :branch => 'master', this gives me an error pointing to the unexpected : before branch – user2363025 Dec 21 '16 at 10:19
  • Try without the branch option. The version 0.5.2 is made for Swift 2.3. Just point to that one. Doesn't make sense to point a tag and a branch at the same time – Luca D'Alberti Dec 21 '16 at 10:20
  • @LucaD'Alberti Ok I updated and removed the branch part: pod 'CryptoSwift', '0.5.2' :git => "https://github.com/krzyzanowskim/CryptoSwift" now I get an error pointing to the unexpected : before git – user2363025 Dec 21 '16 at 10:22
  • Remove git. I said the exact line you should use. – Luca D'Alberti Dec 21 '16 at 10:24
  • @LucaD'Alberti Ok, thank you sorted, I didn't realise I didn't need to specify the source – user2363025 Dec 21 '16 at 10:26
  • I did say this below about 5 mins ago... – Jacob King Dec 21 '16 at 10:27
  • @JacobKing I said it 5 minutes before you did. Is there any problem? I don't care, you can have the accepted answer – Luca D'Alberti Dec 21 '16 at 10:32
  • @LucaD'Alberti Oops I didn't see that, I apologise. Odd that the OP beat around the bush so much even though the answer was given so quickly... – Jacob King Dec 21 '16 at 10:34

1 Answers1

0

The podfile string I am using for my CryptoSwift project (Swift 2.3) is the following:

pod 'CryptoSwift', '0.5.2'

This is working for me.

Jacob King
  • 6,025
  • 4
  • 27
  • 45