Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
BasedOnStyle: WebKit
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: true
AlignEscapedNewlines: Left
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
ColumnLimit: 180
Cpp11BracedListStyle: false
IncludeBlocks: Preserve
IndentWidth: 4
InsertBraces: true
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesInContainerLiterals: false
UseTab: Never

...
43 changes: 37 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [master]
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,17 +13,28 @@ permissions:
contents: read

env:
DEVELOPER_DIR: /Applications/Xcode_26.6.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_27.0.app/Contents/Developer

jobs:
lint:
name: Lint
runs-on: xcode-27
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- run: brew install swiftlint clang-format
- run: ./scripts/lint.sh --check

test:
name: Test ${{ matrix.platform }}
runs-on: macos-26
needs: lint
runs-on: xcode-27
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
platform: [ios-simulator, macos, tvos-simulator]
# Re-add watchos-simulator once https://github.com/actions/runner-images/issues/14946 is fixed.
platform: [ios-simulator, macos, maccatalyst, tvos-simulator, visionos-simulator]
steps:
- uses: actions/checkout@v7
- run: ./scripts/run_unit_tests.sh ${{ matrix.platform }} -retry-tests-on-failure -test-iterations 3
Expand All @@ -35,17 +45,38 @@ jobs:
path: output/*.xcresult
if-no-files-found: ignore

demo:
name: Demo UI tests ${{ matrix.scheme }}
needs: lint
runs-on: xcode-27
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
scheme: [TrustKitDemo-ObjC, TrustKitDemo-Swift]
steps:
- uses: actions/checkout@v7
- run: ./scripts/run_demo_ui_tests.sh ${{ matrix.scheme }} -retry-tests-on-failure -test-iterations 3
- uses: actions/upload-artifact@v7
if: failure()
with:
name: ${{ matrix.scheme }}-ui-tests
path: output/*.xcresult
if-no-files-found: ignore

xcframework:
name: Build XCFramework
runs-on: macos-26
needs: lint
runs-on: xcode-27
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- run: ./scripts/build_xcframework.sh

swift-package:
name: Validate Swift package
runs-on: macos-26
needs: lint
runs-on: xcode-27
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ permissions:
contents: write

env:
DEVELOPER_DIR: /Applications/Xcode_26.6.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_27.0.app/Contents/Developer

jobs:
xcframework:
name: Attach XCFramework
runs-on: macos-26
runs-on: xcode-27
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
Expand Down
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ DerivedData
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/

# Appledoc
html/

Expand Down
2 changes: 1 addition & 1 deletion .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hide_documentation_coverage: true
theme: fullwidth

objc: true
umbrella_header: "TrustKit/TrustKit.h"
umbrella_header: "TrustKit/public/TrustKit/TrustKit.h"
framework_root: "./TrustKit"

readme: "docs/documentation-readme.md"
Expand Down
75 changes: 75 additions & 0 deletions .swift-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"fileScopedDeclarationPrivacy" : {
"accessLevel" : "private"
},
"indentConditionalCompilationBlocks" : true,
"indentSwitchCaseLabels" : false,
"indentation" : {
"spaces" : 4
},
"lineBreakAroundMultilineExpressionChainComponents" : true,
"lineBreakBeforeControlFlowKeywords" : false,
"lineBreakBeforeEachArgument" : true,
"lineBreakBeforeEachGenericRequirement" : true,
"lineBreakBetweenDeclarationAttributes" : false,
"lineLength" : 120,
"maximumBlankLines" : 1,
"multiElementCollectionTrailingCommas" : false,
"noAssignmentInExpressions" : {
"allowedFunctions" : [
"XCTAssertNoThrow"
]
},
"prioritizeKeepingFunctionOutputTogether" : false,
"reflowMultilineStringLiterals" : "never",
"respectsExistingLineBreaks" : true,
"rules" : {
"AllPublicDeclarationsHaveDocumentation" : false,
"AlwaysUseLiteralForEmptyCollectionInit" : false,
"AlwaysUseLowerCamelCase" : false,
"AmbiguousTrailingClosureOverload" : false,
"AvoidRetroactiveConformances" : true,
"BeginDocumentationCommentWithOneLineSummary" : false,
"DoNotUseSemicolons" : true,
"DontRepeatTypeInStaticProperties" : true,
"FileScopedDeclarationPrivacy" : true,
"FullyIndirectEnum" : true,
"GroupNumericLiterals" : true,
"IdentifiersMustBeASCII" : true,
"NeverForceUnwrap" : false,
"NeverUseForceTry" : true,
"NeverUseImplicitlyUnwrappedOptionals" : false,
"NoAccessLevelOnExtensionDeclaration" : false,
"NoAssignmentInExpressions" : true,
"NoBlockComments" : true,
"NoCasesWithOnlyFallthrough" : true,
"NoEmptyLinesOpeningClosingBraces" : false,
"NoEmptyTrailingClosureParentheses" : true,
"NoLabelsInCasePatterns" : true,
"NoLeadingUnderscores" : false,
"NoParensAroundConditions" : true,
"NoPlaygroundLiterals" : true,
"NoVoidReturnOnFunctionSignature" : true,
"OmitExplicitReturns" : true,
"OneCasePerLine" : true,
"OneVariableDeclarationPerLine" : true,
"OnlyOneTrailingClosureArgument" : true,
"OrderedImports" : true,
"ReplaceForEachWithForLoop" : true,
"ReturnVoidInsteadOfEmptyTuple" : true,
"TypeNamesShouldBeCapitalized" : true,
"UseEarlyExits" : true,
"UseExplicitNilCheckInConditions" : true,
"UseLetInEveryBoundCaseVariable" : true,
"UseShorthandTypeNames" : true,
"UseSingleLinePropertyGetter" : true,
"UseSynthesizedInitializer" : true,
"UseTripleSlashForDocumentationComments" : true,
"UseWhereClausesInForLoops" : true,
"ValidateDocumentationComments" : false
},
"spacesAroundRangeFormationOperators" : false,
"spacesBeforeEndOfLineComments" : 2,
"tabWidth" : 4,
"version" : 1
}
18 changes: 18 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
disabled_rules:
- line_length
- file_length
- inclusive_language
- large_tuple
- function_body_length
- type_body_length
- trailing_whitespace # Let swift-format handle whitespace
- vertical_whitespace # Let swift-format handle line breaks
- opening_brace # Let swift-format handle brace placement
- closure_parameter_position # Let swift-format handle closure parameter position

opt_in_rules:
- private_over_fileprivate

excluded:
- output
- .build
18 changes: 0 additions & 18 deletions ATTRIBUTIONS
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
domain-registry-provider - https://code.google.com/p/domain-registry-provider/
------------------------------------------------------------------------------

# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


RSSwizzle - https://github.com/rabovik/RSSwizzle
------------------------------------------------

Expand Down
22 changes: 5 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
The MIT License (MIT)
MIT License

Copyright (c) 2015 Data Theorem, Inc.
Copyright (c) 2026 Data Theorem, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 changes: 16 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
// swift-tools-version:5.3
// swift-tools-version:6.0
import PackageDescription

let package = Package(
name: "TrustKit",
platforms: [
.iOS(.v12),
.macOS(.v10_13),
.tvOS(.v12),
.watchOS(.v4)
.iOS(.v15),
.macOS(.v12),
.macCatalyst(.v15),
.tvOS(.v15),
.watchOS(.v9),
.visionOS(.v1)
],
products: [
.library(
name: "TrustKit",
targets: ["TrustKit"]
),
],
dependencies: [
)
],
dependencies: [],
targets: [
.target(
name: "TrustKit",
path: "TrustKit",
dependencies: ["TrustKitSwift"],
path: "TrustKit",
exclude: ["Swift"],
resources: [.process("PrivacyInfo.xcprivacy")],
publicHeadersPath: "public",
cSettings: [.define("NS_BLOCK_ASSERTIONS", to: "1", .when(configuration: .release))]
),
.target(
name: "TrustKitSwift",
path: "TrustKit/Swift"
)
]
)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
TrustKit
========

[![Build Status](https://github.com/datatheorem/TrustKit/actions/workflows/ci.yml/badge.svg)](https://github.com/datatheorem/TrustKit/actions/workflows/ci.yml) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Version Status](https://img.shields.io/cocoapods/v/TrustKit.svg?style=flat)](https://cocoapods.org/pods/TrustKit) [![Platform](https://img.shields.io/cocoapods/p/TrustKit.svg?style=flat)](https://cocoapods.org/pods/TrustKit) [![License MIT](https://img.shields.io/cocoapods/l/TrustKit.svg?style=flat)](https://en.wikipedia.org/wiki/MIT_License)
[![Build Status](https://github.com/datatheorem/TrustKit/actions/workflows/ci.yml/badge.svg)](https://github.com/datatheorem/TrustKit/actions/workflows/ci.yml) [![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-4BC51D.svg?style=flat)](https://www.swift.org/documentation/package-manager/) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Version Status](https://img.shields.io/github/v/release/datatheorem/TrustKit.svg?style=flat)](https://github.com/datatheorem/TrustKit/releases) [![License MIT](https://img.shields.io/github/license/datatheorem/TrustKit.svg?style=flat)](https://en.wikipedia.org/wiki/MIT_License)
[![Gitter chat](https://badges.gitter.im/datatheorem/gitter.png)](https://gitter.im/TrustKit/Lobby)

**TrustKit** is an open source framework that makes it easy to deploy SSL public key pinning and reporting in any iOS 12+, macOS 10.13+, tvOS 12+ or watchOS 4+ App; it supports both Swift and Objective-C Apps.
**TrustKit** is an open source framework that makes it easy to deploy SSL public key pinning and reporting in any iOS 15+, macOS 12+, Mac Catalyst 15+, tvOS 15+, watchOS 9+ or visionOS 1+ App; it supports both Swift and Objective-C Apps.

If you need SSL pinning/reporting in your Android App. we have also released **TrustKit for Android** at [https://github.com/datatheorem/TrustKit-Android](https://github.com/datatheorem/TrustKit-Android).

Expand Down
22 changes: 0 additions & 22 deletions TrustKit.podspec

This file was deleted.

Loading