Commit Graph

2 Commits

Author SHA1 Message Date
fe0036eb7e Migrate MIME-type lookup to UTType (UniformTypeIdentifiers)
Replace the deprecated CoreServices UTI calls
(UTTypeCreatePreferredIdentifierForTag / UTTypeCopyPreferredTagWithClass)
in GCDWebServerGetMimeTypeForExtension with the modern
[UTType typeWithFilenameExtension:].preferredMIMEType, removing the
-Wdeprecated-declarations pragma. Behavior is unchanged: known
extensions map to the same MIME type, unknown ones fall back to the
default.

The UniformTypeIdentifiers framework (macOS 11+ / iOS 14+ / tvOS 14+,
within the project's deployment targets) is now linked in all three
build systems: Xcode (OTHER_LDFLAGS), CocoaPods (Core subspec
frameworks), and SwiftPM (linkedFramework).

Verified: Run-Tests.sh, swift build, and pod lib lint all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 16:57:23 +07:00
1f96a271cb Add Swift Package Manager support
Add Package.swift with three products: GCDWebServer (core),
GCDWebUploader, and GCDWebDAVServer.

Public headers live across Core/Requests/Responses subdirectories, which
SPM cannot expose directly. To support SPM without moving any files
(keeping the Xcode project and CocoaPods builds intact), public headers
are surfaced through symlinks in include/ directories with a hand-written
umbrella-directory module map; the private GCDWebServerPrivate.h is left
unlinked so it stays out of the public module.

GCDWebUploader.bundle is shipped as a .copy resource and located at
runtime via SWIFTPM_MODULE_BUNDLE under a #if SWIFT_PACKAGE branch.

Verified: swift build (all targets), Swift module imports, Xcode
framework build, and the XCTest suite all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:55:49 +07:00