Latest 1.3.1
Homepage https://github.com/zixun/AppSwizzle
License MIT
Platforms ios 8.0
Authors

Swift 4.0+
Platform
MIT

Context

This library is derived from the GodEye project which can automaticly disply Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code. Just like god opened his eyes

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

CocoaPods

AppSwizzle is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "AppSwizzle"

Carthage

Or, if you’re using Carthage, add SwViewCapture to your Cartfile:

github "zixun/AppSwizzle"

Usage

Swizzle Instance Method

let orig = #selector(AppSwizzleTests.origSelector_testSwizzleInstanceMethod)
let alter = #selector(AppSwizzleTests.alterSelector_testSwizzleInstanceMethod)
AppSwizzleTests.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter)

Swizzle Class Method

let orig = #selector(AppSwizzleTests.origSelector_testSwizzleClassMethod)
let alter = #selector(AppSwizzleTests.alterSelector_testSwizzleClassMethod)
AppSwizzleTests.swizzleClassMethod(origSelector: orig, toAlterSelector: alter)

Swizzle Instance Method To Alter Class

let orig = #selector(AppSwizzleTests.origSelector_testSwizzleInstanceMethodToAlterClass)
let alter = #selector(OtherClass.alterSelector_testSwizzleInstanceMethodToAlterClass)
AppSwizzleTests.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter, inAlterClass: OtherClass.classForCoder())

Swizzle Class Method To Alter Class

let orig = #selector(AppSwizzleTests.origSelector_testSwizzleClassMethodToAlterClass)
let alter = #selector(OtherClass.alterSelector_testSwizzleClassMethodToAlterClass)
AppSwizzleTests.swizzleClassMethod(origSelector: orig, toAlterSelector: alter, inAlterClass: OtherClass.classForCoder())

Author

name: 陈奕龙

twitter: @zixun_

email: [email protected]

github: zixun

blog: 子循(SubCycle)

License

AppSwizzle is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AppSwizzle",
    "version": "1.3.1",
    "summary": "lightweight and flexible method swizzling wrapped by swift.",
    "description": "Lightweight and flexible method swizzling wrapped by swift. enjoy it!",
    "homepage": "https://github.com/zixun/AppSwizzle",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u9648u5955u9f99": "[email protected]"
    },
    "source": {
        "git": "https://github.com/zixun/AppSwizzle.git",
        "tag": "1.3.1"
    },
    "social_media_url": "https://twitter.com/zixun_",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "AppSwizzle/Classes/**/*"
}

Pin It on Pinterest

Share This