Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e1afbc1
chore: Bump minimum supported iOS version to v12
philprime Dec 23, 2025
1b56f34
refactor: Chnage deprecated dependency format to from-version
philprime Dec 23, 2025
d722f21
chore(deps): Update lockfile to latest versions
philprime Dec 23, 2025
67c0a35
refactor(ci): Improve YAML formatting in workflows for clarity and co…
philprime Dec 23, 2025
2991286
chore: Add pre-commit configuration and dprint settings for code form…
philprime Dec 23, 2025
94dc49a
style: Apply all pre-commit format fixes
philprime Dec 23, 2025
92a09b3
chore(dx): Add default formatter setup and extensions
philprime Dec 23, 2025
d00bfc1
chore: Update Package.swift to enable development dependencies and re…
philprime Dec 23, 2025
00ed94f
chore: Bump minimum deployment version in Cocoapods spec to v12
philprime Dec 23, 2025
864b2c9
chore(ci): Extend default configuration in renovate.json
philprime Dec 23, 2025
7a94f8f
chore: Remove legacy CODE_OF_CONDUCT
philprime Dec 23, 2025
a4aaf1f
chore(deps): Update Ruby to v3.4.7
philprime Dec 23, 2025
62f3871
chore: Update copyright year and holder to techprimate GmbH (2016-2025).
philprime Dec 23, 2025
1e2afa9
fix(ci): Enable development dependencies for macOS unit tests
philprime Dec 23, 2025
8e15175
refactor: Change platform-specific imports to include tvOS and watchOS
philprime Dec 25, 2025
af19f59
feat(ci): Add Makefile with platform-specific build and tests
philprime Dec 25, 2025
f3b0ff8
feat(ci): Add Makefile targets for building xcframework
philprime Dec 25, 2025
43bb84e
chore: Reduce Xcode Project to required minimum for Cocoapods
philprime Dec 25, 2025
fc811bb
refactor: Moderinze example Xcode projects
philprime Dec 25, 2025
17ef711
refactor: Clean up Makefile and improve code readability in PDF rende…
philprime Dec 25, 2025
af94aa8
feat(dx): Add custom pre-commit hook to check for disabled tests
philprime Dec 25, 2025
3cf146a
feat(tests): Update PDFTableObjectSpec and PDFListItemObject_Spec for…
philprime Dec 25, 2025
6b07d35
fix(ci): Remove unnecessary DESTINATION variable from test run command
philprime Dec 25, 2025
e133dd1
fix(ci): Change test workflow to only trigger for pushes to main
philprime Dec 25, 2025
4e420e0
fix: Remove legacy script reference from Dangerfile and create-xcfram…
philprime Dec 25, 2025
d27c011
fix(ci): Add setup-xcode step to select Xcode 26.2
philprime Dec 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .git-hooks/check-testing-disabled.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Check that testing dependencies are not accidentally committed

has_error=0

for file in "$@"; do
if [[ "$file" == "Package.swift" ]]; then
if grep -q 'isTestingEnabled = /\*TESTING_FLAG\*/true/\*TESTING_FLAG\*/' "$file"; then
echo "ERROR: Package.swift has testing enabled."
echo "Please set isTestingEnabled to false before committing."
has_error=1
fi
fi

if [[ "$file" == "Package.resolved" ]]; then
echo "ERROR: Package.resolved should not be committed."
echo "Please unstage this file with: git reset HEAD Package.resolved"
has_error=1
fi
done

exit $has_error
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

> ℹ Please fill out this template when filing an issue.
Expand All @@ -16,16 +15,16 @@ assignees: ''

## What did you expect to happen?

ℹ Please replace this with what you expected to happen.
ℹ Please replace this with what you expected to happen.

## What happened instead?

ℹ Please replace this with of what happened instead.
ℹ Please replace this with of what happened instead.

## TPPDF Environment

**TPPDF version:** ℹ
**Xcode version:**
**Xcode version:** ℹ
**Swift version:** ℹ

## Demo Code / Project
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ about: Explain how the feature should work
title: ''
labels: 'enhancement'
assignees: ''

---

> ℹ Please fill out this template when filing an issue.
> All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.
>
>
> Feature request should extend the framework. If you found a bug, please issue a [Bug Report](https://github.com/techprimate/TPPDF/issues/new?&template=bug_report.md)

## How should the feature work?
Expand All @@ -22,12 +21,12 @@ assignees: ''

## What happened instead?

ℹ Please replace this with of what happened instead.
ℹ Please replace this with of what happened instead.

## TPPDF Environment

**TPPDF version:** ℹ
**Xcode version:**
**Xcode version:** ℹ
**Swift version:** ℹ

## Demo Code / Project
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,32 @@ jobs:
name: Generate Documentation
runs-on: macos-15
steps:
- # Checkout the repository
- name: Checkout the repository
uses: actions/checkout@v5

- # Install Ruby
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- # Adapt the default title by adding the reference name from GitHub
name: Patch Title
- name: Patch title with GitHub reference
run: |
ESCAPED_REF_NAME=$(echo "${{ github.ref }}" | sed 's/[\/&]/\\&/g')
sed -i.bak "s/title:\(.*\)/title:\1 ($ESCAPED_REF_NAME)/g" .jazzy.yaml

- # Generate Documentation
name: Generate
- name: Generate Documentation with Jazzy
run: |
SDK_PATH=`xcrun --sdk iphonesimulator --show-sdk-path`
SDK_VERSION=`xcrun --sdk iphonesimulator --show-sdk-version`
bundle exec jazzy \
--build-tool-arguments "--sdk,${SDK_PATH},-Xswiftc,-sdk,-Xswiftc,$SDK_PATH,-Xswiftc,-target,-Xswiftc,arm64-apple-ios${SDK_VERSION}-simulator"

- # Small Jazzy fixes for GitHub Pages
name: Fix Invalid URLs
- name: Fix Invalid URLs
run: |
cd docs
touch .nojekyll

- # Commit newly generated docs
name: Commit Documentation Files
- name: Commit documentation files
if: github.event_name != 'pull_request'
run: |
cd docs
Expand All @@ -52,9 +48,8 @@ jobs:
git add .
git commit -m "Deploying Updated Jazzy Docs"

- # Publish generated docs to the GitHub pages branch
name: Push changes
uses: ad-m/github-push-action@master
- name: Push changes to GitHub Pages
uses: ad-m/github-push-action@v1
if: github.event_name != 'pull_request'
with:
directory: docs
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v5

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Install Dependencies
run: brew install tree
run: make install-ci

- name: Create XCFramework
run: ./scripts/create-xcframework.sh
run: make build-xcframework

- name: Create GitHub Release
uses: marvinpinto/action-automatic-releases@latest
Expand Down
107 changes: 30 additions & 77 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -13,93 +15,44 @@ concurrency:

jobs:
unit-tests:
name: Unit Tests (${{ matrix.build.sdk }})
runs-on: ${{ matrix.build.runs-on }}
name: Unit Tests (${{ matrix.build.name }})
runs-on: macos-26
timeout-minutes: 30
strategy:
matrix:
build:
[
{
sdk: "iphonesimulator",
destination: "platform=iOS Simulator,OS=18.1,name=iPhone 16 Pro",
action: "test",
runs-on: "macos-15",
},
{
sdk: "xros",
destination: "platform=visionOS Simulator,OS=2.1,name=Apple Vision Pro",
action: "build",
runs-on: "macos-15",
},
]
- name: iOS
action: test-ios
logfiles: raw-*-ios.log
- name: macOS
action: test-macos
logfiles: raw-*-macos.log
- name: Mac Catalyst
action: test-maccatalyst
logfiles: raw-*-maccatalyst.log
- name: tvOS
action: test-tvos
logfiles: raw-*-tvos.log
- name: watchOS
action: test-watchos
logfiles: raw-*-watchos.log
- name: visionOS
action: test-visionos
logfiles: raw-*-visionos.log
steps:
- name: Checkout the repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Check environment
run: |
set -ex
xcodebuild -version
swift --version
xcrun simctl list
xcode-version: "26.2"

- name: Run Tests
run: |
set -o pipefail && \
env NSUnbufferedIO=YES \
xcodebuild -workspace . \
-scheme "TPPDF" \
-sdk "${{ matrix.build.sdk }}" \
-destination "${{ matrix.build.destination }}" \
-configuration Debug \
${{ matrix.build.action == 'test' && '-enableCodeCoverage YES' || '' }} \
-derivedDataPath /tmp/DerivedData \
-resultBundlePath test_output \
CODE_SIGNING_ALLOWED="NO" \
${{ matrix.build.action }} 2>&1 | tee test.log | xcbeautify
run: make ${{ matrix.build.action }}

- name: Upload test log file on error
uses: actions/upload-artifact@v4
if: failure()
with:
name: test.log
path: test.log
- name: Generate code coverage reports
if: matrix.build.action == 'test'
run: |
PROFDATA_PATH=$(find /tmp/DerivedData -name "*.profdata")
echo "Detected profdata at path: $PROFDATA_PATH"
xcrun llvm-cov export \
/tmp/DerivedData/Build/Products/Debug-iphonesimulator/TPPDFTests.xctest/TPPDFTests \
--instr-profile $PROFDATA_PATH \
--format="lcov" > unit-tests.coverage.lcov
xcrun llvm-cov export \
/tmp/DerivedData/Build/Products/Debug-iphonesimulator/TPPDFIntegrationTests.xctest/TPPDFIntegrationTests \
--instr-profile $PROFDATA_PATH \
--format="lcov" > integration-tests.coverage.lcov

macos-unit-tests:
name: Unit Tests (macos)
runs-on: macos-15
timeout-minutes: 30
steps:
- name: Checkout the repository
uses: actions/checkout@v5
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Check environment
run: |
set -ex
xcodebuild -version
swift --version
xcrun simctl list
- name: Run tests
run: swift test --parallel --enable-code-coverage
- name: Generate code coverage reports
run: |
xcrun llvm-cov export \
.build/debug/TPPDFPackageTests.xctest/Contents/MacOS/TPPDFPackageTests \
--instr-profile .build/debug/codecov/default.profdata \
--format="lcov" > coverage.lcov
name: Test Logs - ${{ matrix.build.name }}
path: ${{ matrix.build.logfiles }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ vendor
*.lcov
test_output
test_output*

raw-build-*.log
raw-test-*.log
2 changes: 1 addition & 1 deletion .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author: Philip Niedertscheider
# Author URL of this project
author_url: https://github.com/philprime
# Copyright markdown rendered at the bottom of the docs pages
copyright: "© 2024 [techprimate GmbH](https://techprimate.com). All rights reserved."
copyright: "© 2016-2025 [techprimate GmbH](https://techprimate.com). All rights reserved."
# URL to link from the source host's logo.
source_host_url: https://github.com/techprimate/TPPDF
github_url: https://github.com/techprimate/TPPDF
Expand Down
63 changes: 63 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
- id: detect-private-key
- id: end-of-file-fixer

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
hooks:
- id: check-github-actions
- id: check-github-workflows
args: [--verbose]

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck

- repo: local
hooks:
- id: format-json
name: Format JSON
description: "Format JSON"
files: ^.*\.json$
types_or: [json]
entry: dprint
language: system
args:
- "fmt"

- id: format-markdown
name: Format Markdown
description: "Format Markdown"
files: ^.*\.md$
types_or: [markdown]
entry: dprint
language: system
args:
- "fmt"

- id: format-yaml
name: Format YAML
description: "Format YAML"
files: ^.*\.(yaml|yml)$
types_or: [yaml]
entry: dprint
language: system
args:
- "fmt"

- id: check-testing-disabled
name: Check testing is disabled
description: "Ensure Package.swift has testing disabled and Package.resolved is not committed"
files: ^(Package\.swift|Package\.resolved)$
entry: .git-hooks/check-testing-disabled.sh
language: script
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.6
3.4.7
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"foxundermoon.shell-format",
"dprint.dprint"
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.defaultFormatter": "dprint.dprint",
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format",
"editor.formatOnSave": true
}
}
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew "tree"
Loading
Loading