Skip to content

Commit acb09bd

Browse files
author
Joe Newton
committed
Initial Commit
0 parents  commit acb09bd

33 files changed

+2931
-0
lines changed

.github/workflows/swift.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: macOS-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Run XCTests
11+
run: |
12+
xcodebuild -scheme "MethodNotificationCenter" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES test
13+
xcodebuild -scheme "MethodNotificationCenter macOS" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test
14+
xcodebuild -scheme "MethodNotificationCenter tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES test
15+
- name: Swift Package Build & Test
16+
run: |
17+
swift build -v
18+
swift test -v --enable-code-coverage
19+
- name: Upload Code Coverage
20+
run: |
21+
xcrun llvm-cov export -format="lcov" .build/debug/MethodNotificationCenterPackageTests.xctest/Contents/MacOS/MethodNotificationCenterPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
22+
bash <(curl https://codecov.io/bash)

.gitignore

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

.swiftlint.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
disabled_rules:
2+
- file_length
3+
- line_length
4+
- type_body_length
5+
- function_body_length
6+
7+
opt_in_rules:
8+
- anyobject_protocol
9+
- array_init
10+
- closure_end_indentation
11+
- closure_spacing
12+
- contains_over_first_not_nil
13+
- discouraged_optional_boolean
14+
- discouraged_optional_collection
15+
- empty_count
16+
- empty_string
17+
- empty_xctest_method
18+
- explicit_init
19+
- fallthrough
20+
- first_where
21+
- force_unwrapping
22+
- function_default_parameter_at_end
23+
- inert_defer
24+
- no_extension_access_modifier
25+
- overridden_super_call
26+
- prohibited_super_call
27+
- redundant_nil_coalescing
28+
- vertical_parameter_alignment_on_call
29+
- pattern_matching_keywords
30+
- fatal_error_message
31+
- implicit_return
32+
- implicitly_unwrapped_optional
33+
- joined_default_parameter
34+
- let_var_whitespace
35+
- literal_expression_end_indentation
36+
- lower_acl_than_parent
37+
- modifier_order
38+
- multiline_arguments
39+
- multiline_function_chains
40+
- multiline_parameters
41+
- multiple_closures_with_trailing_closure
42+
- nesting
43+
- notification_center_detachment
44+
- object_literal
45+
- operator_usage_whitespace
46+
- override_in_extension
47+
- private_action
48+
- private_outlet
49+
- redundant_type_annotation
50+
- single_test_class
51+
- sorted_imports
52+
- sorted_first_last
53+
- trailing_closure
54+
- unavailable_function
55+
- unneeded_parentheses_in_closure_argument
56+
- yoda_condition
57+
58+
reporter: "xcode"
59+
60+
excluded:
61+
- Tests/LinuxMain.swift
62+
- Tests/HalfTests/XCTestManifests.swift
63+
- Tests/CHalfTests/XCTestManifests.swift
64+
65+
identifier_name:
66+
excluded:
67+
- pi
68+
- _value

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 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.

MethodNotificationCenter.podspec

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pod::Spec.new do |s|
2+
3+
s.name = "MethodNotificationCenter"
4+
s.version = "0.1.0"
5+
s.summary = "Simple Objective-C Runtime Injection"
6+
s.description = <<-DESC
7+
A lightweight framework enabling easy snooping on Objective-C methods for iOS, macOS, and tvOS.
8+
DESC
9+
10+
s.homepage = "https://github.com/SomeRandomiOSDev/MethodNotificationCenter"
11+
s.license = "MIT"
12+
s.author = { "Joseph Newton" => "somerandomiosdev@gmail.com" }
13+
14+
s.ios.deployment_target = '11.0'
15+
s.macos.deployment_target = '10.10'
16+
s.tvos.deployment_target = '9.0'
17+
18+
s.source = { :git => "https://github.com/SomeRandomiOSDev/MethodNotificationCenter.git", :tag => s.version.to_s }
19+
s.source_files = 'Sources/**/*.{h,m,s}'
20+
s.swift_versions = ['4.0', '4.2', '5.0']
21+
s.cocoapods_version = '>= 1.7.3'
22+
23+
s.test_spec 'Tests' do |ts|
24+
ts.ios.deployment_target = '11.0'
25+
ts.macos.deployment_target = '10.10'
26+
ts.tvos.deployment_target = '9.0'
27+
28+
ts.source_files = 'Tests/**/*.{m,swift}'
29+
end
30+
31+
end

0 commit comments

Comments
 (0)