kylef / JSONWebToken.swift

Swift implementation of JSON Web Token (JWT).
http://jwt.io
BSD 2-Clause "Simplified" License
763 stars 226 forks source link

Xcode 10 - Build Error #119

Open marcellofiore opened 5 years ago

marcellofiore commented 5 years ago

screen shot 2018-09-18 at 13 41 15

Using JSONWebToken (2.2.0) with Pod I have this error when using Xcode Version 10.0, please update.

I hope in a quick update, Regards.

novixon commented 5 years ago

I have the same issue. I saw the 3.0.0 unofficial version, but there is no .podspec file. So I am a little bit bewildered. How do you suggest to use it?

marcellofiore commented 5 years ago

where did you find version 3.0?

mataspetrikas commented 5 years ago

same here, with the Pod version JSONWebToken (2.2.0)

Pivovar63 commented 5 years ago

Same issue. Maybe it helps

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/CommonCrypto/module.modulemap:1:8: error: redefinition of module 'CommonCrypto'
...
/Users/.../Carthage/Checkouts/JSONWebToken.swift/CommonCrypto/module.modulemap:1:8: note: previously defined here
juchampagne commented 5 years ago

Thats how I fixed it in the Podfile if this helps anyone:

post_install do |installer|

    installer.pods_project.targets.each do |target|

        if target.name == 'JSONWebToken'
            system("rm -rf Pods/JSONWebToken/CommonCrypto")
        end

    end

end
JamaicanRumCream commented 5 years ago

I needed to add some build variants for os types to the exclusion code by juchampagne if target.name == 'JSONWebToken' || target.name == 'JSONWebToken-iOS' || target.name == 'JSONWebToken-macOS' || target.name == 'JSONWebToken-tvOS'

markltownsend commented 5 years ago

It appears the CommonCrypto is now part of iOS 12.

bjeromeHCS commented 5 years ago

Thanks @juchampagne I added that code to the end of my podfile and my Xcode 10.1 project can now build successfully with v2.2.0 👍