Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Newton committed Mar 10, 2020
0 parents commit acb09bd
Show file tree
Hide file tree
Showing 33 changed files with 2,931 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build

on: [push, pull_request]

jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Run XCTests
run: |
xcodebuild -scheme "MethodNotificationCenter" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max" -configuration Debug ONLY_ACTIVE_ARCH=YES test
xcodebuild -scheme "MethodNotificationCenter macOS" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=YES test
xcodebuild -scheme "MethodNotificationCenter tvOS" -destination "platform=tvOS Simulator,name=Apple TV 4K" -configuration Debug ONLY_ACTIVE_ARCH=YES test
- name: Swift Package Build & Test
run: |
swift build -v
swift test -v --enable-code-coverage
- name: Upload Code Coverage
run: |
xcrun llvm-cov export -format="lcov" .build/debug/MethodNotificationCenterPackageTests.xctest/Contents/MacOS/MethodNotificationCenterPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
bash <(curl https://codecov.io/bash)
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.swiftpm
IDEWorkspaceChecks.plist
MethodNotificationCenter.xcodeproj/project.xcworkspace/xcuserdata
MethodNotificationCenter.xcodeproj/xcuserdata
68 changes: 68 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
disabled_rules:
- file_length
- line_length
- type_body_length
- function_body_length

opt_in_rules:
- anyobject_protocol
- array_init
- closure_end_indentation
- closure_spacing
- contains_over_first_not_nil
- discouraged_optional_boolean
- discouraged_optional_collection
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- fallthrough
- first_where
- force_unwrapping
- function_default_parameter_at_end
- inert_defer
- no_extension_access_modifier
- overridden_super_call
- prohibited_super_call
- redundant_nil_coalescing
- vertical_parameter_alignment_on_call
- pattern_matching_keywords
- fatal_error_message
- implicit_return
- implicitly_unwrapped_optional
- joined_default_parameter
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- multiline_function_chains
- multiline_parameters
- multiple_closures_with_trailing_closure
- nesting
- notification_center_detachment
- object_literal
- operator_usage_whitespace
- override_in_extension
- private_action
- private_outlet
- redundant_type_annotation
- single_test_class
- sorted_imports
- sorted_first_last
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- yoda_condition

reporter: "xcode"

excluded:
- Tests/LinuxMain.swift
- Tests/HalfTests/XCTestManifests.swift
- Tests/CHalfTests/XCTestManifests.swift

identifier_name:
excluded:
- pi
- _value
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2020 Joseph Newton <somerandomiosdev@gmail.com>

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 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.
31 changes: 31 additions & 0 deletions MethodNotificationCenter.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Pod::Spec.new do |s|

s.name = "MethodNotificationCenter"
s.version = "0.1.0"
s.summary = "Simple Objective-C Runtime Injection"
s.description = <<-DESC
A lightweight framework enabling easy snooping on Objective-C methods for iOS, macOS, and tvOS.
DESC

s.homepage = "https://github.com/SomeRandomiOSDev/MethodNotificationCenter"
s.license = "MIT"
s.author = { "Joseph Newton" => "somerandomiosdev@gmail.com" }

s.ios.deployment_target = '11.0'
s.macos.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'

s.source = { :git => "https://github.com/SomeRandomiOSDev/MethodNotificationCenter.git", :tag => s.version.to_s }
s.source_files = 'Sources/**/*.{h,m,s}'
s.swift_versions = ['4.0', '4.2', '5.0']
s.cocoapods_version = '>= 1.7.3'

s.test_spec 'Tests' do |ts|
ts.ios.deployment_target = '11.0'
ts.macos.deployment_target = '10.10'
ts.tvos.deployment_target = '9.0'

ts.source_files = 'Tests/**/*.{m,swift}'
end

end

0 comments on commit acb09bd

Please sign in to comment.