Search code examples
iosswiftinstallationcryptoswift

Install manually Crypto swift library. Unexpected platform condition


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


Solution

  • 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