├── .gitignore ├── .swift-version ├── Cartfile ├── Cartfile.resolved ├── Carthage └── Checkouts │ └── AppSwizzle │ ├── .gitignore │ ├── .swift-version │ ├── AppSwizzle.podspec │ ├── AppSwizzle │ ├── Assets │ │ └── .gitkeep │ └── Classes │ │ ├── .gitkeep │ │ └── AppSwizzle.swift │ ├── Example │ ├── AppSwizzle.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── AppSwizzle.xcscmblueprint │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── AppSwizzle-Example.xcscheme │ │ │ └── AppSwizzle.xcscheme │ ├── AppSwizzle.xcworkspace │ │ └── contents.xcworkspacedata │ ├── AppSwizzle │ │ ├── AppSwizzle.h │ │ └── Info.plist │ ├── Podfile │ ├── Podfile.lock │ └── Tests │ │ ├── AppSwizzleTests.swift │ │ └── Info.plist │ ├── LICENSE │ ├── README.md │ └── _Pods.xcodeproj ├── Example ├── LeakEye.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── LeakEye.xcscmblueprint │ └── xcshareddata │ │ └── xcschemes │ │ ├── LeakEye-Example.xcscheme │ │ └── LeakEye.xcscheme ├── LeakEye.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── LeakEye.xcscmblueprint ├── LeakEye │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── LeakEye.h │ ├── SecondViewController.swift │ └── ViewController.swift ├── Podfile ├── Podfile.lock └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── LeakEye.podspec ├── LeakEye └── Classes │ ├── Agent │ └── ObjectAgent.swift │ ├── LeakEye.swift │ ├── Monitor │ ├── NSObject+Alive.swift │ ├── NSObject+Eye.swift │ └── Preparer.swift │ ├── NSNotification+LeakEye.swift │ ├── Util │ ├── DispatchQueue+.swift │ └── String+.swift │ └── Variable.swift ├── README.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "zixun/AppSwizzle" >= 1.3.1 -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "zixun/AppSwizzle" "1.3.1" 2 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/AppSwizzle.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint AppSwizzle.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'AppSwizzle' 11 | s.version = '1.3.1' 12 | s.summary = 'lightweight and flexible method swizzling wrapped by swift.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | Lightweight and flexible method swizzling wrapped by swift. enjoy it! 22 | DESC 23 | 24 | s.homepage = 'https://github.com/zixun/AppSwizzle' 25 | s.license = { :type => 'MIT', :file => 'LICENSE' } 26 | s.author = { '陈奕龙' => 'chenyl.exe@gmail.com' } 27 | s.source = { :git => 'https://github.com/zixun/AppSwizzle.git', :tag => s.version.to_s } 28 | s.social_media_url = 'https://twitter.com/zixun_' 29 | 30 | s.ios.deployment_target = '8.0' 31 | 32 | s.source_files = 'AppSwizzle/Classes/**/*' 33 | end 34 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/AppSwizzle/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zixun/LeakEye/bebc6a08b56520bc72d060a4ec20d03ec5e6df2c/Carthage/Checkouts/AppSwizzle/AppSwizzle/Assets/.gitkeep -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/AppSwizzle/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zixun/LeakEye/bebc6a08b56520bc72d060a4ec20d03ec5e6df2c/Carthage/Checkouts/AppSwizzle/AppSwizzle/Classes/.gitkeep -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/AppSwizzle/Classes/AppSwizzle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppSwizzle.swift 3 | // Pods 4 | // 5 | // Created by zixun on 2016/11/27. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | import ObjectiveC 12 | 13 | public enum SwizzleResult { 14 | case Succeed 15 | case OriginMethodNotFound 16 | case AlternateMethodNotFound 17 | } 18 | 19 | public extension NSObject { 20 | 21 | public class func swizzleInstanceMethod(origSelector: Selector, 22 | toAlterSelector alterSelector: Selector) -> SwizzleResult { 23 | return self.swizzleMethod(origSelector: origSelector, 24 | toAlterSelector: alterSelector, 25 | inAlterClass: self.classForCoder(), 26 | isClassMethod: false) 27 | } 28 | 29 | public class func swizzleClassMethod(origSelector: Selector, 30 | toAlterSelector alterSelector: Selector) -> SwizzleResult { 31 | return self.swizzleMethod(origSelector: origSelector, 32 | toAlterSelector: alterSelector, 33 | inAlterClass: self.classForCoder(), 34 | isClassMethod: true) 35 | } 36 | 37 | 38 | public class func swizzleInstanceMethod(origSelector: Selector, 39 | toAlterSelector alterSelector: Selector, 40 | inAlterClass alterClass: AnyClass) -> SwizzleResult { 41 | return self.swizzleMethod(origSelector: origSelector, 42 | toAlterSelector: alterSelector, 43 | inAlterClass: alterClass, 44 | isClassMethod: false) 45 | } 46 | 47 | public class func swizzleClassMethod(origSelector: Selector, 48 | toAlterSelector alterSelector: Selector, 49 | inAlterClass alterClass: AnyClass) -> SwizzleResult { 50 | return self.swizzleMethod(origSelector: origSelector, 51 | toAlterSelector: alterSelector, 52 | inAlterClass: alterClass, 53 | isClassMethod: true) 54 | } 55 | 56 | 57 | private class func swizzleMethod(origSelector: Selector, 58 | toAlterSelector alterSelector: Selector!, 59 | inAlterClass alterClass: AnyClass!, 60 | isClassMethod:Bool) -> SwizzleResult { 61 | 62 | var alterClass: AnyClass? = alterClass 63 | var origClass: AnyClass = self.classForCoder() 64 | if isClassMethod { 65 | alterClass = object_getClass(alterClass) 66 | guard let _class = object_getClass(self.classForCoder()) else { 67 | return .OriginMethodNotFound 68 | } 69 | origClass = _class 70 | } 71 | 72 | return SwizzleMethod(origClass: origClass, origSelector: origSelector, toAlterSelector: alterSelector, inAlterClass: alterClass) 73 | } 74 | } 75 | 76 | 77 | private func SwizzleMethod(origClass:AnyClass!,origSelector: Selector,toAlterSelector alterSelector: Selector!,inAlterClass alterClass: AnyClass!) -> SwizzleResult{ 78 | 79 | guard let origMethod: Method = class_getInstanceMethod(origClass, origSelector) else { 80 | return SwizzleResult.OriginMethodNotFound 81 | } 82 | 83 | guard let altMethod: Method = class_getInstanceMethod(alterClass, alterSelector) else { 84 | return SwizzleResult.AlternateMethodNotFound 85 | } 86 | 87 | 88 | 89 | _ = class_addMethod(origClass, 90 | origSelector,method_getImplementation(origMethod), 91 | method_getTypeEncoding(origMethod)) 92 | 93 | 94 | _ = class_addMethod(alterClass, 95 | alterSelector,method_getImplementation(altMethod), 96 | method_getTypeEncoding(altMethod)) 97 | 98 | method_exchangeImplementations(origMethod, altMethod) 99 | 100 | return SwizzleResult.Succeed 101 | 102 | } 103 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACEC1AFB9204008FA782 /* AppSwizzleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* AppSwizzleTests.swift */; }; 11 | 9E24F9D91E7FB91A001AD0D7 /* AppSwizzle.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E24F9D71E7FB91A001AD0D7 /* AppSwizzle.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 9E24F9E01E7FB92D001AD0D7 /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = 9E24F9DE1E7FB92D001AD0D7 /* .gitkeep */; }; 13 | 9E24F9E11E7FB92D001AD0D7 /* AppSwizzle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24F9DF1E7FB92D001AD0D7 /* AppSwizzle.swift */; }; 14 | 9EFFB71B24C66DC6A7F031F7 /* Pods_AppSwizzle_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 491CD07646A3DE1A3E69F9D1 /* Pods_AppSwizzle_Tests.framework */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | 2E3BA46813095DB970DC7076 /* Pods-AppSwizzle_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppSwizzle_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AppSwizzle_Tests/Pods-AppSwizzle_Tests.release.xcconfig"; sourceTree = ""; }; 19 | 491CD07646A3DE1A3E69F9D1 /* Pods_AppSwizzle_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AppSwizzle_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 607FACE51AFB9204008FA782 /* AppSwizzle_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppSwizzle_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 22 | 607FACEB1AFB9204008FA782 /* AppSwizzleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppSwizzleTests.swift; sourceTree = ""; }; 23 | 89AFF071BC9E704AA1C37D55 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 24 | 9E24F9D51E7FB91A001AD0D7 /* AppSwizzle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppSwizzle.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | 9E24F9D71E7FB91A001AD0D7 /* AppSwizzle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppSwizzle.h; sourceTree = ""; }; 26 | 9E24F9D81E7FB91A001AD0D7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | 9E24F9DE1E7FB92D001AD0D7 /* .gitkeep */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; 28 | 9E24F9DF1E7FB92D001AD0D7 /* AppSwizzle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppSwizzle.swift; sourceTree = ""; }; 29 | E26F9D2C0E0879A1F36DBA49 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 30 | E2A536F5AEFAB64066837735 /* AppSwizzle.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = AppSwizzle.podspec; path = ../AppSwizzle.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 31 | EF9F0C8A4C454C95207FD5A2 /* Pods-AppSwizzle_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppSwizzle_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AppSwizzle_Tests/Pods-AppSwizzle_Tests.debug.xcconfig"; sourceTree = ""; }; 32 | /* End PBXFileReference section */ 33 | 34 | /* Begin PBXFrameworksBuildPhase section */ 35 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 36 | isa = PBXFrameworksBuildPhase; 37 | buildActionMask = 2147483647; 38 | files = ( 39 | 9EFFB71B24C66DC6A7F031F7 /* Pods_AppSwizzle_Tests.framework in Frameworks */, 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | 9E24F9D11E7FB91A001AD0D7 /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | /* End PBXFrameworksBuildPhase section */ 51 | 52 | /* Begin PBXGroup section */ 53 | 148CFF5A86E94370A2FFA6EB /* Frameworks */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 491CD07646A3DE1A3E69F9D1 /* Pods_AppSwizzle_Tests.framework */, 57 | ); 58 | name = Frameworks; 59 | sourceTree = ""; 60 | }; 61 | 607FACC71AFB9204008FA782 = { 62 | isa = PBXGroup; 63 | children = ( 64 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 65 | 607FACE81AFB9204008FA782 /* Tests */, 66 | 9E24F9D61E7FB91A001AD0D7 /* AppSwizzle */, 67 | 607FACD11AFB9204008FA782 /* Products */, 68 | 95CAC9C1BE74BBFAF93AD32F /* Pods */, 69 | 148CFF5A86E94370A2FFA6EB /* Frameworks */, 70 | ); 71 | sourceTree = ""; 72 | }; 73 | 607FACD11AFB9204008FA782 /* Products */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 607FACE51AFB9204008FA782 /* AppSwizzle_Tests.xctest */, 77 | 9E24F9D51E7FB91A001AD0D7 /* AppSwizzle.framework */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | 607FACE81AFB9204008FA782 /* Tests */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 607FACEB1AFB9204008FA782 /* AppSwizzleTests.swift */, 86 | 607FACE91AFB9204008FA782 /* Supporting Files */, 87 | ); 88 | path = Tests; 89 | sourceTree = ""; 90 | }; 91 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 607FACEA1AFB9204008FA782 /* Info.plist */, 95 | ); 96 | name = "Supporting Files"; 97 | sourceTree = ""; 98 | }; 99 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | E2A536F5AEFAB64066837735 /* AppSwizzle.podspec */, 103 | 89AFF071BC9E704AA1C37D55 /* README.md */, 104 | E26F9D2C0E0879A1F36DBA49 /* LICENSE */, 105 | ); 106 | name = "Podspec Metadata"; 107 | sourceTree = ""; 108 | }; 109 | 95CAC9C1BE74BBFAF93AD32F /* Pods */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | EF9F0C8A4C454C95207FD5A2 /* Pods-AppSwizzle_Tests.debug.xcconfig */, 113 | 2E3BA46813095DB970DC7076 /* Pods-AppSwizzle_Tests.release.xcconfig */, 114 | ); 115 | name = Pods; 116 | sourceTree = ""; 117 | }; 118 | 9E24F9D61E7FB91A001AD0D7 /* AppSwizzle */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 9E24F9DD1E7FB92D001AD0D7 /* Classes */, 122 | 9E24F9D71E7FB91A001AD0D7 /* AppSwizzle.h */, 123 | 9E24F9D81E7FB91A001AD0D7 /* Info.plist */, 124 | ); 125 | path = AppSwizzle; 126 | sourceTree = ""; 127 | }; 128 | 9E24F9DD1E7FB92D001AD0D7 /* Classes */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 9E24F9DE1E7FB92D001AD0D7 /* .gitkeep */, 132 | 9E24F9DF1E7FB92D001AD0D7 /* AppSwizzle.swift */, 133 | ); 134 | name = Classes; 135 | path = ../../AppSwizzle/Classes; 136 | sourceTree = ""; 137 | }; 138 | /* End PBXGroup section */ 139 | 140 | /* Begin PBXHeadersBuildPhase section */ 141 | 9E24F9D21E7FB91A001AD0D7 /* Headers */ = { 142 | isa = PBXHeadersBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | 9E24F9D91E7FB91A001AD0D7 /* AppSwizzle.h in Headers */, 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXHeadersBuildPhase section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | 607FACE41AFB9204008FA782 /* AppSwizzle_Tests */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "AppSwizzle_Tests" */; 155 | buildPhases = ( 156 | 7A1970CC11A178F2524BAA27 /* [CP] Check Pods Manifest.lock */, 157 | 607FACE11AFB9204008FA782 /* Sources */, 158 | 607FACE21AFB9204008FA782 /* Frameworks */, 159 | 607FACE31AFB9204008FA782 /* Resources */, 160 | C1AA5E9370E2274451F9FA64 /* [CP] Embed Pods Frameworks */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | ); 166 | name = AppSwizzle_Tests; 167 | productName = Tests; 168 | productReference = 607FACE51AFB9204008FA782 /* AppSwizzle_Tests.xctest */; 169 | productType = "com.apple.product-type.bundle.unit-test"; 170 | }; 171 | 9E24F9D41E7FB91A001AD0D7 /* AppSwizzle */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = 9E24F9DC1E7FB91A001AD0D7 /* Build configuration list for PBXNativeTarget "AppSwizzle" */; 174 | buildPhases = ( 175 | 9E24F9D01E7FB91A001AD0D7 /* Sources */, 176 | 9E24F9D11E7FB91A001AD0D7 /* Frameworks */, 177 | 9E24F9D21E7FB91A001AD0D7 /* Headers */, 178 | 9E24F9D31E7FB91A001AD0D7 /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | ); 184 | name = AppSwizzle; 185 | productName = AppSwizzle; 186 | productReference = 9E24F9D51E7FB91A001AD0D7 /* AppSwizzle.framework */; 187 | productType = "com.apple.product-type.framework"; 188 | }; 189 | /* End PBXNativeTarget section */ 190 | 191 | /* Begin PBXProject section */ 192 | 607FACC81AFB9204008FA782 /* Project object */ = { 193 | isa = PBXProject; 194 | attributes = { 195 | LastSwiftUpdateCheck = 0720; 196 | LastUpgradeCheck = 0900; 197 | ORGANIZATIONNAME = CocoaPods; 198 | TargetAttributes = { 199 | 607FACE41AFB9204008FA782 = { 200 | CreatedOnToolsVersion = 6.3.1; 201 | LastSwiftMigration = 0800; 202 | TestTargetID = 607FACCF1AFB9204008FA782; 203 | }; 204 | 9E24F9D41E7FB91A001AD0D7 = { 205 | CreatedOnToolsVersion = 8.2.1; 206 | DevelopmentTeam = L35WZWVC98; 207 | LastSwiftMigration = 0920; 208 | ProvisioningStyle = Automatic; 209 | }; 210 | }; 211 | }; 212 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "AppSwizzle" */; 213 | compatibilityVersion = "Xcode 3.2"; 214 | developmentRegion = English; 215 | hasScannedForEncodings = 0; 216 | knownRegions = ( 217 | en, 218 | Base, 219 | ); 220 | mainGroup = 607FACC71AFB9204008FA782; 221 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 222 | projectDirPath = ""; 223 | projectRoot = ""; 224 | targets = ( 225 | 607FACE41AFB9204008FA782 /* AppSwizzle_Tests */, 226 | 9E24F9D41E7FB91A001AD0D7 /* AppSwizzle */, 227 | ); 228 | }; 229 | /* End PBXProject section */ 230 | 231 | /* Begin PBXResourcesBuildPhase section */ 232 | 607FACE31AFB9204008FA782 /* Resources */ = { 233 | isa = PBXResourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | 9E24F9D31E7FB91A001AD0D7 /* Resources */ = { 240 | isa = PBXResourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 9E24F9E01E7FB92D001AD0D7 /* .gitkeep in Resources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | /* End PBXResourcesBuildPhase section */ 248 | 249 | /* Begin PBXShellScriptBuildPhase section */ 250 | 7A1970CC11A178F2524BAA27 /* [CP] Check Pods Manifest.lock */ = { 251 | isa = PBXShellScriptBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | ); 255 | inputPaths = ( 256 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 257 | "${PODS_ROOT}/Manifest.lock", 258 | ); 259 | name = "[CP] Check Pods Manifest.lock"; 260 | outputPaths = ( 261 | "$(DERIVED_FILE_DIR)/Pods-AppSwizzle_Tests-checkManifestLockResult.txt", 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | shellPath = /bin/sh; 265 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 266 | showEnvVarsInLog = 0; 267 | }; 268 | C1AA5E9370E2274451F9FA64 /* [CP] Embed Pods Frameworks */ = { 269 | isa = PBXShellScriptBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | ); 273 | inputPaths = ( 274 | "${SRCROOT}/Pods/Target Support Files/Pods-AppSwizzle_Tests/Pods-AppSwizzle_Tests-frameworks.sh", 275 | "${BUILT_PRODUCTS_DIR}/AppSwizzle/AppSwizzle.framework", 276 | ); 277 | name = "[CP] Embed Pods Frameworks"; 278 | outputPaths = ( 279 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppSwizzle.framework", 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | shellPath = /bin/sh; 283 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AppSwizzle_Tests/Pods-AppSwizzle_Tests-frameworks.sh\"\n"; 284 | showEnvVarsInLog = 0; 285 | }; 286 | /* End PBXShellScriptBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | 607FACE11AFB9204008FA782 /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | 607FACEC1AFB9204008FA782 /* AppSwizzleTests.swift in Sources */, 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | 9E24F9D01E7FB91A001AD0D7 /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | 9E24F9E11E7FB92D001AD0D7 /* AppSwizzle.swift in Sources */, 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | /* End PBXSourcesBuildPhase section */ 306 | 307 | /* Begin XCBuildConfiguration section */ 308 | 607FACED1AFB9204008FA782 /* Debug */ = { 309 | isa = XCBuildConfiguration; 310 | buildSettings = { 311 | ALWAYS_SEARCH_USER_PATHS = NO; 312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 313 | CLANG_CXX_LIBRARY = "libc++"; 314 | CLANG_ENABLE_MODULES = YES; 315 | CLANG_ENABLE_OBJC_ARC = YES; 316 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 317 | CLANG_WARN_BOOL_CONVERSION = YES; 318 | CLANG_WARN_COMMA = YES; 319 | CLANG_WARN_CONSTANT_CONVERSION = YES; 320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 321 | CLANG_WARN_EMPTY_BODY = YES; 322 | CLANG_WARN_ENUM_CONVERSION = YES; 323 | CLANG_WARN_INFINITE_RECURSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 327 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 328 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 329 | CLANG_WARN_STRICT_PROTOTYPES = YES; 330 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 331 | CLANG_WARN_UNREACHABLE_CODE = YES; 332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 334 | COPY_PHASE_STRIP = NO; 335 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | ENABLE_TESTABILITY = YES; 338 | GCC_C_LANGUAGE_STANDARD = gnu99; 339 | GCC_DYNAMIC_NO_PIC = NO; 340 | GCC_NO_COMMON_BLOCKS = YES; 341 | GCC_OPTIMIZATION_LEVEL = 0; 342 | GCC_PREPROCESSOR_DEFINITIONS = ( 343 | "DEBUG=1", 344 | "$(inherited)", 345 | ); 346 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 354 | MTL_ENABLE_DEBUG_INFO = YES; 355 | ONLY_ACTIVE_ARCH = YES; 356 | SDKROOT = iphoneos; 357 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 358 | }; 359 | name = Debug; 360 | }; 361 | 607FACEE1AFB9204008FA782 /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ALWAYS_SEARCH_USER_PATHS = NO; 365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 366 | CLANG_CXX_LIBRARY = "libc++"; 367 | CLANG_ENABLE_MODULES = YES; 368 | CLANG_ENABLE_OBJC_ARC = YES; 369 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 370 | CLANG_WARN_BOOL_CONVERSION = YES; 371 | CLANG_WARN_COMMA = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 374 | CLANG_WARN_EMPTY_BODY = YES; 375 | CLANG_WARN_ENUM_CONVERSION = YES; 376 | CLANG_WARN_INFINITE_RECURSION = YES; 377 | CLANG_WARN_INT_CONVERSION = YES; 378 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 380 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 381 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 382 | CLANG_WARN_STRICT_PROTOTYPES = YES; 383 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 384 | CLANG_WARN_UNREACHABLE_CODE = YES; 385 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 386 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 387 | COPY_PHASE_STRIP = NO; 388 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 389 | ENABLE_NS_ASSERTIONS = NO; 390 | ENABLE_STRICT_OBJC_MSGSEND = YES; 391 | GCC_C_LANGUAGE_STANDARD = gnu99; 392 | GCC_NO_COMMON_BLOCKS = YES; 393 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 394 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 395 | GCC_WARN_UNDECLARED_SELECTOR = YES; 396 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 397 | GCC_WARN_UNUSED_FUNCTION = YES; 398 | GCC_WARN_UNUSED_VARIABLE = YES; 399 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 400 | MTL_ENABLE_DEBUG_INFO = NO; 401 | SDKROOT = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | VALIDATE_PRODUCT = YES; 404 | }; 405 | name = Release; 406 | }; 407 | 607FACF31AFB9204008FA782 /* Debug */ = { 408 | isa = XCBuildConfiguration; 409 | baseConfigurationReference = EF9F0C8A4C454C95207FD5A2 /* Pods-AppSwizzle_Tests.debug.xcconfig */; 410 | buildSettings = { 411 | FRAMEWORK_SEARCH_PATHS = ( 412 | "$(SDKROOT)/Developer/Library/Frameworks", 413 | "$(inherited)", 414 | ); 415 | GCC_PREPROCESSOR_DEFINITIONS = ( 416 | "DEBUG=1", 417 | "$(inherited)", 418 | ); 419 | INFOPLIST_FILE = Tests/Info.plist; 420 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; 421 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 422 | PRODUCT_NAME = "$(TARGET_NAME)"; 423 | SWIFT_VERSION = 4.0; 424 | }; 425 | name = Debug; 426 | }; 427 | 607FACF41AFB9204008FA782 /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 2E3BA46813095DB970DC7076 /* Pods-AppSwizzle_Tests.release.xcconfig */; 430 | buildSettings = { 431 | FRAMEWORK_SEARCH_PATHS = ( 432 | "$(SDKROOT)/Developer/Library/Frameworks", 433 | "$(inherited)", 434 | ); 435 | INFOPLIST_FILE = Tests/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)"; 437 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_VERSION = 4.0; 440 | }; 441 | name = Release; 442 | }; 443 | 9E24F9DA1E7FB91A001AD0D7 /* Debug */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | CLANG_ANALYZER_NONNULL = YES; 447 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 448 | CLANG_WARN_INFINITE_RECURSION = YES; 449 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 450 | CODE_SIGN_IDENTITY = ""; 451 | CURRENT_PROJECT_VERSION = 1; 452 | DEBUG_INFORMATION_FORMAT = dwarf; 453 | DEFINES_MODULE = YES; 454 | DEVELOPMENT_TEAM = L35WZWVC98; 455 | DYLIB_COMPATIBILITY_VERSION = 1; 456 | DYLIB_CURRENT_VERSION = 1; 457 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 458 | INFOPLIST_FILE = AppSwizzle/Info.plist; 459 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 460 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 461 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 462 | PRODUCT_BUNDLE_IDENTIFIER = com.zixun.AppSwizzle; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | SKIP_INSTALL = YES; 465 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 466 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 467 | SWIFT_VERSION = 4.0; 468 | TARGETED_DEVICE_FAMILY = "1,2"; 469 | VERSIONING_SYSTEM = "apple-generic"; 470 | VERSION_INFO_PREFIX = ""; 471 | }; 472 | name = Debug; 473 | }; 474 | 9E24F9DB1E7FB91A001AD0D7 /* Release */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | CLANG_ANALYZER_NONNULL = YES; 478 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 479 | CLANG_WARN_INFINITE_RECURSION = YES; 480 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 481 | CODE_SIGN_IDENTITY = ""; 482 | CURRENT_PROJECT_VERSION = 1; 483 | DEFINES_MODULE = YES; 484 | DEVELOPMENT_TEAM = L35WZWVC98; 485 | DYLIB_COMPATIBILITY_VERSION = 1; 486 | DYLIB_CURRENT_VERSION = 1; 487 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 488 | INFOPLIST_FILE = AppSwizzle/Info.plist; 489 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 490 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 491 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 492 | PRODUCT_BUNDLE_IDENTIFIER = com.zixun.AppSwizzle; 493 | PRODUCT_NAME = "$(TARGET_NAME)"; 494 | SKIP_INSTALL = YES; 495 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 496 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 497 | SWIFT_VERSION = 4.0; 498 | TARGETED_DEVICE_FAMILY = "1,2"; 499 | VERSIONING_SYSTEM = "apple-generic"; 500 | VERSION_INFO_PREFIX = ""; 501 | }; 502 | name = Release; 503 | }; 504 | /* End XCBuildConfiguration section */ 505 | 506 | /* Begin XCConfigurationList section */ 507 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "AppSwizzle" */ = { 508 | isa = XCConfigurationList; 509 | buildConfigurations = ( 510 | 607FACED1AFB9204008FA782 /* Debug */, 511 | 607FACEE1AFB9204008FA782 /* Release */, 512 | ); 513 | defaultConfigurationIsVisible = 0; 514 | defaultConfigurationName = Release; 515 | }; 516 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "AppSwizzle_Tests" */ = { 517 | isa = XCConfigurationList; 518 | buildConfigurations = ( 519 | 607FACF31AFB9204008FA782 /* Debug */, 520 | 607FACF41AFB9204008FA782 /* Release */, 521 | ); 522 | defaultConfigurationIsVisible = 0; 523 | defaultConfigurationName = Release; 524 | }; 525 | 9E24F9DC1E7FB91A001AD0D7 /* Build configuration list for PBXNativeTarget "AppSwizzle" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | 9E24F9DA1E7FB91A001AD0D7 /* Debug */, 529 | 9E24F9DB1E7FB91A001AD0D7 /* Release */, 530 | ); 531 | defaultConfigurationIsVisible = 0; 532 | defaultConfigurationName = Release; 533 | }; 534 | /* End XCConfigurationList section */ 535 | }; 536 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 537 | } 538 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle.xcodeproj/project.xcworkspace/xcshareddata/AppSwizzle.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "5C65E1A0DF07B186C275611DFCB6907F9BD8DAC0", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "5C65E1A0DF07B186C275611DFCB6907F9BD8DAC0" : 9223372036854775807, 8 | "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0CB12C37-D96F-4E37-99A6-EA1B9BB695B0", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "5C65E1A0DF07B186C275611DFCB6907F9BD8DAC0" : "AppSwizzle\/", 13 | "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" : "..\/.." 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "AppSwizzle", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Example\/AppSwizzle.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:zixun\/AppSwizzle.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5C65E1A0DF07B186C275611DFCB6907F9BD8DAC0" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git.oschina.net:zixunapp\/AppSaber-MAC.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle.xcodeproj/xcshareddata/xcschemes/AppSwizzle-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 80 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | 99 | 101 | 107 | 108 | 109 | 110 | 112 | 113 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle.xcodeproj/xcshareddata/xcschemes/AppSwizzle.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle/AppSwizzle.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppSwizzle.h 3 | // AppSwizzle 4 | // 5 | // Created by zixun on 2017/3/20. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for AppSwizzle. 12 | FOUNDATION_EXPORT double AppSwizzleVersionNumber; 13 | 14 | //! Project version string for AppSwizzle. 15 | FOUNDATION_EXPORT const unsigned char AppSwizzleVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/AppSwizzle/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | target 'AppSwizzle_Tests' do 3 | pod 'AppSwizzle', :path => '../' 4 | 5 | 6 | end 7 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AppSwizzle (1.3) 3 | 4 | DEPENDENCIES: 5 | - AppSwizzle (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | AppSwizzle: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | AppSwizzle: 283c8f5b60e8638e6803383f6bbfd03af42cc01f 13 | 14 | PODFILE CHECKSUM: 939ed1355ec6a0adef5ae3f3b1e627821b2fc52a 15 | 16 | COCOAPODS: 1.5.0 17 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/Tests/AppSwizzleTests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import AppSwizzle 4 | 5 | class AppSwizzleTests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | } 10 | 11 | override func tearDown() { 12 | super.tearDown() 13 | } 14 | 15 | func testSwizzleInstanceMethod() { 16 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleInstanceMethod) 17 | let alter = #selector(AppSwizzleTests.alterSelector_testSwizzleInstanceMethod) 18 | AppSwizzleTests.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter) 19 | 20 | self.origSelector_testSwizzleInstanceMethod() 21 | } 22 | 23 | func testSwizzleClassMethod() { 24 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleClassMethod) 25 | let alter = #selector(AppSwizzleTests.alterSelector_testSwizzleClassMethod) 26 | AppSwizzleTests.swizzleClassMethod(origSelector: orig, toAlterSelector: alter) 27 | 28 | AppSwizzleTests.origSelector_testSwizzleClassMethod() 29 | } 30 | 31 | func testSwizzleInstanceMethodToAlterClass() { 32 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleInstanceMethodToAlterClass) 33 | let alter = #selector(OtherClass.alterSelector_testSwizzleInstanceMethodToAlterClass) 34 | AppSwizzleTests.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter, inAlterClass: OtherClass.classForCoder()) 35 | self.origSelector_testSwizzleInstanceMethodToAlterClass() 36 | } 37 | 38 | func testSwizzleClassMethodToAlterClass() { 39 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleClassMethodToAlterClass) 40 | let alter = #selector(OtherClass.alterSelector_testSwizzleClassMethodToAlterClass) 41 | 42 | AppSwizzleTests.swizzleClassMethod(origSelector: orig, toAlterSelector: alter, inAlterClass: OtherClass.classForCoder()) 43 | 44 | AppSwizzleTests.origSelector_testSwizzleClassMethodToAlterClass() 45 | } 46 | 47 | } 48 | 49 | //MARK: testSwizzleInstanceMethod extension 50 | extension AppSwizzleTests { 51 | 52 | func origSelector_testSwizzleInstanceMethod() { 53 | XCTFail("Failed") 54 | } 55 | 56 | func alterSelector_testSwizzleInstanceMethod() { 57 | XCTAssert(true, "Pass") 58 | } 59 | } 60 | 61 | //MARK: testSwizzleClassMethod extension 62 | extension AppSwizzleTests { 63 | 64 | class func origSelector_testSwizzleClassMethod() { 65 | XCTFail("Failed") 66 | } 67 | 68 | class func alterSelector_testSwizzleClassMethod() { 69 | XCTAssert(true, "Pass") 70 | } 71 | } 72 | 73 | //MARK: testSwizzleInstanceMethodToAlterClass extension 74 | extension AppSwizzleTests { 75 | func origSelector_testSwizzleInstanceMethodToAlterClass() { 76 | XCTFail("Failed") 77 | } 78 | } 79 | 80 | extension AppSwizzleTests { 81 | class func origSelector_testSwizzleClassMethodToAlterClass() { 82 | XCTFail("Failed") 83 | } 84 | } 85 | 86 | 87 | class OtherClass: NSObject { 88 | 89 | @objc func alterSelector_testSwizzleInstanceMethodToAlterClass() { 90 | XCTAssert(true, "Pass") 91 | } 92 | 93 | @objc class func alterSelector_testSwizzleClassMethodToAlterClass() { 94 | XCTAssert(true, "Pass") 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 陈奕龙(子循) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/README.md: -------------------------------------------------------------------------------- 1 | # AppSwizzle 2 | 3 | [![Swift 4.0+](https://img.shields.io/badge/Swift-4.0%2B-orange.svg)](https://github.com/zixun/AppBaseKit) 4 | [![Platform](https://img.shields.io/badge/Platform-iOS-lightgrey.svg)](https://github.com/zixun/AppBaseKit) 5 | [![MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) 6 | 7 | ## Context 8 | This library is derived from the [GodEye](https://github.com/zixun/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 9 | 10 | ## Example 11 | 12 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 13 | 14 | ## Requirements 15 | 16 | ## Installation 17 | 18 | ### CocoaPods 19 | AppSwizzle is available through [CocoaPods](http://cocoapods.org). To install 20 | it, simply add the following line to your Podfile: 21 | 22 | ```ruby 23 | pod "AppSwizzle" 24 | ``` 25 | 26 | ### Carthage 27 | Or, if you’re using [Carthage](https://github.com/Carthage/Carthage), add SwViewCapture to your Cartfile: 28 | 29 | ``` 30 | github "zixun/AppSwizzle" 31 | ``` 32 | ## Usage 33 | 34 | ### Swizzle Instance Method 35 | 36 | ```swift 37 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleInstanceMethod) 38 | let alter = #selector(AppSwizzleTests.alterSelector_testSwizzleInstanceMethod) 39 | AppSwizzleTests.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter) 40 | ``` 41 | 42 | ### Swizzle Class Method 43 | 44 | ```swift 45 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleClassMethod) 46 | let alter = #selector(AppSwizzleTests.alterSelector_testSwizzleClassMethod) 47 | AppSwizzleTests.swizzleClassMethod(origSelector: orig, toAlterSelector: alter) 48 | ``` 49 | 50 | ### Swizzle Instance Method To Alter Class 51 | 52 | ```swift 53 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleInstanceMethodToAlterClass) 54 | let alter = #selector(OtherClass.alterSelector_testSwizzleInstanceMethodToAlterClass) 55 | AppSwizzleTests.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter, inAlterClass: OtherClass.classForCoder()) 56 | ``` 57 | 58 | ### Swizzle Class Method To Alter Class 59 | 60 | ```swift 61 | let orig = #selector(AppSwizzleTests.origSelector_testSwizzleClassMethodToAlterClass) 62 | let alter = #selector(OtherClass.alterSelector_testSwizzleClassMethodToAlterClass) 63 | AppSwizzleTests.swizzleClassMethod(origSelector: orig, toAlterSelector: alter, inAlterClass: OtherClass.classForCoder()) 64 | ``` 65 | 66 | ## Author 67 | 68 | name: 陈奕龙 69 | 70 | twitter: [@zixun_](https://twitter.com/zixun_) 71 | 72 | email: chenyl.exe@gmail.com 73 | 74 | github: [zixun](https://github.com/zixun) 75 | 76 | blog: [子循(SubCycle)](http://zixun.github.io/) 77 | 78 | ## License 79 | 80 | AppSwizzle is available under the MIT license. See the LICENSE file for more info. 81 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AppSwizzle/_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /Example/LeakEye.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5ECE86BAB9C981CA122D038B /* Pods_LeakEye_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 972B21E2412B46D814D1FD2B /* Pods_LeakEye_Example.framework */; }; 11 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 12 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 13 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 14 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 15 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 16 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 17 | 9E24FA811E81165D001AD0D7 /* LeakEye.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E24FA7F1E81165D001AD0D7 /* LeakEye.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | 9E24FA841E81165D001AD0D7 /* LeakEye.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E24FA7D1E81165D001AD0D7 /* LeakEye.framework */; }; 19 | 9E24FA851E81165D001AD0D7 /* LeakEye.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9E24FA7D1E81165D001AD0D7 /* LeakEye.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 20 | 9E24FA9D1E81166C001AD0D7 /* ObjectAgent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA901E81166C001AD0D7 /* ObjectAgent.swift */; }; 21 | 9E24FA9E1E81166C001AD0D7 /* LeakEye.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA911E81166C001AD0D7 /* LeakEye.swift */; }; 22 | 9E24FA9F1E81166C001AD0D7 /* NSObject+Alive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA931E81166C001AD0D7 /* NSObject+Alive.swift */; }; 23 | 9E24FAA01E81166C001AD0D7 /* NSObject+Eye.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA941E81166C001AD0D7 /* NSObject+Eye.swift */; }; 24 | 9E24FAA11E81166C001AD0D7 /* Preparer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA951E81166C001AD0D7 /* Preparer.swift */; }; 25 | 9E24FAA21E81166C001AD0D7 /* NSNotification+LeakEye.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA961E81166C001AD0D7 /* NSNotification+LeakEye.swift */; }; 26 | 9E24FAA31E81166C001AD0D7 /* DispatchQueue+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA981E81166C001AD0D7 /* DispatchQueue+.swift */; }; 27 | 9E24FAA41E81166C001AD0D7 /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA991E81166C001AD0D7 /* String+.swift */; }; 28 | 9E24FAA51E81166C001AD0D7 /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E24FA9A1E81166C001AD0D7 /* Variable.swift */; }; 29 | 9E24FAA71E812E54001AD0D7 /* AppSwizzle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E24FAA61E812E54001AD0D7 /* AppSwizzle.framework */; }; 30 | 9E32F5531E102BC8005C7850 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E32F5521E102BC8005C7850 /* SecondViewController.swift */; }; 31 | B92C4D2AE881797F9F839515 /* Pods_LeakEye_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5A031E8773354D107B0FFE4 /* Pods_LeakEye_Tests.framework */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXContainerItemProxy section */ 35 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 40 | remoteInfo = LeakEye; 41 | }; 42 | 9E24FA821E81165D001AD0D7 /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 45 | proxyType = 1; 46 | remoteGlobalIDString = 9E24FA7C1E81165D001AD0D7; 47 | remoteInfo = LeakEye; 48 | }; 49 | /* End PBXContainerItemProxy section */ 50 | 51 | /* Begin PBXCopyFilesBuildPhase section */ 52 | 9E24FA891E81165D001AD0D7 /* Embed Frameworks */ = { 53 | isa = PBXCopyFilesBuildPhase; 54 | buildActionMask = 2147483647; 55 | dstPath = ""; 56 | dstSubfolderSpec = 10; 57 | files = ( 58 | 9E24FA851E81165D001AD0D7 /* LeakEye.framework in Embed Frameworks */, 59 | ); 60 | name = "Embed Frameworks"; 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXCopyFilesBuildPhase section */ 64 | 65 | /* Begin PBXFileReference section */ 66 | 0FB1D0765284FEEA825C5038 /* Pods-LeakEye_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeakEye_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LeakEye_Example/Pods-LeakEye_Example.debug.xcconfig"; sourceTree = ""; }; 67 | 155AC52870DD02971EAFBE90 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 68 | 573A2902F825A85A93560459 /* LeakEye.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LeakEye.podspec; path = ../LeakEye.podspec; sourceTree = ""; }; 69 | 607FACD01AFB9204008FA782 /* LeakEye_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LeakEye_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 72 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 73 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 74 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 75 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 76 | 607FACE51AFB9204008FA782 /* LeakEye_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LeakEye_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 79 | 972B21E2412B46D814D1FD2B /* Pods_LeakEye_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeakEye_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | 9E24FA7D1E81165D001AD0D7 /* LeakEye.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LeakEye.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | 9E24FA7F1E81165D001AD0D7 /* LeakEye.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LeakEye.h; sourceTree = ""; }; 82 | 9E24FA801E81165D001AD0D7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 83 | 9E24FA901E81166C001AD0D7 /* ObjectAgent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjectAgent.swift; sourceTree = ""; }; 84 | 9E24FA911E81166C001AD0D7 /* LeakEye.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LeakEye.swift; sourceTree = ""; }; 85 | 9E24FA931E81166C001AD0D7 /* NSObject+Alive.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSObject+Alive.swift"; sourceTree = ""; }; 86 | 9E24FA941E81166C001AD0D7 /* NSObject+Eye.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSObject+Eye.swift"; sourceTree = ""; }; 87 | 9E24FA951E81166C001AD0D7 /* Preparer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Preparer.swift; sourceTree = ""; }; 88 | 9E24FA961E81166C001AD0D7 /* NSNotification+LeakEye.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSNotification+LeakEye.swift"; sourceTree = ""; }; 89 | 9E24FA981E81166C001AD0D7 /* DispatchQueue+.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DispatchQueue+.swift"; sourceTree = ""; }; 90 | 9E24FA991E81166C001AD0D7 /* String+.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = ""; }; 91 | 9E24FA9A1E81166C001AD0D7 /* Variable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Variable.swift; sourceTree = ""; }; 92 | 9E24FAA61E812E54001AD0D7 /* AppSwizzle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppSwizzle.framework; path = ../Carthage/Build/iOS/AppSwizzle.framework; sourceTree = ""; }; 93 | 9E32F5521E102BC8005C7850 /* SecondViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; 94 | A5A031E8773354D107B0FFE4 /* Pods_LeakEye_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeakEye_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 95 | A94C92F5EAAB34F7E971D115 /* Pods-LeakEye_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeakEye_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-LeakEye_Example/Pods-LeakEye_Example.release.xcconfig"; sourceTree = ""; }; 96 | B1B72E5E5CB387C8574EEE9E /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 97 | CE8136BAB9CA3AD58411632D /* Pods-LeakEye_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeakEye_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LeakEye_Tests/Pods-LeakEye_Tests.debug.xcconfig"; sourceTree = ""; }; 98 | DDB4991320C018B9E28E0C4A /* Pods-LeakEye_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LeakEye_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-LeakEye_Tests/Pods-LeakEye_Tests.release.xcconfig"; sourceTree = ""; }; 99 | /* End PBXFileReference section */ 100 | 101 | /* Begin PBXFrameworksBuildPhase section */ 102 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 103 | isa = PBXFrameworksBuildPhase; 104 | buildActionMask = 2147483647; 105 | files = ( 106 | 5ECE86BAB9C981CA122D038B /* Pods_LeakEye_Example.framework in Frameworks */, 107 | 9E24FA841E81165D001AD0D7 /* LeakEye.framework in Frameworks */, 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 112 | isa = PBXFrameworksBuildPhase; 113 | buildActionMask = 2147483647; 114 | files = ( 115 | B92C4D2AE881797F9F839515 /* Pods_LeakEye_Tests.framework in Frameworks */, 116 | ); 117 | runOnlyForDeploymentPostprocessing = 0; 118 | }; 119 | 9E24FA791E81165D001AD0D7 /* Frameworks */ = { 120 | isa = PBXFrameworksBuildPhase; 121 | buildActionMask = 2147483647; 122 | files = ( 123 | 9E24FAA71E812E54001AD0D7 /* AppSwizzle.framework in Frameworks */, 124 | ); 125 | runOnlyForDeploymentPostprocessing = 0; 126 | }; 127 | /* End PBXFrameworksBuildPhase section */ 128 | 129 | /* Begin PBXGroup section */ 130 | 40664E4FB5570DC5D64D118F /* Frameworks */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 9E24FAA61E812E54001AD0D7 /* AppSwizzle.framework */, 134 | 972B21E2412B46D814D1FD2B /* Pods_LeakEye_Example.framework */, 135 | A5A031E8773354D107B0FFE4 /* Pods_LeakEye_Tests.framework */, 136 | ); 137 | name = Frameworks; 138 | sourceTree = ""; 139 | }; 140 | 607FACC71AFB9204008FA782 = { 141 | isa = PBXGroup; 142 | children = ( 143 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 144 | 607FACD21AFB9204008FA782 /* Example for LeakEye */, 145 | 607FACE81AFB9204008FA782 /* Tests */, 146 | 9E24FA7E1E81165D001AD0D7 /* LeakEye */, 147 | 607FACD11AFB9204008FA782 /* Products */, 148 | EFC20B349700825A675B90F3 /* Pods */, 149 | 40664E4FB5570DC5D64D118F /* Frameworks */, 150 | ); 151 | sourceTree = ""; 152 | }; 153 | 607FACD11AFB9204008FA782 /* Products */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 607FACD01AFB9204008FA782 /* LeakEye_Example.app */, 157 | 607FACE51AFB9204008FA782 /* LeakEye_Tests.xctest */, 158 | 9E24FA7D1E81165D001AD0D7 /* LeakEye.framework */, 159 | ); 160 | name = Products; 161 | sourceTree = ""; 162 | }; 163 | 607FACD21AFB9204008FA782 /* Example for LeakEye */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 167 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 168 | 9E32F5521E102BC8005C7850 /* SecondViewController.swift */, 169 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 170 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 171 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 172 | 607FACD31AFB9204008FA782 /* Supporting Files */, 173 | ); 174 | name = "Example for LeakEye"; 175 | path = LeakEye; 176 | sourceTree = ""; 177 | }; 178 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 607FACD41AFB9204008FA782 /* Info.plist */, 182 | ); 183 | name = "Supporting Files"; 184 | sourceTree = ""; 185 | }; 186 | 607FACE81AFB9204008FA782 /* Tests */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 190 | 607FACE91AFB9204008FA782 /* Supporting Files */, 191 | ); 192 | path = Tests; 193 | sourceTree = ""; 194 | }; 195 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 607FACEA1AFB9204008FA782 /* Info.plist */, 199 | ); 200 | name = "Supporting Files"; 201 | sourceTree = ""; 202 | }; 203 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 573A2902F825A85A93560459 /* LeakEye.podspec */, 207 | B1B72E5E5CB387C8574EEE9E /* README.md */, 208 | 155AC52870DD02971EAFBE90 /* LICENSE */, 209 | ); 210 | name = "Podspec Metadata"; 211 | sourceTree = ""; 212 | }; 213 | 9E24FA7E1E81165D001AD0D7 /* LeakEye */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 9E24FA8A1E81166C001AD0D7 /* LeakEye */, 217 | 9E24FA7F1E81165D001AD0D7 /* LeakEye.h */, 218 | 9E24FA801E81165D001AD0D7 /* Info.plist */, 219 | ); 220 | path = LeakEye; 221 | sourceTree = ""; 222 | }; 223 | 9E24FA8A1E81166C001AD0D7 /* LeakEye */ = { 224 | isa = PBXGroup; 225 | children = ( 226 | 9E24FA8D1E81166C001AD0D7 /* Classes */, 227 | ); 228 | name = LeakEye; 229 | path = ../../LeakEye; 230 | sourceTree = ""; 231 | }; 232 | 9E24FA8D1E81166C001AD0D7 /* Classes */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 9E24FA8F1E81166C001AD0D7 /* Agent */, 236 | 9E24FA911E81166C001AD0D7 /* LeakEye.swift */, 237 | 9E24FA921E81166C001AD0D7 /* Monitor */, 238 | 9E24FA961E81166C001AD0D7 /* NSNotification+LeakEye.swift */, 239 | 9E24FA971E81166C001AD0D7 /* Util */, 240 | 9E24FA9A1E81166C001AD0D7 /* Variable.swift */, 241 | ); 242 | path = Classes; 243 | sourceTree = ""; 244 | }; 245 | 9E24FA8F1E81166C001AD0D7 /* Agent */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 9E24FA901E81166C001AD0D7 /* ObjectAgent.swift */, 249 | ); 250 | path = Agent; 251 | sourceTree = ""; 252 | }; 253 | 9E24FA921E81166C001AD0D7 /* Monitor */ = { 254 | isa = PBXGroup; 255 | children = ( 256 | 9E24FA931E81166C001AD0D7 /* NSObject+Alive.swift */, 257 | 9E24FA941E81166C001AD0D7 /* NSObject+Eye.swift */, 258 | 9E24FA951E81166C001AD0D7 /* Preparer.swift */, 259 | ); 260 | path = Monitor; 261 | sourceTree = ""; 262 | }; 263 | 9E24FA971E81166C001AD0D7 /* Util */ = { 264 | isa = PBXGroup; 265 | children = ( 266 | 9E24FA981E81166C001AD0D7 /* DispatchQueue+.swift */, 267 | 9E24FA991E81166C001AD0D7 /* String+.swift */, 268 | ); 269 | path = Util; 270 | sourceTree = ""; 271 | }; 272 | EFC20B349700825A675B90F3 /* Pods */ = { 273 | isa = PBXGroup; 274 | children = ( 275 | 0FB1D0765284FEEA825C5038 /* Pods-LeakEye_Example.debug.xcconfig */, 276 | A94C92F5EAAB34F7E971D115 /* Pods-LeakEye_Example.release.xcconfig */, 277 | CE8136BAB9CA3AD58411632D /* Pods-LeakEye_Tests.debug.xcconfig */, 278 | DDB4991320C018B9E28E0C4A /* Pods-LeakEye_Tests.release.xcconfig */, 279 | ); 280 | name = Pods; 281 | sourceTree = ""; 282 | }; 283 | /* End PBXGroup section */ 284 | 285 | /* Begin PBXHeadersBuildPhase section */ 286 | 9E24FA7A1E81165D001AD0D7 /* Headers */ = { 287 | isa = PBXHeadersBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | 9E24FA811E81165D001AD0D7 /* LeakEye.h in Headers */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | /* End PBXHeadersBuildPhase section */ 295 | 296 | /* Begin PBXNativeTarget section */ 297 | 607FACCF1AFB9204008FA782 /* LeakEye_Example */ = { 298 | isa = PBXNativeTarget; 299 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "LeakEye_Example" */; 300 | buildPhases = ( 301 | 294A69E7AD836F4084D4B1FF /* [CP] Check Pods Manifest.lock */, 302 | 607FACCC1AFB9204008FA782 /* Sources */, 303 | 607FACCD1AFB9204008FA782 /* Frameworks */, 304 | 607FACCE1AFB9204008FA782 /* Resources */, 305 | 303CC2F41D1300BEEBD6067F /* [CP] Embed Pods Frameworks */, 306 | 9E24FA891E81165D001AD0D7 /* Embed Frameworks */, 307 | ); 308 | buildRules = ( 309 | ); 310 | dependencies = ( 311 | 9E24FA831E81165D001AD0D7 /* PBXTargetDependency */, 312 | ); 313 | name = LeakEye_Example; 314 | productName = LeakEye; 315 | productReference = 607FACD01AFB9204008FA782 /* LeakEye_Example.app */; 316 | productType = "com.apple.product-type.application"; 317 | }; 318 | 607FACE41AFB9204008FA782 /* LeakEye_Tests */ = { 319 | isa = PBXNativeTarget; 320 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "LeakEye_Tests" */; 321 | buildPhases = ( 322 | C6FFD762E2699A1232764C32 /* [CP] Check Pods Manifest.lock */, 323 | 607FACE11AFB9204008FA782 /* Sources */, 324 | 607FACE21AFB9204008FA782 /* Frameworks */, 325 | 607FACE31AFB9204008FA782 /* Resources */, 326 | ); 327 | buildRules = ( 328 | ); 329 | dependencies = ( 330 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 331 | ); 332 | name = LeakEye_Tests; 333 | productName = Tests; 334 | productReference = 607FACE51AFB9204008FA782 /* LeakEye_Tests.xctest */; 335 | productType = "com.apple.product-type.bundle.unit-test"; 336 | }; 337 | 9E24FA7C1E81165D001AD0D7 /* LeakEye */ = { 338 | isa = PBXNativeTarget; 339 | buildConfigurationList = 9E24FA881E81165D001AD0D7 /* Build configuration list for PBXNativeTarget "LeakEye" */; 340 | buildPhases = ( 341 | 9E24FA781E81165D001AD0D7 /* Sources */, 342 | 9E24FA791E81165D001AD0D7 /* Frameworks */, 343 | 9E24FA7A1E81165D001AD0D7 /* Headers */, 344 | 9E24FA7B1E81165D001AD0D7 /* Resources */, 345 | 9E24FAA81E812E57001AD0D7 /* ShellScript */, 346 | ); 347 | buildRules = ( 348 | ); 349 | dependencies = ( 350 | ); 351 | name = LeakEye; 352 | productName = LeakEye; 353 | productReference = 9E24FA7D1E81165D001AD0D7 /* LeakEye.framework */; 354 | productType = "com.apple.product-type.framework"; 355 | }; 356 | /* End PBXNativeTarget section */ 357 | 358 | /* Begin PBXProject section */ 359 | 607FACC81AFB9204008FA782 /* Project object */ = { 360 | isa = PBXProject; 361 | attributes = { 362 | LastSwiftUpdateCheck = 0720; 363 | LastUpgradeCheck = 0720; 364 | ORGANIZATIONNAME = CocoaPods; 365 | TargetAttributes = { 366 | 607FACCF1AFB9204008FA782 = { 367 | CreatedOnToolsVersion = 6.3.1; 368 | LastSwiftMigration = 0810; 369 | }; 370 | 607FACE41AFB9204008FA782 = { 371 | CreatedOnToolsVersion = 6.3.1; 372 | LastSwiftMigration = 0810; 373 | TestTargetID = 607FACCF1AFB9204008FA782; 374 | }; 375 | 9E24FA7C1E81165D001AD0D7 = { 376 | CreatedOnToolsVersion = 8.2.1; 377 | LastSwiftMigration = 0920; 378 | ProvisioningStyle = Automatic; 379 | }; 380 | }; 381 | }; 382 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "LeakEye" */; 383 | compatibilityVersion = "Xcode 3.2"; 384 | developmentRegion = English; 385 | hasScannedForEncodings = 0; 386 | knownRegions = ( 387 | en, 388 | Base, 389 | ); 390 | mainGroup = 607FACC71AFB9204008FA782; 391 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 392 | projectDirPath = ""; 393 | projectRoot = ""; 394 | targets = ( 395 | 607FACCF1AFB9204008FA782 /* LeakEye_Example */, 396 | 607FACE41AFB9204008FA782 /* LeakEye_Tests */, 397 | 9E24FA7C1E81165D001AD0D7 /* LeakEye */, 398 | ); 399 | }; 400 | /* End PBXProject section */ 401 | 402 | /* Begin PBXResourcesBuildPhase section */ 403 | 607FACCE1AFB9204008FA782 /* Resources */ = { 404 | isa = PBXResourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 408 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 409 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 410 | ); 411 | runOnlyForDeploymentPostprocessing = 0; 412 | }; 413 | 607FACE31AFB9204008FA782 /* Resources */ = { 414 | isa = PBXResourcesBuildPhase; 415 | buildActionMask = 2147483647; 416 | files = ( 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | 9E24FA7B1E81165D001AD0D7 /* Resources */ = { 421 | isa = PBXResourcesBuildPhase; 422 | buildActionMask = 2147483647; 423 | files = ( 424 | ); 425 | runOnlyForDeploymentPostprocessing = 0; 426 | }; 427 | /* End PBXResourcesBuildPhase section */ 428 | 429 | /* Begin PBXShellScriptBuildPhase section */ 430 | 294A69E7AD836F4084D4B1FF /* [CP] Check Pods Manifest.lock */ = { 431 | isa = PBXShellScriptBuildPhase; 432 | buildActionMask = 2147483647; 433 | files = ( 434 | ); 435 | inputPaths = ( 436 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 437 | "${PODS_ROOT}/Manifest.lock", 438 | ); 439 | name = "[CP] Check Pods Manifest.lock"; 440 | outputPaths = ( 441 | "$(DERIVED_FILE_DIR)/Pods-LeakEye_Example-checkManifestLockResult.txt", 442 | ); 443 | runOnlyForDeploymentPostprocessing = 0; 444 | shellPath = /bin/sh; 445 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 446 | showEnvVarsInLog = 0; 447 | }; 448 | 303CC2F41D1300BEEBD6067F /* [CP] Embed Pods Frameworks */ = { 449 | isa = PBXShellScriptBuildPhase; 450 | buildActionMask = 2147483647; 451 | files = ( 452 | ); 453 | inputPaths = ( 454 | "${SRCROOT}/Pods/Target Support Files/Pods-LeakEye_Example/Pods-LeakEye_Example-frameworks.sh", 455 | "${BUILT_PRODUCTS_DIR}/AppSwizzle/AppSwizzle.framework", 456 | "${BUILT_PRODUCTS_DIR}/LeakEye/LeakEye.framework", 457 | ); 458 | name = "[CP] Embed Pods Frameworks"; 459 | outputPaths = ( 460 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppSwizzle.framework", 461 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LeakEye.framework", 462 | ); 463 | runOnlyForDeploymentPostprocessing = 0; 464 | shellPath = /bin/sh; 465 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LeakEye_Example/Pods-LeakEye_Example-frameworks.sh\"\n"; 466 | showEnvVarsInLog = 0; 467 | }; 468 | 9E24FAA81E812E57001AD0D7 /* ShellScript */ = { 469 | isa = PBXShellScriptBuildPhase; 470 | buildActionMask = 2147483647; 471 | files = ( 472 | ); 473 | inputPaths = ( 474 | "$(SRCROOT)/../Carthage/Build/iOS/AppSwizzle.framework", 475 | ); 476 | outputPaths = ( 477 | ); 478 | runOnlyForDeploymentPostprocessing = 0; 479 | shellPath = /bin/sh; 480 | shellScript = "/usr/local/bin/carthage copy-frameworks"; 481 | }; 482 | C6FFD762E2699A1232764C32 /* [CP] Check Pods Manifest.lock */ = { 483 | isa = PBXShellScriptBuildPhase; 484 | buildActionMask = 2147483647; 485 | files = ( 486 | ); 487 | inputPaths = ( 488 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 489 | "${PODS_ROOT}/Manifest.lock", 490 | ); 491 | name = "[CP] Check Pods Manifest.lock"; 492 | outputPaths = ( 493 | "$(DERIVED_FILE_DIR)/Pods-LeakEye_Tests-checkManifestLockResult.txt", 494 | ); 495 | runOnlyForDeploymentPostprocessing = 0; 496 | shellPath = /bin/sh; 497 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 498 | showEnvVarsInLog = 0; 499 | }; 500 | /* End PBXShellScriptBuildPhase section */ 501 | 502 | /* Begin PBXSourcesBuildPhase section */ 503 | 607FACCC1AFB9204008FA782 /* Sources */ = { 504 | isa = PBXSourcesBuildPhase; 505 | buildActionMask = 2147483647; 506 | files = ( 507 | 9E32F5531E102BC8005C7850 /* SecondViewController.swift in Sources */, 508 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 509 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 510 | ); 511 | runOnlyForDeploymentPostprocessing = 0; 512 | }; 513 | 607FACE11AFB9204008FA782 /* Sources */ = { 514 | isa = PBXSourcesBuildPhase; 515 | buildActionMask = 2147483647; 516 | files = ( 517 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 518 | ); 519 | runOnlyForDeploymentPostprocessing = 0; 520 | }; 521 | 9E24FA781E81165D001AD0D7 /* Sources */ = { 522 | isa = PBXSourcesBuildPhase; 523 | buildActionMask = 2147483647; 524 | files = ( 525 | 9E24FAA21E81166C001AD0D7 /* NSNotification+LeakEye.swift in Sources */, 526 | 9E24FAA51E81166C001AD0D7 /* Variable.swift in Sources */, 527 | 9E24FA9F1E81166C001AD0D7 /* NSObject+Alive.swift in Sources */, 528 | 9E24FAA41E81166C001AD0D7 /* String+.swift in Sources */, 529 | 9E24FAA11E81166C001AD0D7 /* Preparer.swift in Sources */, 530 | 9E24FA9E1E81166C001AD0D7 /* LeakEye.swift in Sources */, 531 | 9E24FAA31E81166C001AD0D7 /* DispatchQueue+.swift in Sources */, 532 | 9E24FA9D1E81166C001AD0D7 /* ObjectAgent.swift in Sources */, 533 | 9E24FAA01E81166C001AD0D7 /* NSObject+Eye.swift in Sources */, 534 | ); 535 | runOnlyForDeploymentPostprocessing = 0; 536 | }; 537 | /* End PBXSourcesBuildPhase section */ 538 | 539 | /* Begin PBXTargetDependency section */ 540 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 541 | isa = PBXTargetDependency; 542 | target = 607FACCF1AFB9204008FA782 /* LeakEye_Example */; 543 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 544 | }; 545 | 9E24FA831E81165D001AD0D7 /* PBXTargetDependency */ = { 546 | isa = PBXTargetDependency; 547 | target = 9E24FA7C1E81165D001AD0D7 /* LeakEye */; 548 | targetProxy = 9E24FA821E81165D001AD0D7 /* PBXContainerItemProxy */; 549 | }; 550 | /* End PBXTargetDependency section */ 551 | 552 | /* Begin PBXVariantGroup section */ 553 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 554 | isa = PBXVariantGroup; 555 | children = ( 556 | 607FACDA1AFB9204008FA782 /* Base */, 557 | ); 558 | name = Main.storyboard; 559 | sourceTree = ""; 560 | }; 561 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 562 | isa = PBXVariantGroup; 563 | children = ( 564 | 607FACDF1AFB9204008FA782 /* Base */, 565 | ); 566 | name = LaunchScreen.xib; 567 | sourceTree = ""; 568 | }; 569 | /* End PBXVariantGroup section */ 570 | 571 | /* Begin XCBuildConfiguration section */ 572 | 607FACED1AFB9204008FA782 /* Debug */ = { 573 | isa = XCBuildConfiguration; 574 | buildSettings = { 575 | ALWAYS_SEARCH_USER_PATHS = NO; 576 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 577 | CLANG_CXX_LIBRARY = "libc++"; 578 | CLANG_ENABLE_MODULES = YES; 579 | CLANG_ENABLE_OBJC_ARC = YES; 580 | CLANG_WARN_BOOL_CONVERSION = YES; 581 | CLANG_WARN_CONSTANT_CONVERSION = YES; 582 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 583 | CLANG_WARN_EMPTY_BODY = YES; 584 | CLANG_WARN_ENUM_CONVERSION = YES; 585 | CLANG_WARN_INT_CONVERSION = YES; 586 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 587 | CLANG_WARN_UNREACHABLE_CODE = YES; 588 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 589 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 590 | COPY_PHASE_STRIP = NO; 591 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 592 | ENABLE_STRICT_OBJC_MSGSEND = YES; 593 | ENABLE_TESTABILITY = YES; 594 | GCC_C_LANGUAGE_STANDARD = gnu99; 595 | GCC_DYNAMIC_NO_PIC = NO; 596 | GCC_NO_COMMON_BLOCKS = YES; 597 | GCC_OPTIMIZATION_LEVEL = 0; 598 | GCC_PREPROCESSOR_DEFINITIONS = ( 599 | "DEBUG=1", 600 | "$(inherited)", 601 | ); 602 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 603 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 604 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 605 | GCC_WARN_UNDECLARED_SELECTOR = YES; 606 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 607 | GCC_WARN_UNUSED_FUNCTION = YES; 608 | GCC_WARN_UNUSED_VARIABLE = YES; 609 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 610 | MTL_ENABLE_DEBUG_INFO = YES; 611 | ONLY_ACTIVE_ARCH = YES; 612 | SDKROOT = iphoneos; 613 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 614 | }; 615 | name = Debug; 616 | }; 617 | 607FACEE1AFB9204008FA782 /* Release */ = { 618 | isa = XCBuildConfiguration; 619 | buildSettings = { 620 | ALWAYS_SEARCH_USER_PATHS = NO; 621 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 622 | CLANG_CXX_LIBRARY = "libc++"; 623 | CLANG_ENABLE_MODULES = YES; 624 | CLANG_ENABLE_OBJC_ARC = YES; 625 | CLANG_WARN_BOOL_CONVERSION = YES; 626 | CLANG_WARN_CONSTANT_CONVERSION = YES; 627 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 628 | CLANG_WARN_EMPTY_BODY = YES; 629 | CLANG_WARN_ENUM_CONVERSION = YES; 630 | CLANG_WARN_INT_CONVERSION = YES; 631 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 632 | CLANG_WARN_UNREACHABLE_CODE = YES; 633 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 634 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 635 | COPY_PHASE_STRIP = NO; 636 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 637 | ENABLE_NS_ASSERTIONS = NO; 638 | ENABLE_STRICT_OBJC_MSGSEND = YES; 639 | GCC_C_LANGUAGE_STANDARD = gnu99; 640 | GCC_NO_COMMON_BLOCKS = YES; 641 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 642 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 643 | GCC_WARN_UNDECLARED_SELECTOR = YES; 644 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 645 | GCC_WARN_UNUSED_FUNCTION = YES; 646 | GCC_WARN_UNUSED_VARIABLE = YES; 647 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 648 | MTL_ENABLE_DEBUG_INFO = NO; 649 | SDKROOT = iphoneos; 650 | VALIDATE_PRODUCT = YES; 651 | }; 652 | name = Release; 653 | }; 654 | 607FACF01AFB9204008FA782 /* Debug */ = { 655 | isa = XCBuildConfiguration; 656 | baseConfigurationReference = 0FB1D0765284FEEA825C5038 /* Pods-LeakEye_Example.debug.xcconfig */; 657 | buildSettings = { 658 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 659 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 660 | INFOPLIST_FILE = LeakEye/Info.plist; 661 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 662 | MODULE_NAME = ExampleApp; 663 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 664 | PRODUCT_NAME = "$(TARGET_NAME)"; 665 | SWIFT_VERSION = 3.0; 666 | }; 667 | name = Debug; 668 | }; 669 | 607FACF11AFB9204008FA782 /* Release */ = { 670 | isa = XCBuildConfiguration; 671 | baseConfigurationReference = A94C92F5EAAB34F7E971D115 /* Pods-LeakEye_Example.release.xcconfig */; 672 | buildSettings = { 673 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 674 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 675 | INFOPLIST_FILE = LeakEye/Info.plist; 676 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 677 | MODULE_NAME = ExampleApp; 678 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 679 | PRODUCT_NAME = "$(TARGET_NAME)"; 680 | SWIFT_VERSION = 3.0; 681 | }; 682 | name = Release; 683 | }; 684 | 607FACF31AFB9204008FA782 /* Debug */ = { 685 | isa = XCBuildConfiguration; 686 | baseConfigurationReference = CE8136BAB9CA3AD58411632D /* Pods-LeakEye_Tests.debug.xcconfig */; 687 | buildSettings = { 688 | FRAMEWORK_SEARCH_PATHS = ( 689 | "$(SDKROOT)/Developer/Library/Frameworks", 690 | "$(inherited)", 691 | ); 692 | GCC_PREPROCESSOR_DEFINITIONS = ( 693 | "DEBUG=1", 694 | "$(inherited)", 695 | ); 696 | INFOPLIST_FILE = Tests/Info.plist; 697 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 698 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 699 | PRODUCT_NAME = "$(TARGET_NAME)"; 700 | SWIFT_VERSION = 3.0; 701 | }; 702 | name = Debug; 703 | }; 704 | 607FACF41AFB9204008FA782 /* Release */ = { 705 | isa = XCBuildConfiguration; 706 | baseConfigurationReference = DDB4991320C018B9E28E0C4A /* Pods-LeakEye_Tests.release.xcconfig */; 707 | buildSettings = { 708 | FRAMEWORK_SEARCH_PATHS = ( 709 | "$(SDKROOT)/Developer/Library/Frameworks", 710 | "$(inherited)", 711 | ); 712 | INFOPLIST_FILE = Tests/Info.plist; 713 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 714 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 715 | PRODUCT_NAME = "$(TARGET_NAME)"; 716 | SWIFT_VERSION = 3.0; 717 | }; 718 | name = Release; 719 | }; 720 | 9E24FA861E81165D001AD0D7 /* Debug */ = { 721 | isa = XCBuildConfiguration; 722 | buildSettings = { 723 | CLANG_ANALYZER_NONNULL = YES; 724 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 725 | CLANG_WARN_INFINITE_RECURSION = YES; 726 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 727 | CODE_SIGN_IDENTITY = ""; 728 | CURRENT_PROJECT_VERSION = 1; 729 | DEBUG_INFORMATION_FORMAT = dwarf; 730 | DEFINES_MODULE = YES; 731 | DYLIB_COMPATIBILITY_VERSION = 1; 732 | DYLIB_CURRENT_VERSION = 1; 733 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 734 | FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Carthage/Build/iOS/**"; 735 | INFOPLIST_FILE = LeakEye/Info.plist; 736 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 737 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 738 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 739 | PRODUCT_BUNDLE_IDENTIFIER = com.zixun.LeakEye; 740 | PRODUCT_NAME = "$(TARGET_NAME)"; 741 | SKIP_INSTALL = YES; 742 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 743 | SWIFT_VERSION = 4.0; 744 | TARGETED_DEVICE_FAMILY = "1,2"; 745 | VERSIONING_SYSTEM = "apple-generic"; 746 | VERSION_INFO_PREFIX = ""; 747 | }; 748 | name = Debug; 749 | }; 750 | 9E24FA871E81165D001AD0D7 /* Release */ = { 751 | isa = XCBuildConfiguration; 752 | buildSettings = { 753 | CLANG_ANALYZER_NONNULL = YES; 754 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 755 | CLANG_WARN_INFINITE_RECURSION = YES; 756 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 757 | CODE_SIGN_IDENTITY = ""; 758 | CURRENT_PROJECT_VERSION = 1; 759 | DEFINES_MODULE = YES; 760 | DYLIB_COMPATIBILITY_VERSION = 1; 761 | DYLIB_CURRENT_VERSION = 1; 762 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 763 | FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Carthage/Build/iOS/**"; 764 | INFOPLIST_FILE = LeakEye/Info.plist; 765 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 766 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 767 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 768 | PRODUCT_BUNDLE_IDENTIFIER = com.zixun.LeakEye; 769 | PRODUCT_NAME = "$(TARGET_NAME)"; 770 | SKIP_INSTALL = YES; 771 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 772 | SWIFT_VERSION = 4.0; 773 | TARGETED_DEVICE_FAMILY = "1,2"; 774 | VERSIONING_SYSTEM = "apple-generic"; 775 | VERSION_INFO_PREFIX = ""; 776 | }; 777 | name = Release; 778 | }; 779 | /* End XCBuildConfiguration section */ 780 | 781 | /* Begin XCConfigurationList section */ 782 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "LeakEye" */ = { 783 | isa = XCConfigurationList; 784 | buildConfigurations = ( 785 | 607FACED1AFB9204008FA782 /* Debug */, 786 | 607FACEE1AFB9204008FA782 /* Release */, 787 | ); 788 | defaultConfigurationIsVisible = 0; 789 | defaultConfigurationName = Release; 790 | }; 791 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "LeakEye_Example" */ = { 792 | isa = XCConfigurationList; 793 | buildConfigurations = ( 794 | 607FACF01AFB9204008FA782 /* Debug */, 795 | 607FACF11AFB9204008FA782 /* Release */, 796 | ); 797 | defaultConfigurationIsVisible = 0; 798 | defaultConfigurationName = Release; 799 | }; 800 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "LeakEye_Tests" */ = { 801 | isa = XCConfigurationList; 802 | buildConfigurations = ( 803 | 607FACF31AFB9204008FA782 /* Debug */, 804 | 607FACF41AFB9204008FA782 /* Release */, 805 | ); 806 | defaultConfigurationIsVisible = 0; 807 | defaultConfigurationName = Release; 808 | }; 809 | 9E24FA881E81165D001AD0D7 /* Build configuration list for PBXNativeTarget "LeakEye" */ = { 810 | isa = XCConfigurationList; 811 | buildConfigurations = ( 812 | 9E24FA861E81165D001AD0D7 /* Debug */, 813 | 9E24FA871E81165D001AD0D7 /* Release */, 814 | ); 815 | defaultConfigurationIsVisible = 0; 816 | defaultConfigurationName = Release; 817 | }; 818 | /* End XCConfigurationList section */ 819 | }; 820 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 821 | } 822 | -------------------------------------------------------------------------------- /Example/LeakEye.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/LeakEye.xcodeproj/project.xcworkspace/xcshareddata/LeakEye.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "1DB58DD37EA1B5358CB1103D5133CD67EC14E207", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "1DB58DD37EA1B5358CB1103D5133CD67EC14E207" : 9223372036854775807, 8 | "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "A296F9FC-02BF-416D-8E81-CFC94935D588", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "1DB58DD37EA1B5358CB1103D5133CD67EC14E207" : "LeakEye\/", 13 | "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" : "..\/.." 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "LeakEye", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Example\/LeakEye.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:zixun\/LeakEye.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1DB58DD37EA1B5358CB1103D5133CD67EC14E207" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git.oschina.net:zixunapp\/AppSaber-MAC.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Example/LeakEye.xcodeproj/xcshareddata/xcschemes/LeakEye-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/LeakEye.xcodeproj/xcshareddata/xcschemes/LeakEye.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Example/LeakEye.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/LeakEye.xcworkspace/xcshareddata/LeakEye.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "1DB58DD37EA1B5358CB1103D5133CD67EC14E207", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "1DB58DD37EA1B5358CB1103D5133CD67EC14E207" : 9223372036854775807, 8 | "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "C8F0E8D0-B429-412F-B9BA-F12086FDCEFB", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "1DB58DD37EA1B5358CB1103D5133CD67EC14E207" : "LeakEye\/", 13 | "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" : "..\/.." 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "LeakEye", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Example\/LeakEye.xcworkspace", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git.oschina.net:GodEyeSwift\/LeakEye.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1DB58DD37EA1B5358CB1103D5133CD67EC14E207" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git.oschina.net:zixunapp\/AppSaber-MAC.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "BF1F56C483977AC36F575A9C50FB74A7EFF41C69" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Example/LeakEye/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // LeakEye 4 | // 5 | // Created by zixun on 12/26/2016. 6 | // Copyright (c) 2016 zixun. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import LeakEye 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | var eye = LeakEye() 18 | 19 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 20 | 21 | self.eye.delegate = self 22 | self.eye.start() 23 | 24 | return true 25 | } 26 | } 27 | 28 | extension AppDelegate: LeakEyeDelegate { 29 | func leakEye(leakEye:LeakEye,didCatchLeak object:NSObject) { 30 | print(object) 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Example/LeakEye/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/LeakEye/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Example/LeakEye/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/LeakEye/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/LeakEye/LeakEye.h: -------------------------------------------------------------------------------- 1 | // 2 | // LeakEye.h 3 | // LeakEye 4 | // 5 | // Created by zixun on 2017/3/21. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for LeakEye. 12 | FOUNDATION_EXPORT double LeakEyeVersionNumber; 13 | 14 | //! Project version string for LeakEye. 15 | FOUNDATION_EXPORT const unsigned char LeakEyeVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/LeakEye/SecondViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.swift 3 | // LeakEye 4 | // 5 | // Created by zixun on 16/12/26. 6 | // Copyright © 2016年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | class LeakTest: NSObject { 13 | 14 | var block: (() -> ())! 15 | 16 | init(block: @escaping () -> () ) { 17 | super.init() 18 | self.block = block 19 | } 20 | } 21 | 22 | class SecondViewController: UIViewController { 23 | 24 | private var test : LeakTest! 25 | 26 | private var str: String = "" 27 | 28 | override func viewDidLoad() { 29 | super.viewDidLoad() 30 | 31 | 32 | let btn = UIButton(frame: CGRect(x: 200, y: 100, width: 100, height: 100)) 33 | btn.setTitle("Pop", for: UIControlState.normal) 34 | btn.setTitleColor(UIColor.red, for: UIControlState.normal) 35 | btn.addTarget(self, action: #selector(SecondViewController.pop), for: UIControlEvents.touchUpInside) 36 | self.view.addSubview(btn) 37 | 38 | self.test = LeakTest { 39 | self.str.append("leak") 40 | } 41 | 42 | } 43 | 44 | func pop() { 45 | _ = self.navigationController?.popViewController(animated: true) 46 | 47 | } 48 | 49 | deinit { 50 | print("deinit") 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Example/LeakEye/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // LeakEye 4 | // 5 | // Created by zixun on 12/26/2016. 6 | // Copyright (c) 2016 zixun. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import LeakEye 11 | 12 | class ViewController: UIViewController { 13 | 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | let btn = UIButton(frame: CGRect(x: 100, y: 100, width: 100, height: 100)) 19 | btn.setTitle("Push", for: UIControlState.normal) 20 | btn.setTitleColor(UIColor.red, for: UIControlState.normal) 21 | btn.addTarget(self, action: #selector(ViewController.push), for: UIControlEvents.touchUpInside) 22 | self.view.addSubview(btn) 23 | 24 | } 25 | 26 | func push() { 27 | self.navigationController?.pushViewController(SecondViewController(), animated: true) 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'LeakEye_Example' do 4 | pod 'LeakEye', :path => '../' 5 | target 'LeakEye_Tests' do 6 | inherit! :search_paths 7 | 8 | 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AppSwizzle (1.1.2) 3 | - LeakEye (1.1.3): 4 | - AppSwizzle (~> 1.1.2) 5 | 6 | DEPENDENCIES: 7 | - LeakEye (from `../`) 8 | 9 | SPEC REPOS: 10 | https://github.com/CocoaPods/Specs.git: 11 | - AppSwizzle 12 | 13 | EXTERNAL SOURCES: 14 | LeakEye: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | AppSwizzle: 45d1a9d71821e7e1bb3a2a503c2979ca6fe4e46d 19 | LeakEye: 16783431129e8c36a07a7c06b273ad30ce2e82ed 20 | 21 | PODFILE CHECKSUM: 63e89493110ff745cf47b7b8f73f2abfa6f21719 22 | 23 | COCOAPODS: 1.5.0 24 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import LeakEye 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measure() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 陈奕龙(子循) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LeakEye.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint LeakEye.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'LeakEye' 11 | s.version = '1.2.0' 12 | s.summary = 'LeakEye is a memory leak monitor write by swift inspired by PLeakSniffer.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | LeakEye is a memory leak monitor write by swift inspired by PLeakSniffer.. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/zixun/LeakEye' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'zixun' => 'chenyl.exe@gmail.com' } 28 | s.source = { :git => 'https://github.com/zixun/LeakEye.git', :tag => s.version.to_s } 29 | s.social_media_url = 'https://twitter.com/zixun_' 30 | 31 | s.ios.deployment_target = '8.0' 32 | 33 | s.source_files = 'LeakEye/Classes/**/*' 34 | s.dependency 'AppSwizzle', '~> 1.3.1' 35 | end 36 | -------------------------------------------------------------------------------- /LeakEye/Classes/Agent/ObjectAgent.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ObjectAgent.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/12. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | //-------------------------------------------------------------------------- 12 | // MARK: - ObjectAgent 13 | // DESCRIPTION: the agent of object instance 14 | //-------------------------------------------------------------------------- 15 | class ObjectAgent: NSObject { 16 | 17 | //-------------------------------------------------------------------------- 18 | // MARK: INTERNAL PROPERTY 19 | //-------------------------------------------------------------------------- 20 | weak var object: NSObject? 21 | 22 | weak var host: NSObject? 23 | 24 | weak var responder: NSObject? 25 | 26 | //-------------------------------------------------------------------------- 27 | // MARK: LIFE CYCLE 28 | //-------------------------------------------------------------------------- 29 | init(object: NSObject) { 30 | super.init() 31 | self.object = object 32 | 33 | NotificationCenter.default.removeObserver(self, 34 | name: NSNotification.Name.scan, 35 | object: nil) 36 | NotificationCenter.default.addObserver(self, 37 | selector: #selector(ObjectAgent.handleScan), 38 | name: NSNotification.Name.scan, 39 | object: nil) 40 | 41 | } 42 | 43 | deinit { 44 | NotificationCenter.default.removeObserver(self, 45 | name: NSNotification.Name.scan, 46 | object: nil) 47 | } 48 | 49 | //-------------------------------------------------------------------------- 50 | // MARK: PRIVATE FUNCTION 51 | //-------------------------------------------------------------------------- 52 | @objc private func handleScan() { 53 | 54 | if self.object == nil { 55 | return 56 | } 57 | 58 | if self.didNotified { 59 | return 60 | } 61 | 62 | let alive = self.object?.isAlive() 63 | if alive == false { 64 | self.leakCheckFailCount += 1 65 | } 66 | 67 | if self.leakCheckFailCount >= 5 { 68 | self.notifyPossibleLeak() 69 | } 70 | } 71 | 72 | private func notifyPossibleLeak() { 73 | if self.didNotified { 74 | return 75 | } 76 | 77 | self.didNotified = true 78 | NotificationCenter.default.post(name: NSNotification.Name.receive, object: self.object) 79 | } 80 | 81 | //-------------------------------------------------------------------------- 82 | // MARK: PRIVATE PROPERTY 83 | //-------------------------------------------------------------------------- 84 | private var didNotified: Bool = false 85 | 86 | fileprivate var leakCheckFailCount: Int = 0 87 | } 88 | -------------------------------------------------------------------------------- /LeakEye/Classes/LeakEye.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LeakEye.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/12. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | //-------------------------------------------------------------------------- 12 | // MARK: - LeakEyeDelegate 13 | //-------------------------------------------------------------------------- 14 | @objc public protocol LeakEyeDelegate: NSObjectProtocol { 15 | @objc optional func leakEye(_ leakEye:LeakEye,didCatchLeak object:NSObject) 16 | } 17 | 18 | //-------------------------------------------------------------------------- 19 | // MARK: - LeakEye 20 | //-------------------------------------------------------------------------- 21 | open class LeakEye: NSObject { 22 | 23 | //-------------------------------------------------------------------------- 24 | // MARK: OPEN PROPERTY 25 | //-------------------------------------------------------------------------- 26 | open weak var delegate: LeakEyeDelegate? 27 | 28 | open var isOpening: Bool { 29 | get { 30 | return self.timer?.isValid ?? false 31 | } 32 | } 33 | //-------------------------------------------------------------------------- 34 | // MARK: LIFE CYCLE 35 | //-------------------------------------------------------------------------- 36 | public override init() { 37 | super.init() 38 | NotificationCenter.default.addObserver(self, selector: #selector(LeakEye.receive), name: NSNotification.Name.receive, object: nil) 39 | } 40 | 41 | //-------------------------------------------------------------------------- 42 | // MARK: OPEN FUNCTION 43 | //-------------------------------------------------------------------------- 44 | open func open() { 45 | Preparer.binding() 46 | self.startPingTimer() 47 | } 48 | 49 | open func close() { 50 | self.timer?.invalidate() 51 | self.timer = nil 52 | } 53 | 54 | private func startPingTimer() { 55 | if Thread.isMainThread == false { 56 | DispatchQueue.main.async { 57 | self.startPingTimer() 58 | return 59 | } 60 | } 61 | self.close() 62 | 63 | self.timer = Timer.scheduledTimer(timeInterval: 0.5, 64 | target: self, 65 | selector: #selector(LeakEye.scan), 66 | userInfo: nil, 67 | repeats: true) 68 | 69 | } 70 | 71 | //-------------------------------------------------------------------------- 72 | // MARK: PRIVATE FUNCTION 73 | //-------------------------------------------------------------------------- 74 | @objc private func scan() { 75 | NotificationCenter.default.post(name: NSNotification.Name.scan, object: nil) 76 | } 77 | 78 | @objc private func receive(notif:NSNotification) { 79 | guard let leakObj = notif.object as? NSObject else { 80 | return 81 | } 82 | self.delegate?.leakEye?(self, didCatchLeak: leakObj) 83 | } 84 | 85 | //-------------------------------------------------------------------------- 86 | // MARK: PRIVATE PROPEERTY 87 | //-------------------------------------------------------------------------- 88 | private var timer: Timer? 89 | } 90 | -------------------------------------------------------------------------------- /LeakEye/Classes/Monitor/NSObject+Alive.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Alive.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/13. 6 | // 7 | // 8 | 9 | import Foundation 10 | //-------------------------------------------------------------------------- 11 | // MARK: - NSObject+Alive 12 | // DESCRIPTION: NSObject extension for judge if the instance is alive 13 | //-------------------------------------------------------------------------- 14 | extension NSObject { 15 | 16 | //-------------------------------------------------------------------------- 17 | // MARK: INTERNAL FUNCTION 18 | //-------------------------------------------------------------------------- 19 | func judgeAlive() -> Bool { 20 | if self.isKind(of: UIViewController.classForCoder()) { 21 | return self.judge(self as! UIViewController) 22 | }else if self.isKind(of: UIView.classForCoder()) { 23 | return self.judge(self as! UIView ) 24 | }else { 25 | return self.judge(self) 26 | } 27 | } 28 | 29 | //-------------------------------------------------------------------------- 30 | // MARK: PRIVATE FUNCTION 31 | //-------------------------------------------------------------------------- 32 | 33 | /// judeg a comman instance is alive 34 | fileprivate func judge(_ common:NSObject) -> Bool { 35 | var alive = true 36 | if common.agent?.host == nil { 37 | alive = false 38 | } 39 | 40 | return alive 41 | } 42 | 43 | /// judge the controller instance is alive 44 | fileprivate func judge(_ controller:UIViewController) -> Bool { 45 | //1. self.view is not in the window 46 | //2. self is not in the navigation controllers 47 | 48 | var visiable = false 49 | 50 | var view = controller.view 51 | 52 | while ((view?.superview) != nil) { 53 | view = view?.superview 54 | } 55 | 56 | if view!.isKind(of: UIWindow.self) { 57 | visiable = true 58 | } 59 | 60 | var holdable = false 61 | if controller.navigationController != nil || controller.presentingViewController != nil { 62 | holdable = true 63 | } 64 | 65 | if visiable == false && holdable == false { 66 | return false 67 | }else { 68 | return true 69 | } 70 | } 71 | 72 | /// judge the view instance is alive 73 | fileprivate func judge(_ view:UIView) -> Bool { 74 | 75 | var alive = true 76 | var onUIStack = false 77 | var v = view 78 | 79 | while v.superview != nil { 80 | v = v.superview! 81 | } 82 | 83 | if v.isKind(of: UIWindow.classForCoder()) { 84 | onUIStack = true 85 | } 86 | 87 | if view.agent?.responder == nil { 88 | var r = view.next 89 | while r != nil { 90 | if r!.next == nil { 91 | break 92 | }else { 93 | r = r!.next 94 | } 95 | 96 | if (r?.isKind(of: UIViewController.classForCoder()))! { 97 | break 98 | } 99 | } 100 | view.agent?.responder = r 101 | } 102 | 103 | if onUIStack == false { 104 | alive = false 105 | if let r = view.agent?.responder { 106 | alive = r.isKind(of: UIViewController.classForCoder()) 107 | } 108 | } 109 | return alive 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /LeakEye/Classes/Monitor/NSObject+Eye.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Monitor.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/12. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | //-------------------------------------------------------------------------- 12 | // MARK: - NSObject agent extension 13 | //-------------------------------------------------------------------------- 14 | extension NSObject { 15 | fileprivate struct key { 16 | static var objectAgent = "\(#file)+\(#line)" 17 | } 18 | 19 | var agent: ObjectAgent? { 20 | get { 21 | return objc_getAssociatedObject(self, &key.objectAgent) as? ObjectAgent 22 | } 23 | set { 24 | objc_setAssociatedObject(self, &key.objectAgent, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) 25 | } 26 | } 27 | } 28 | 29 | //-------------------------------------------------------------------------- 30 | // MARK: - NSObject monitor extension 31 | //-------------------------------------------------------------------------- 32 | extension NSObject { 33 | 34 | /// monitor all retain variable of the NSObject instance 35 | /// 36 | /// - Parameter level: extend chain level 37 | func monitorAllRetainVariable(level: Int) { 38 | if level >= 5 { 39 | return 40 | } 41 | 42 | var monitorVariables = [String]() 43 | 44 | //track class level1 45 | if self.isSystemClass(self.classForCoder) == false { 46 | let var_level1 = self.getAllVariableName(self.classForCoder) 47 | monitorVariables.append(contentsOf: var_level1) 48 | } 49 | 50 | if self.isSystemClass(self.superclass) { 51 | let var_level2 = self.getAllVariableName(self.superclass!) 52 | monitorVariables.append(contentsOf: var_level2) 53 | } 54 | 55 | if self.isSystemClass(self.superclass?.superclass()) { 56 | let var_level3 = self.getAllVariableName(self.superclass!.superclass()!) 57 | monitorVariables.append(contentsOf: var_level3) 58 | } 59 | 60 | for name in monitorVariables { 61 | 62 | guard let cur = self.value(forKey: name) else { 63 | continue 64 | } 65 | 66 | guard let obj = cur as? NSObject else { 67 | continue 68 | } 69 | 70 | let ret = obj.makeAlive() 71 | if ret { 72 | obj.agent?.host = self 73 | obj.monitorAllRetainVariable(level: level+1) 74 | } 75 | } 76 | } 77 | 78 | fileprivate func getAllVariableName(_ cls:AnyClass) -> [String] { 79 | 80 | let count = UnsafeMutablePointer.allocate(capacity: 0) 81 | let properties = class_copyPropertyList(cls, count) 82 | 83 | if Int(count[0]) == 0 { 84 | free(properties) 85 | return [String]() 86 | } 87 | 88 | var result = [String]() 89 | for i in 0.. Bool { 117 | return self.judgeAlive() 118 | } 119 | 120 | /// labeled the object is alive 121 | func makeAlive() -> Bool { 122 | //agent mask be nil 123 | if self.agent != nil { 124 | return false 125 | } 126 | //not check system class 127 | if self.isSystemClass(self.classForCoder) { 128 | return false 129 | } 130 | //view object needs a super view ti be alive 131 | if self.isKind(of: UIView.classForCoder()) { 132 | let v: UIView = self as! UIView 133 | if v.superview == nil { 134 | return false 135 | } 136 | } 137 | //view controller need in the navigation or presenting 138 | if self.isKind(of: UIViewController.classForCoder()) { 139 | let vc: UIViewController = self as! UIViewController 140 | if vc.navigationController == nil && vc.presentingViewController == nil { 141 | return false 142 | } 143 | } 144 | self.agent = ObjectAgent(object: self) 145 | return true 146 | } 147 | 148 | /// judeg the specified class is one of the system class 149 | func isSystemClass(_ clazz:AnyClass?) -> Bool { 150 | 151 | guard let clazz = clazz else { 152 | return false 153 | } 154 | 155 | let bundle = Bundle(for: clazz) 156 | 157 | guard bundle.bundlePath.hasSuffix("/usr/lib") == false else { 158 | return true 159 | } 160 | 161 | //need below /usr/lib check, because "/usr/lib" bundle also has no bundleIdentifier 162 | guard let bundleIdentifier = bundle.bundleIdentifier else { 163 | return false 164 | } 165 | 166 | if bundleIdentifier.hasPrefix("com.apple."){ 167 | return true 168 | }else { 169 | return false 170 | } 171 | } 172 | 173 | } 174 | -------------------------------------------------------------------------------- /LeakEye/Classes/Monitor/Preparer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Preparer.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/13. 6 | // 7 | // 8 | 9 | import Foundation 10 | import AppSwizzle 11 | 12 | //-------------------------------------------------------------------------- 13 | // MARK: - Preparer 14 | // DESCRIPTION: Preparer for leak monitor 15 | //-------------------------------------------------------------------------- 16 | class Preparer: NSObject { 17 | 18 | class func binding() { 19 | 20 | DispatchQueue.once { () in 21 | // UINavigationController 22 | var orig = #selector(UINavigationController.pushViewController(_:animated:)) 23 | var alter = #selector(UINavigationController.app_pushViewController(_:animated:)) 24 | UINavigationController.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter) 25 | 26 | 27 | // UIView 28 | orig = #selector(UIView.didMoveToSuperview) 29 | alter = #selector(UIView.app_didMoveToSuperview) 30 | UIView.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter) 31 | 32 | // UIViewController 33 | orig = #selector(UIViewController.present(_:animated:completion:)) 34 | alter = #selector(UIViewController.app_present(_:animated:completion:)) 35 | UIViewController.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter) 36 | 37 | orig = #selector(UIViewController.viewDidAppear(_:)) 38 | alter = #selector(UIViewController.app_viewDidAppear(_:)) 39 | UIViewController.swizzleInstanceMethod(origSelector: orig, toAlterSelector: alter) 40 | 41 | } 42 | } 43 | 44 | } 45 | 46 | //-------------------------------------------------------------------------- 47 | // MARK: - UINavigationController + Preparer 48 | //-------------------------------------------------------------------------- 49 | extension UINavigationController { 50 | 51 | @objc fileprivate func app_pushViewController(_ viewController: UIViewController, animated: Bool) { 52 | self.app_pushViewController(viewController, animated: animated) 53 | 54 | viewController.makeAlive() 55 | } 56 | } 57 | 58 | //-------------------------------------------------------------------------- 59 | // MARK: - UIView + Preparer 60 | //-------------------------------------------------------------------------- 61 | extension UIView { 62 | 63 | @objc fileprivate func app_didMoveToSuperview() { 64 | self.app_didMoveToSuperview() 65 | 66 | var hasAliveParent = false 67 | 68 | var r = self.next 69 | while (r != nil) { 70 | if r!.agent != nil { 71 | hasAliveParent = true 72 | break 73 | } 74 | 75 | r = r!.next 76 | } 77 | 78 | if hasAliveParent { 79 | self.makeAlive() 80 | } 81 | } 82 | } 83 | 84 | //-------------------------------------------------------------------------- 85 | // MARK: - UIViewController + Preparer 86 | //-------------------------------------------------------------------------- 87 | extension UIViewController { 88 | 89 | @objc fileprivate func app_present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Swift.Void)? = nil) { 90 | self.app_present(viewControllerToPresent, animated: flag, completion: completion) 91 | 92 | viewControllerToPresent.makeAlive() 93 | } 94 | 95 | @objc fileprivate func app_viewDidAppear(_ animated: Bool) { 96 | self.app_viewDidAppear(animated) 97 | 98 | self.monitorAllRetainVariable(level: 0) 99 | } 100 | } 101 | 102 | -------------------------------------------------------------------------------- /LeakEye/Classes/NSNotification+LeakEye.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSNotification+LeakEye.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/13. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | extension Notification.Name { 12 | 13 | static let scan = NSNotification.Name("scan") 14 | 15 | static let receive = NSNotification.Name("receive") 16 | } 17 | -------------------------------------------------------------------------------- /LeakEye/Classes/Util/DispatchQueue+.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DispatchQueue+.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/12. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | public extension DispatchQueue { 12 | fileprivate static var _onceTracker = [String]() 13 | 14 | public class func once(_ file: String = #file, function: String = #function, line: Int = #line, block:()->Void) { 15 | let token = file + ":" + function + ":" + String(line) 16 | once(token: token, block: block) 17 | } 18 | 19 | /** 20 | Executes a block of code, associated with a unique token, only once. The code is thread safe and will 21 | only execute the code once even in the presence of multithreaded calls. 22 | 23 | - parameter token: A unique reverse DNS style name such as com.vectorform. or a GUID 24 | - parameter block: Block to execute once 25 | */ 26 | public class func once(token: String, block:()->Void) { 27 | objc_sync_enter(self) 28 | defer { objc_sync_exit(self) } 29 | 30 | 31 | if _onceTracker.contains(token) { 32 | return 33 | } 34 | 35 | _onceTracker.append(token) 36 | block() 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LeakEye/Classes/Util/String+.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+.swift 3 | // Pods 4 | // 5 | // Created by zixun on 16/12/12. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | extension String { 12 | 13 | /// Finds the string between two bookend strings if it can be found. 14 | /// 15 | /// - parameter left: The left bookend 16 | /// - parameter right: The right bookend 17 | /// 18 | /// - returns: The string between the two bookends, or nil if the bookends cannot be found, the bookends are the same or appear contiguously. 19 | public func between(_ left: String, _ right: String) -> String? { 20 | 21 | 22 | guard 23 | let leftRange = range(of:left), 24 | let rightRange = self.range(of: right, options: String.CompareOptions.backwards, range: nil, locale: nil), 25 | left != right && leftRange.upperBound != rightRange.lowerBound 26 | else { return nil } 27 | 28 | 29 | return String(self[leftRange.upperBound.. Bool { 28 | let attr = String(cString: property_getAttributes(self.property)!) 29 | return attr.contains("&") 30 | } 31 | 32 | /// name of the property 33 | func name() -> String { 34 | return String(cString: property_getName(self.property)) 35 | } 36 | 37 | /// type of the property 38 | func type() -> AnyClass? { 39 | let t = String(cString: property_getAttributes(self.property)!).components(separatedBy: ",").first 40 | guard let type = t?.between("@\"", "\"") else { 41 | return nil 42 | } 43 | return NSClassFromString(type) 44 | } 45 | //-------------------------------------------------------------------------- 46 | // MARK: PRIVATE PROPERTY 47 | //-------------------------------------------------------------------------- 48 | fileprivate var property: objc_property_t! 49 | } 50 | 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LeakEye 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/LeakEye.svg?style=flat)](http://cocoapods.org/pods/LeakEye) 4 | [![License](https://img.shields.io/cocoapods/l/LeakEye.svg?style=flat)](http://cocoapods.org/pods/LeakEye) 5 | [![Platform](https://img.shields.io/cocoapods/p/LeakEye.svg?style=flat)](http://cocoapods.org/pods/LeakEye) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | 8 | LeakEye is a memory leak monitor inspired by PLeakSniffer. 9 | 10 | ## Family 11 | This library is derived from the [GodEye](https://github.com/zixun/GodEye) project which can automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code. Just like god opened his eyes 12 | 13 | ## Book & Principle 14 | 15 | **I has wrote a book named [《iOS监控编程》](),each chapter records the course function of the implementation details and the way to explore.sorry for english friends,this book wrote by chineses.** 16 | 17 | 18 | ## Example 19 | 20 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 21 | 22 | 23 | ## Installation 24 | 25 | ### CocoaPods 26 | LeakEye is available through [CocoaPods](http://cocoapods.org). To install 27 | it, simply add the following line to your Podfile: 28 | 29 | ```ruby 30 | pod "LeakEye" 31 | ``` 32 | 33 | ### Carthage 34 | Or, if you’re using [Carthage](https://github.com/Carthage/Carthage), add SwViewCapture to your Cartfile: 35 | 36 | ``` 37 | github "zixun/LeakEye" 38 | ``` 39 | 40 | ## Usage 41 | Import the lib: 42 | 43 | ```swift 44 | import LeakEye 45 | ``` 46 | 47 | Declare an instance variable: 48 | 49 | ```swift 50 | var eye = LeakEye() 51 | ``` 52 | 53 | Start monitor: 54 | 55 | ```swift 56 | self.eye.delegate = self 57 | self.eye.start() 58 | ``` 59 | 60 | Implement the delegate: 61 | 62 | ```swift 63 | func leakEye(leakEye:LeakEye,didCatchLeak object:NSObject) { 64 | print(object) 65 | } 66 | ``` 67 | 68 | that's all!(就酱) 69 | 70 | ## Thanks 71 | Thanks for [PLeakSniffer](https://github.com/music4kid/PLeakSniffer),LeakEye is inspired by it. 72 | 73 | ## Author 74 | 75 | name: 陈奕龙 76 | 77 | twitter: [@zixun_](https://twitter.com/zixun_) 78 | 79 | email: chenyl.exe@gmail.com 80 | 81 | github: [zixun](https://github.com/zixun) 82 | 83 | blog: [子循(SubCycle)](http://zixun.github.io/) 84 | 85 | ## License 86 | 87 | LeakEye is available under the MIT license. See the LICENSE file for more info. 88 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------