update docs
This commit is contained in:
@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## Overview
|
||||
|
||||
GCDWebServer is a lightweight, GCD-based HTTP 1.1 server written in Objective-C (ARC) for embedding in iOS, macOS, and tvOS apps. It has no third-party dependencies. This fork has bumped the deployment targets to iOS 16 / tvOS 16 / macOS 12 (the upstream README still documents the original iOS 8 / tvOS 9 / macOS 10.7 minimums and the CocoaPods podspec still declares 8.0/9.0/10.7).
|
||||
GCDWebServer is a lightweight, GCD-based HTTP 1.1 server written in Objective-C (ARC) for embedding in iOS, macOS, and tvOS apps. It has no third-party dependencies. This fork targets iOS 16 / tvOS 16 / macOS 12 (set in both `GCDWebServer.xcodeproj` and `GCDWebServer.podspec`).
|
||||
|
||||
Not supported by design: keep-alive connections and HTTPS.
|
||||
|
||||
@ -40,11 +40,7 @@ The `Tests/` directory holds recorded HTTP exchanges, not code. Each test case i
|
||||
|
||||
## Formatting
|
||||
|
||||
Source style is enforced by clang-format (Google base style, see `.clang-format`) for Objective-C and SwiftFormat for the Swift example apps. Run before committing:
|
||||
```sh
|
||||
./format-source.sh
|
||||
```
|
||||
Note: `format-source.sh` pins exact tool versions (clang-format 9.0.0, SwiftFormat 0.44.5) and will refuse to run otherwise.
|
||||
Source style for Objective-C is defined by `.clang-format` (Google base style, `ColumnLimit: 0`). Format files with `clang-format -style=file -i <files>`. The Swift example apps use 2-space indentation (SwiftFormat).
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
@ -14,9 +14,9 @@ Pod::Spec.new do |s|
|
||||
s.summary = 'Lightweight GCD based HTTP server for OS X & iOS (includes web based uploader & WebDAV server)'
|
||||
|
||||
s.source = { :git => 'https://github.com/swisspol/GCDWebServer.git', :tag => s.version.to_s }
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.tvos.deployment_target = '9.0'
|
||||
s.osx.deployment_target = '10.7'
|
||||
s.ios.deployment_target = '16.0'
|
||||
s.tvos.deployment_target = '16.0'
|
||||
s.osx.deployment_target = '12.0'
|
||||
s.requires_arc = true
|
||||
|
||||
s.default_subspec = 'Core'
|
||||
|
||||
@ -35,9 +35,9 @@ What's not supported (but not really required from an embedded HTTP server):
|
||||
* HTTPS
|
||||
|
||||
Requirements:
|
||||
* macOS 10.7 or later (x86_64)
|
||||
* iOS 8.0 or later (armv7, armv7s or arm64)
|
||||
* tvOS 9.0 or later (arm64)
|
||||
* macOS 12 or later (x86_64, arm64)
|
||||
* iOS 16 or later (arm64)
|
||||
* tvOS 16 or later (arm64)
|
||||
* ARC memory management only (if you need MRC support use GCDWebServer 3.1 or earlier)
|
||||
|
||||
Getting Started
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
#!/bin/sh -exuo pipefail
|
||||
|
||||
# brew install clang-format
|
||||
|
||||
SWIFT_FORMAT_VERSION='0.44.5'
|
||||
|
||||
CLANG_FORMAT_VERSION=`clang-format -version | awk '{ print $3 }'`
|
||||
if [[ "$CLANG_FORMAT_VERSION" != "9.0.0" ]]; then
|
||||
echo "Unsupported clang-format version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "build/swiftformat" ]]; then
|
||||
mkdir -p "build"
|
||||
curl -sfL -o "build/SwiftFormat.zip" "https://github.com/nicklockwood/SwiftFormat/archive/$SWIFT_FORMAT_VERSION.zip"
|
||||
unzip "build/SwiftFormat.zip" "SwiftFormat-$SWIFT_FORMAT_VERSION/CommandLineTool/swiftformat" -d "build"
|
||||
mv "build/SwiftFormat-$SWIFT_FORMAT_VERSION/CommandLineTool/swiftformat" "build/swiftformat"
|
||||
fi
|
||||
|
||||
pushd "GCDWebServer/Core"
|
||||
clang-format -style=file -i *.h *.m
|
||||
popd
|
||||
pushd "GCDWebServer/Requests"
|
||||
clang-format -style=file -i *.h *.m
|
||||
popd
|
||||
pushd "GCDWebServer/Responses"
|
||||
clang-format -style=file -i *.h *.m
|
||||
popd
|
||||
pushd "GCDWebUploader"
|
||||
clang-format -style=file -i *.h *.m
|
||||
popd
|
||||
pushd "GCDWebDAVServer"
|
||||
clang-format -style=file -i *.h *.m
|
||||
popd
|
||||
|
||||
pushd "Frameworks"
|
||||
clang-format -style=file -i *.h *.m
|
||||
popd
|
||||
pushd "Mac"
|
||||
clang-format -style=file -i *.m
|
||||
popd
|
||||
|
||||
build/swiftformat --indent 2 "iOS" "tvOS"
|
||||
|
||||
echo "OK"
|
||||
Reference in New Issue
Block a user