GCDWebServer
GCDWebServer copied to clipboard
Add full Swift Package manager support
This PR should include everything to fully support SPM. That includes:
- Public headers for the module (realised using symbolic links)
- Deals with GCDWebUploader.bundle
- Other build methods should not be affected (Xcode, Cocoapods)
Please merge this :)
I squashed the commits into a single one. Should now be more concise.
@swisspol If you need any input or so, just let me know
This relates to the issue: https://github.com/swisspol/GCDWebServer/issues/499 It would be great if this can move forward.
Some resources still cause workspace warnings in Xcode 12:
Package Loading Group
found 5 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
SourcePackages/checkouts/GCDWebServer/GCDWebServer.podspec
SourcePackages/checkouts/GCDWebServer/Run-Tests.sh
SourcePackages/checkouts/GCDWebServer/format-source.sh
SourcePackages/checkouts/GCDWebServer/README.md
SourcePackages/checkouts/GCDWebServer/LICENSE
Maybe add copy rules for them for the target in package manifest?
@clementbarry I added them to the excludes since they are not needed for the targets itself. This should resolve the warnings
Swift compiler throws "Cannot find type 'GCDWebUploader' in scope" error when trying to use GCDWebUploader. Maybe the Package needs another headerSearchPath for it?
@clementbarry Alright, I added a symlink to the missing header. Now all public headers should be present.
Anything preventing this to be merged and released?
Hi! I see this error when I try to add it as a Swift Package from your repo:
https://github.com/nostradani/GCDWebServer has no Package.swift manifest for version 3.5.4 in https://github.com/nostradani/GCDWebServer
Hi! I see this error when I try to add it as a Swift Package from your repo:
https://github.com/nostradani/GCDWebServer has no Package.swift manifest for version 3.5.4 in https://github.com/nostradani/GCDWebServer
This is because version 3.5.4 of GCDWebServer (the git tag) doesn't yet have the Package.swift. Instead of version 3.5.4 you would need to specify the branch for now
Can this be merged? :D
Noticed there's not any PRs been merged in a while, is it only one person with permission to merge them?
I would love this to be merged as well. But don't forget to update the Getting Started part of the README.md
file to include the instructions for using SPM so the documentation stays good.
Highly interested in seeing this merged. Don't have the access to update this PR without making another PR on @nostradani's repo but here are my suggested updates to the README:
GCDWebServer is also available via Swift Package Manager (SPM). To add it to your project, add this line to your Package.swift
file:
dependencies: [
.package(url: "https://github.com/swisspol/GCDWebServer", from: "3.5.4")
]
Or add it to your xcodeproj through the Xcode UI
I updated my PR and added instructions to the README.md
@swisspol Can we get this merged?
I had issues with the package name and had to rename it. Somehow SPM uses the last part of the repository URL for its name and behaves strangely if the package name doesn't match. But it should work fine now.
Why the name in your repo is GCDWebServers not GCDWebServer. It seems using GCDWebServer not working
I had issues with the package name and had to rename it. Somehow SPM uses the last part of the repository URL for its name and behaves strangely if the package name doesn't match. But it should work fine now.
Hey Guys, Is there any option to use this package in modern Swift 5 app? My project is for iOS, target 15.0 . XCode 13.2 . Swift 5 . I add dependencies using SPM.
Is there any workaround to add this package today without this pull request accepted?
@Gelembjuk This isn't ideal but I've forked the repo with the changes to make this project a swift package. You can find it here: https://github.com/JacobHearst/GCDWebServer
So, is this project deprecated? Should we switch to the fork?