Skip to content

[WIP] Update to Swift 4 compatible commit of CryptoSwift #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Jeehut
Copy link

@Jeehut Jeehut commented Jun 8, 2017

I know it's time until a final Swift 4 release and CryptoSwift does not have a released version yet, so you probably might want to merge this into a separate branch if at all. In any case, here's how you could install this if this was merged into a branch named (say) "swift4":

github "kylef/JSONWebToken.swift" "swift4"

Until this PR is merged, you can install it via my fork like so:

github "Dschee/JSONWebToken.swift" "master"

@Jeehut Jeehut mentioned this pull request Jun 8, 2017
@Jeehut Jeehut changed the title Update to Swift 4 compatible commit of CryptoSwift [WIP] Update to Swift 4 compatible commit of CryptoSwift Jun 8, 2017
@Jeehut
Copy link
Author

Jeehut commented Jun 8, 2017

Update: Thought it works, but had "CryptoSwift" chosen as scheme. Once changed to JWT-iOS it doesn't compile due to some issues with the import of HMAC ... to me it's also confusing that all Swift files in the included CryptoSwift project are not linked with the CryptoSwift target ... or that's it's there at all, can it be not included the "usual" way using Carthage(/CocoaPods)?

@kylef
Copy link
Owner

kylef commented Aug 4, 2017

@Dschee As of current master, CryptoSwift is not used as a dependency when you are targeting Apple platforms (Xcode, Carthage, CocoaPods) so that your changes are not necessary anymore.

Please let us know if you see any other problems with Swift 4.

@kylef kylef closed this Aug 4, 2017
@mattbarker016
Copy link

I'm on Swift 4 and CryptoSwift is still being installed on the latest master branch :/

@kylef
Copy link
Owner

kylef commented Aug 15, 2017

@mattbarker016 Could you please contain a bit more information such as how you are trying to integrate JSONWebToken and which platform you are using?

@mattbarker016
Copy link

mattbarker016 commented Aug 16, 2017

I'm trying to use JSONWebToken in Xcode 9 (beta 3). I'm actually not on Swift 4 yet. For some reason, it installs CryptoSwift, which breaks big time in my environment. I saw the master branch has the latest changes too. Any idea what's up? Should I try to manually remove that pod?

Podfile

target 'iMessageExtension' do
    pod 'Alamofire', '~> 4.0'
    pod 'SwiftyJSON'
    pod 'SDWebImage', '~>4.0'
    pod 'StatefulViewController', '~> 3.0'
    pod 'JSONWebToken'
end

Terminal Output

$ pod install
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.5.0)
Installing CryptoSwift (0.6.9)
Using FirebaseAnalytics (3.9.0)
Using FirebaseCore (3.6.0)
Using FirebaseInstanceID (1.0.10)
Using GTMOAuth2 (1.1.4)
Using GTMSessionFetcher (1.1.11)
Using Google (3.1.0)
Using GoogleSignIn (4.0.2)
Using GoogleToolboxForMac (2.1.1)
Installing JSONWebToken (2.1.1)
Using SDWebImage (4.1.0)
Using StatefulViewController (3.0)
Using SwiftyJSON (3.1.4)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 6 dependencies from the Podfile and 14 total pods installed.

@kylef
Copy link
Owner

kylef commented Aug 16, 2017

@mattbarker016 JSONWebToken that doesn't depend on CryptoSwift is only in master not the released stable version. You would need to install from master to use it:

pod 'JSONWebToken', :git => 'https://github.com/kylef/JSONWebToken.swift'

@mattbarker016
Copy link

mattbarker016 commented Aug 16, 2017

Aha! I tried that syntax and then putting a branch afterwards, but all I needed was the main master. Thank you so much! When you do you think you're going to release the fix?

--

I was trying to use this pod to create a JWT for MusicKit, but it doesn't support ES256. Would you consider adding this? There are only two Swift JWT libraries, and the other one isn't compatible with Xcode projects. You're the only game in town.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants