Hi,
I'm using your framework in combination with several others - including CommonCrypto. Unfortunately both frameworks - Starscream and CommonCrypto - are using the system CommonCrypto framework.
This results in a duplication error in the modulemaps:
.../Starscream/zlib/module.modulemap:6:8: Redefinition of module 'CommonCrypto'
...
.../CommonCrypto.framework/Modules/module.modulemap:1:8: note: previously defined here
module CommonCrypto [system] {
^
I'm not sure what the appropriate fix for this problem is - #353 seems to address a similar issue. Renaming the module name CommonCrypto will probably work, but is this a clean solution?
Here's a link to the CommonCrypto's modulemaps - I searched for a related issue there, but found nothing.
In a carthage-only scenario I would remove Starscream' s dependency of the CommonCrypto (System) framework and would replace it with an appropriate entry for the cartfile - but since your framework should be usable outside carthage this is not an ideal solution.
Any ideas how to fix this - for all environments?
I posted the issue as well in CommonCrypto's issue section.
Yeah I can see how that would be a problem. The "best" solution would be unity on a common repo or a first party solution, but realistically that will probably create different conflicts 馃槃. Anyway, we might just be able to rename the CommonCrypto module in the module map to something "namespaced" for Starscream to avoid the conflict (e.g. SSCommonCrypto). This of course would require changing the SPM back to a custom repo since the import name would now be different. Yeah, I don't love our options, but not sure how else to get other frameworks with the same dependencies to play nice.
@daltoniam Yeah I'm running into this issue on my fork. I it's acceptable to go back to custom repos and wait for a first-party solution.
Latest release is working - thank you.
@daltoniam Hi, so my setup is the following
I have a framework A which is linking to Starscream via Cocoapods. I can build this framework correctly.
Now I link this framework with an App. If I just build, I get an error saying Starscream not found. So I add the Starscream dependency via Cocoapods. Now when I build, it gives me and error saying
/Users/mjolnir/workspace/oss/LiveGQL/Example/Pods/Starscream/zlib/module.modulemap:1:8: error: redefinition of module 'SSCZLib'
module SSCZLib [system] {
^
/Users/mjolnir/workspace/oss/LiveGQL/Pods/Starscream/zlib/module.modulemap:1:8: note: previously defined here
module SSCZLib [system] {
^
/Users/mjolnir/workspace/oss/LiveGQL/Example/Pods/Starscream/zlib/module.modulemap:6:8: error: redefinition of module 'SSCommonCrypto'
module SSCommonCrypto [system] {
^
/Users/mjolnir/workspace/oss/LiveGQL/Pods/Starscream/zlib/module.modulemap:6:8: note: previously defined here
module SSCommonCrypto [system] {
^
<unknown>:0: error: could not build Objective-C module 'Starscream'
Can you please help me out ?
I am facing the same issue @rhishikeshj did mention above.
I'm getting the same issue w/Xcode 9.3. It's odd that it's looking in the Checkout directory ...
...Carthage/Checkouts/Starscream/zlib/module.modulemap:1:8: error: redefinition of module 'SSCZLib'
module SSCZLib [system] {
^
...Carthage/Checkouts/SwiftPhoenixClient/Example/Pods/Starscream/zlib/module.modulemap:1:8: note: previously defined here
module SSCZLib [system] {
^
...Carthage/Checkouts/Starscream/zlib/module.modulemap:6:8: error: redefinition of module 'SSCommonCrypto'
module SSCommonCrypto [system] {
^
...Carthage/Checkouts/SwiftPhoenixClient/Example/Pods/Starscream/zlib/module.modulemap:6:8: note: previously defined here
module SSCommonCrypto [system] {
Same issue here :(
Same issue here with https://github.com/davidstump/SwiftPhoenixClient
I'm having problems with this as well. My problem seems to be related to using Starscream and CryptoSwift together. I had a version of this working, but pulling my code fresh from Git no longer builds, as it cannot find SSCommonCrypto. I guess I fixed it somehow, way back when, but no longer know what I did to make it work.
My fresh pull from Git does not have an updated module map in Starscream for SSCommonCrypto and it is missing the zlib directory that was in the version that worked.
I'm totally confused, lol. Any help would be appreciated. Thanks.
Same error here. It got fixed by removing the Starscream.framework from the Carthage build folder, try to build, then put it back, and built again successfully this time (shrug). Don't know what mystery tripped Xcode.
Most helpful comment
@daltoniam Hi, so my setup is the following
I have a framework A which is linking to Starscream via Cocoapods. I can build this framework correctly.
Now I link this framework with an App. If I just build, I get an error saying Starscream not found. So I add the Starscream dependency via Cocoapods. Now when I build, it gives me and error saying
/Users/mjolnir/workspace/oss/LiveGQL/Example/Pods/Starscream/zlib/module.modulemap:1:8: error: redefinition of module 'SSCZLib' module SSCZLib [system] { ^ /Users/mjolnir/workspace/oss/LiveGQL/Pods/Starscream/zlib/module.modulemap:1:8: note: previously defined here module SSCZLib [system] { ^ /Users/mjolnir/workspace/oss/LiveGQL/Example/Pods/Starscream/zlib/module.modulemap:6:8: error: redefinition of module 'SSCommonCrypto' module SSCommonCrypto [system] { ^ /Users/mjolnir/workspace/oss/LiveGQL/Pods/Starscream/zlib/module.modulemap:6:8: note: previously defined here module SSCommonCrypto [system] { ^ <unknown>:0: error: could not build Objective-C module 'Starscream'Can you please help me out ?