JSONWebToken.swift icon indicating copy to clipboard operation
JSONWebToken.swift copied to clipboard

Xcode 10 - Build Error

Open marcellofiore opened this issue 7 years ago • 8 comments

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.

marcellofiore avatar Sep 18 '18 11:09 marcellofiore

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?

novixon avatar Sep 18 '18 13:09 novixon

where did you find version 3.0?

marcellofiore avatar Sep 18 '18 13:09 marcellofiore

same here, with the Pod version JSONWebToken (2.2.0)

mataspetrikas avatar Sep 18 '18 17:09 mataspetrikas

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

Pivovar63 avatar Sep 19 '18 06:09 Pivovar63

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

juchampagne avatar Sep 19 '18 15:09 juchampagne

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'

JamaicanRumCream avatar Oct 24 '18 15:10 JamaicanRumCream

It appears the CommonCrypto is now part of iOS 12.

markltownsend avatar Nov 18 '18 07:11 markltownsend

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 👍

bjeromeHCS avatar Dec 12 '18 12:12 bjeromeHCS