Skip to content

Commit 1c34d26

Browse files
author
Joe Newton
committed
Initial commit
0 parents  commit 1c34d26

34 files changed

+10434
-0
lines changed

.github/workflows/cocoapods.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Cocoapods
2+
on: [pull_request, push]
3+
4+
jobs:
5+
build:
6+
runs-on: macOS-latest
7+
steps:
8+
- name: Checkout Code
9+
uses: actions/checkout@v2
10+
11+
- name: Setup Cocoapods
12+
uses: maxim-lobanov/setup-cocoapods@v1
13+
with:
14+
version: latest
15+
16+
- name: Lint
17+
run: |
18+
pod lib lint
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Swift Package
2+
on: [pull_request, push]
3+
4+
jobs:
5+
build:
6+
runs-on: macOS-latest
7+
steps:
8+
- name: Checkout Code
9+
uses: actions/checkout@v2
10+
11+
- name: Build
12+
run: |
13+
swift --version
14+
swift build -v
15+
16+
- name: Test
17+
run: |
18+
swift test -v --enable-code-coverage
19+
20+
- name: Generate Code Coverage File
21+
run: |
22+
xcrun llvm-cov export --instr-profile=.build/x86_64-apple-macosx/debug/codecov/default.profdata .build/x86_64-apple-macosx/debug/ProtocolProxyPackageTests.xctest/Contents/MacOS/ProtocolProxyPackageTests > ./info.lcov
23+
24+
- name: Upload Code Coverage
25+
uses: codecov/codecov-action@v1
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
file: ./info.lcov
29+
verbose: true

.github/workflows/xcodebuild.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Xcode Project
2+
on: [pull_request, push]
3+
4+
jobs:
5+
build:
6+
runs-on: macOS-latest
7+
steps:
8+
- name: Checkout Code
9+
uses: actions/checkout@v2
10+
11+
- name: Build iOS
12+
run: |
13+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -sdk iphoneos -configuration Debug ONLY_ACTIVE_ARCH=YES
14+
15+
- name: Build iOS Simulator
16+
run: |
17+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -sdk iphonesimulator -configuration Debug ONLY_ACTIVE_ARCH=YES
18+
19+
- name: Test iOS Simulator
20+
run: |
21+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES test
22+
23+
- name: Build Mac Catalyst
24+
run: |
25+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -sdk macosx -configuration Debug ONLY_ACTIVE_ARCH=YES
26+
27+
- name: Test Mac Catalyst
28+
run: |
29+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test
30+
31+
- name: Build macOS
32+
run: |
33+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES
34+
35+
- name: Test macOS
36+
run: |
37+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test
38+
39+
- name: Build tvOS
40+
run: |
41+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -sdk appletvos -configuration Debug ONLY_ACTIVE_ARCH=YES
42+
43+
- name: Build tvOS Simulator
44+
run: |
45+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -sdk appletvsimulator -configuration Debug ONLY_ACTIVE_ARCH=YES
46+
47+
- name: Test tvOS Simulator
48+
run: |
49+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES test
50+
51+
- name: Build watchOS
52+
run: |
53+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy watchOS" -sdk watchos -configuration Debug
54+
55+
- name: Build watchOS Simulator
56+
run: |
57+
xcodebuild -project ProtocolProxy.xcodeproj -scheme "ProtocolProxy watchOS" -sdk watchsimulator -configuration Debug

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ProtocolProxy.xcodeproj/project.xcworkspace
2+
ProtocolProxy.xcodeproj/xcuserdata
3+
4+
.build
5+
.swiftpm

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright © 2020 Joseph Newton <somerandomiosdev@gmail.com>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

Package.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// swift-tools-version:5.0
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "ProtocolProxy",
6+
7+
platforms: [
8+
.iOS("9.0"),
9+
.macOS("10.10"),
10+
.tvOS("9.0"),
11+
.watchOS("2.0")
12+
],
13+
14+
products: [
15+
.library(name: "ProtocolProxy", targets: ["ProtocolProxy", "ProtocolProxySwift"]),
16+
],
17+
18+
targets: [
19+
.target(name: "ProtocolProxy"),
20+
.target(name: "ProtocolProxySwift", dependencies: ["ProtocolProxy"]),
21+
22+
.target(name: "ProtocolProxyTestsBase", path: "Tests/ProtocolProxyTestsBase"),
23+
.testTarget(name: "ProtocolProxyObjCTests", dependencies: ["ProtocolProxy", "ProtocolProxySwift", "ProtocolProxyTestsBase"]),
24+
.testTarget(name: "ProtocolProxySwiftTests", dependencies: ["ProtocolProxy", "ProtocolProxySwift", "ProtocolProxyTestsBase"])
25+
]
26+
)

Plists/ProtocolProxy-Info.plist

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>$(CURRENT_PROJECT_VERSION)</string>
21+
</dict>
22+
</plist>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>${EXECUTABLE_NAME}</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundlePackageType</key>
14+
<string>BNDL</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleSignature</key>
18+
<string>????</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
</dict>
22+
</plist>

ProtocolProxy.podspec

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Pod::Spec.new do |s|
2+
3+
s.name = "ProtocolProxy"
4+
s.version = "0.1.0"
5+
s.summary = "Flexible proxy for overriding and observing protocol method/property messages"
6+
s.description = <<-DESC
7+
A small helper library that provides a proxy class for overriding and observing method and property messages from one or more protocols
8+
DESC
9+
10+
s.homepage = "https://github.com/SomeRandomiOSDev/ProtocolProxy"
11+
s.license = "MIT"
12+
s.author = { "Joseph Newton" => "somerandomiosdev@gmail.com" }
13+
14+
s.ios.deployment_target = '9.0'
15+
s.macos.deployment_target = '10.10'
16+
s.tvos.deployment_target = '9.0'
17+
s.watchos.deployment_target = '2.0'
18+
19+
s.source = { :git => "https://github.com/SomeRandomiOSDev/ProtocolProxy.git", :tag => s.version.to_s }
20+
21+
s.public_header_files = 'Sources/ProtocolProxy/include/ProtocolProxy.h'
22+
s.source_files = 'Sources/ProtocolProxy/**/*.{h,m,swift}', 'Sources/ProtocolProxySwift/**/*.swift'
23+
s.frameworks = 'Foundation'
24+
s.requires_arc = true
25+
26+
s.swift_versions = ['5.0']
27+
s.cocoapods_version = '>= 1.7.3'
28+
29+
end

0 commit comments

Comments
 (0)