Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Add full Swift Package manager support #516

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nostradani
Copy link

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)

@trapper-
Copy link
Contributor

Please merge this :)

@nostradani
Copy link
Author

I squashed the commits into a single one. Should now be more concise.

@nostradani
Copy link
Author

@swisspol If you need any input or so, just let me know

@vicegax
Copy link

vicegax commented Jan 8, 2021

This relates to the issue: #499
It would be great if this can move forward.

@vicegax vicegax mentioned this pull request Jan 8, 2021
@clementbarry
Copy link

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?

@nostradani
Copy link
Author

@clementbarry I added them to the excludes since they are not needed for the targets itself. This should resolve the warnings

@clementbarry
Copy link

Swift compiler throws "Cannot find type 'GCDWebUploader' in scope" error when trying to use GCDWebUploader.
Maybe the Package needs another headerSearchPath for it?

@nostradani
Copy link
Author

@clementbarry Alright, I added a symlink to the missing header. Now all public headers should be present.

@Truck3r
Copy link

Truck3r commented May 20, 2021

Anything preventing this to be merged and released?

@danielnord
Copy link

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

@nostradani
Copy link
Author

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

@SamCosta1
Copy link

Can this be merged? :D

@SamCosta1
Copy link

Noticed there's not any PRs been merged in a while, is it only one person with permission to merge them?

@joaorgsampaio
Copy link

joaorgsampaio commented Jul 20, 2021

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.

@JacobHearst
Copy link

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

@nostradani
Copy link
Author

I updated my PR and added instructions to the README.md

@JacobHearst
Copy link

@swisspol Can we get this merged?

@nostradani nostradani force-pushed the master branch 2 times, most recently from 6552dd6 to 62c2480 Compare August 12, 2021 22:17
@nostradani
Copy link
Author

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.

@danleechina
Copy link

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.

@Gelembjuk
Copy link

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?

@JacobHearst
Copy link

@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

@simonox
Copy link

simonox commented Jan 19, 2022

So, is this project deprecated? Should we switch to the fork?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.