Skip to content
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

Install using CocoaPods not resolving right GCDWebServer #91

Closed
MAVERlCK opened this issue Jun 4, 2020 · 10 comments
Closed

Install using CocoaPods not resolving right GCDWebServer #91

MAVERlCK opened this issue Jun 4, 2020 · 10 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@MAVERlCK
Copy link
Contributor

MAVERlCK commented Jun 4, 2020

I tried to install r2-streamer-swift using CocoaPods and saw that it has GCDWebServer as a dependency.

The issue is that the Cartfile uses a forked ( and working ) version of GCDWebServer ( erdlab/GCDWebServer ), meaning that the Cocoapods installs can't work without that exact dependency.

Is there any reason why the forked version of GCDWebServer isn't available on CocoaPods ?
If no, can we publish the forker server on CocoaPods to then update the podspec file of this project ?

My main issue is that I'm using this package as a dependency on a React Native project, which is only compatible with Cocoapods dependencies.

@mickael-menu mickael-menu added help wanted Extra attention is needed question Further information is requested labels Jun 4, 2020
@mickael-menu
Copy link
Member

@aferditamuriqi should be able to help you for that.

@MAVERlCK
Copy link
Contributor Author

MAVERlCK commented Jun 9, 2020

I managed to find a dirty fix for my issue.

Since I use this lib for a react native library, I just have to add this repo in the Podfile of my final App, since we can add github and tag dependency in podfile ( but not in the podspec ), it's overriding r2-streamer-swift GCDWebServer sub-dependency

# Other native modules
  pod 'GCDWebServer', :git => "https://github.com/edrlab/GCDWebServer.git", :tag => '3.6.2'

It's not clean since I have to manage this dependency in my final app, which do not depends directly on GCDWebDriver from edrlab.

I would like to let this issue open to know if there's really a problem with this module or if a better fix could be possible for my own problem

@mickael-menu
Copy link
Member

Thanks for the heads-up @MAVERlCK. If you manage to find a fix by modifying directly the Podspec in the project, feel free to open a pull request for that.

@MAVERlCK
Copy link
Contributor Author

MAVERlCK commented Jun 9, 2020

@mickael-menu Hey, thanks for the quick support !
The issue is that we can't add a git url as a pod source in a .podspec file, this syntax in only available in a Podfile file :/

@mickael-menu
Copy link
Member

That's a problem indeed... I actually don't know why we use a fork on EDRLab. @aferditamuriqi do you have more information about that? And I think you're using CocoaPods in your apps, how are you handling this issue?

@aferditamuriqi
Copy link
Member

aferditamuriqi commented Jun 11, 2020

The reason why there is a fork, the upstream has an issue with using GCDWebServer vs GCDWebServers. In coco pods, it’s used one way and in Carthage the other.

We were completely blocked in even using cocoa pods for this reason. I had to create a fork to address this and tag a release.

The only way to use cocoa pods is to have the GCDWebServer in the host apps pod file and then add the R2 podsoecs .

Using the official upstream is not possible until the naming issue and some other issues within the code of upstream aren’t fix for cocoa pods

@aferditamuriqi
Copy link
Member

aferditamuriqi commented Jun 11, 2020

I am using coocopods in some of my apps, Carthage in others, a combination of both in others. And sub modules in another. Depends on the use case I am using all

@mickael-menu
Copy link
Member

@aferditamuriqi Thanks for the explanation

@MAVERlCK So it looks like you're stuck with this current configuration for now. Do you know if React Native supports Swift Package Manager? We want to roll out SPM packages once Swift 5.3 is released, see this related issue.

@aferditamuriqi
Copy link
Member

@MAVERlCK I have a similar project with react-native where cocoa pods are used, but there were some other issues that I couldn't use the r2 dependencies within react+cocoapods, and I use Carthage in that specific project for the r2 modules and leave the rest that react native need as is in cocoa pods.

@MAVERlCK
Copy link
Contributor Author

@mickael-menu I think RN only really supports Cocoapods dependencies for now, it may change with SPM in the future

@aferditamuriqi I managed to "solve" this issue by forcing Cocoapods to override GCDWebDriver by the erdlab fork in my host app podfile, now it's working pretty fine !

Thanks both of you for the in depth infos !

@mickael-menu mickael-menu transferred this issue from readium/r2-streamer-swift Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants