-
Notifications
You must be signed in to change notification settings - Fork 104
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
Make CommonCrypto dependency work for both Swift <4.2 and Swift 4.2 (CommonCrypto is public) #190
Make CommonCrypto dependency work for both Swift <4.2 and Swift 4.2 (CommonCrypto is public) #190
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #190 +/- ##
===========================================
- Coverage 97.22% 97.08% -0.15%
===========================================
Files 6 6
Lines 397 377 -20
===========================================
- Hits 386 366 -20
Misses 11 11
Continue to review full report at Codecov.
|
Thanks for the PR, @ziogaschr! The changes were failing to build on Xcode 9.x, so I made a small change and pushed it to your branch to get the CI builds passing. I like this new method of generating a modulemap at compile time only if necessary, rather than maintaining and linking external modulemap files. Before merging this PR, I'm going to test this new approach with Carthage and CocoaPods to make sure it works for all use cases. |
Codecov Report
@@ Coverage Diff @@
## develop #190 +/- ##
========================================
Coverage 97.22% 97.22%
========================================
Files 6 6
Lines 397 397
========================================
Hits 386 386
Misses 11 11
Continue to review full report at Codecov.
|
Oh nice catch @mattrubin, I tried to see if the patch works in another 3rd party lib and it worked nicely in Xcode 9, so I thought of just copy it here without testing it below Xcode10. Nice lesson for me, to not trust any code, likely Travis catch it. |
I was never quite able to get this new approach working when building with CocoaPods, and now I've just updated the whole project to build with Xcode 10, removing the need for the modulemap shims. Thank you to @ziogaschr for the PR! |
I am glad there is a better way of doing this @mattrubin. Thx for maintaining this lib. |
In Swift 4.2 and Xcode 10.0 the CommonCrypto framework became publicly available in iOS. For this reason, we had to remove the modulemap. For doing this, while keeping backward compatibility with later versions, we used an elegant method from @radianttap, who used a Build phase to check for CommonCrypto existence.
p.s.: Thanks @radianttap. I hope you are fine that I used your elegant handler.