I am trying to install Crypto swift library for AES encryption manually based on their instructions. but I get two compile error. First one is : Unexpected platform condition (expected 'os', 'arch', or 'swift') and the second one is: No such module 'Glibc' I do not want to install it with cocoa pods. The library link is: https://github.com/krzyzanowskim/CryptoSwift
Asked
Active
Viewed 1,183 times
1
-
I sounds like you have chosen the wrong library. Are you sure the one you've chosen is compatible with iOS? Can you post a link to the lib? – Chris May 02 '18 at 18:28
-
I added the link of library: https://github.com/krzyzanowskim/CryptoSwift – Amirhossein Hashemi May 02 '18 at 18:31
-
@Chris Yes it is a famous library. I can do it with Cocoapods and it works, but i need to do it manually. – Amirhossein Hashemi May 02 '18 at 18:32
1 Answers
2
The problem occurred because I had Swift 4 but by this command,(git submodule add https://github.com/krzyzanowskim/CryptoSwift.git) the latest code (swift 4.1) added to my project. The solution is adding the branch which is for Swift4.
Swift versions support
Swift 1.2: branch swift12 version <= 0.0.13
Swift 2.1: branch swift21 version <= 0.2.3
Swift 2.2, 2.3: branch swift2 version <= 0.5.2
Swift 3.1, branch swift3 version <= 0.6.9
Swift 3.2, branch swift32 version = 0.7.0
Swift 4.0, branch swift4 version >= 0.7.1
Swift 4.1, branch master version >= 0.9.0

Amirhossein Hashemi
- 93
- 1
- 9