-
Notifications
You must be signed in to change notification settings - Fork 58
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
Update iOS available version to 10.3 #48
Conversation
The iOS 10.3 restriction only applies to that function, SecCertificateCopyPublicKey. Turns out that function is now deprecated. A better solution is to wrap the function as follows replacing the code in the function createPublicKey in the CryptorRSAKey.swift source file with this:
This fixes the deprecation issue and well as the problem you're trying to solve. Also, changing that top level availability changes the public API for all the functions in this extension. Not something we want do in a minor point release. I've got the code ready to go here, building an' passing my tests. Can you verify it on your simulator project and let me know? Then I'll check in the code I have and put a release out. |
Hey @billabt Unfortunately you can't just wrap the function since everything that uses that function also needs to be This does not a change to the public API since on Cocoapods we already have a minimum iOS version of 10.3 and on Carthage it is currently not compiling (On any iOS) so we cannot break what is already broken. I also added a guard statement instead of a force unwrap so we don't crash if With these changes it is still compiling and passing the tests. |
I have also added tvOS and watchOS so that they will compile and add an #if check for SecCertificateCopyKey. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested, depending on answers to my questions...
Description
A user was trying to build Swfit-JWT using Carthage and it wouldn't compile.
They raised issue #64 which shows the compile error that:
This fix updates the @available tag to be:
Which allows the project to compile.
How Has This Been Tested?
The project was compiled and tested using the iOS simulator.