-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Move CommonCrypto and zlib dependencies mapping to custom module map #520
Conversation
Hello @turbulem. Thank you for your solution! But I still have a problem. I use GitLab CI, two build machines, cache server and Carthage. When I create cache on the first machine, and then use it on the second one, I get an error
|
@kotsaarev Thank you for feedback. Let me check |
I double checked. You're right. Looks like it actually doesn't solve an issue. |
…ing module maps for CommonCrypto and zlib
Just to add my 2c, I'm getting the same issue with Starscream on CircleCI - where I'm building carthage dependencies on a different lane and then using the cached dependencies for the test suite, and I get the same error: |
@JeanAzzopardi Did you check the most recent version? |
I haven't checked your version @turbulem, will try it out now and let you know how it goes. |
@turbulem - I can confirm your solution works on CircleCI |
@JeanAzzopardi Thank you! Hope this PR will help you to fix the issue |
However @turbulem , I just tested on device (compiled on my machine with Xcode 9.3) and swift 4.1.2, running on iOS 11, and I am getting a crash:
Crash is occurring in these lines:
|
@JeanAzzopardi Does this happen only on real device? Let me check later today on device. Thank you for your feedback! |
I will check and get back to you. Could be related to SSL connection too.
|
@JeanAzzopardi It may be related to the ss_SHA1Base64Digest function that I added in my PR. This is small wrapper around CC, but all tests passed and I didn't check on device. I will have some time later this week or on a weekend. |
@turbulem So I downloaded your branch and checked it out, the tests do pass, but trying the SimpleExample with the local websocket server on simulator gives me the same error. |
Actually yes, I made a mistake. I return NSData instead of NSString and somehow compiler let me get away with it, producing a warning I didn't pay attention to :( |
Yes, it's working now, that was the issue! No problem, glad to help out, looking forward for this P.R. to be merged. |
@turbulem @daltoniam would it be possible to merge this? It's the last thing holding me back from upgrading to Starscream 3 <3 |
# Conflicts: # Starscream.xcodeproj/project.pbxproj
I've updated my branch with new changes |
Hello @turbulem!
Crash is occurring in same lines
I tested with iOS 11.4, Xcode 9.4.1, Swift 4.1. For more info see crash file. |
@kotsaarev I will double check later this week. Thank you. |
@turbulem |
@kotsaarev So the final version should work fine. Let me know if I can help you anyhow. |
@kotsaarev, any chance that it will be merged in the near future? |
@daltoniam Any chance that this could be merged? It's the only blocker preventing me from releasing an update as I use CircleCI for releases. |
any chance to merge? |
Two things are missing here: |
@gregiOS Thank you for review. I made necessary changes. Now should be fine. |
update to swift 4 manifest
Any chance for rebase @turbulem, and merge @daltoniam? |
…ing module maps for CommonCrypto and zlib
# Conflicts: # Starscream.xcodeproj/project.pbxproj
@turbulem Can you please take a look on these merge conflicts. It will be easier to merge these changes. Thanks! |
Hi, I updated my branch, however there are some issues with new Swift and tests need to be updated. I will do this later this week. |
OK let me know when I can check again. |
@turbulem please check:
|
File SSLClientCertificate.swift is in Sources and Sources/Starscream. I guess it should be just once in project. Thanks! |
.library(name: "Starscream", targets: ["Starscream"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/daltoniam/zlib-spm.git", from: "1.1.0"), |
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.
I'm being picky here, but for consistency let's use same format without .git :)
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.
This is some merge issue, I will update my branch and discards this changes.
I had no intention to change SPM config
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.
Looks like it's some GH issue, because these files are equal:
https://github.com/daltoniam/Starscream/blob/master/Package.swift
https://github.com/turbulem/Starscream/blob/master/Package.swift
I will make another branch and refresh this PR in order to make it clear.
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.
OK, I can adjust it later myself.
@fassko Thank you for your instant reviews 👍 |
@turbulem Let me know when you're done and I will merge this. |
@fassko I opened new PR, please take a look. |
Hi!
I faced an issue similar to this and this this.
In my project I use Carthage and commit my artefacts into my repo. And CI(and any other machine) is not able to compile it without running 'carthage update'.
Basically the problem that to link Starscream.framework with other app or library you should provide module.map similar to the one, located in /zlib folder (but without header, which is required only for build).
To make this work I created new custom module map and added a wrapper for SHA1 algorithm used by Starscream. Also updated cocoapods spec to add custom module map + private headers.
Please consider this PR as a possible way of resolving issues linked above and also I'd be happy to hear from you any suggestions on this.
Thank you!
Cheers!