├── .gitignore ├── .travis.yml ├── Example ├── NSMainProject.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── NSMainProject-Example.xcscheme ├── NSMainProject.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── NSMainProject │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── NSAppDelegate.h │ ├── NSAppDelegate.m │ ├── NSMainProject-Info.plist │ ├── NSMainProject-Prefix.pch │ ├── NSTestViewController.h │ ├── NSTestViewController.m │ ├── NSViewController.h │ ├── NSViewController.m │ ├── Target_NSTest.h │ ├── Target_NSTest.m │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile ├── Podfile.lock ├── Pods │ ├── CTMediator │ │ ├── CTMediator │ │ │ └── CTMediator │ │ │ │ ├── CTMediator.h │ │ │ │ └── CTMediator.m │ │ ├── FILE_LICENSE │ │ └── readme.md │ ├── Headers │ │ ├── Private │ │ │ ├── CTMediator │ │ │ │ └── CTMediator.h │ │ │ ├── ModuleA │ │ │ │ ├── TargetViewContainer.h │ │ │ │ └── Target_EleInvoice.h │ │ │ ├── ModuleACategory │ │ │ │ └── CTMediator+Elelnvoice.h │ │ │ ├── ModuleB │ │ │ │ ├── BViewController.h │ │ │ │ ├── ModuleBViewController.h │ │ │ │ ├── PageBViewController.h │ │ │ │ ├── Target_ModuleB.h │ │ │ │ └── UIView+LayoutMethods.h │ │ │ └── NSModuleBCategory │ │ │ │ └── CTMediator+ModuleB.h │ │ └── Public │ │ │ ├── CTMediator │ │ │ └── CTMediator.h │ │ │ ├── ModuleA │ │ │ ├── TargetViewContainer.h │ │ │ └── Target_EleInvoice.h │ │ │ ├── ModuleACategory │ │ │ └── CTMediator+Elelnvoice.h │ │ │ ├── ModuleB │ │ │ ├── BViewController.h │ │ │ ├── ModuleBViewController.h │ │ │ ├── PageBViewController.h │ │ │ ├── Target_ModuleB.h │ │ │ └── UIView+LayoutMethods.h │ │ │ └── NSModuleBCategory │ │ │ └── CTMediator+ModuleB.h │ ├── Local Podspecs │ │ └── NSMainProject.podspec.json │ ├── Manifest.lock │ ├── ModuleA │ │ ├── LICENSE │ │ ├── ModuleA │ │ │ └── Classes │ │ │ │ ├── TargetViewContainer.h │ │ │ │ ├── TargetViewContainer.m │ │ │ │ ├── Target_EleInvoice.h │ │ │ │ └── Target_EleInvoice.m │ │ └── README.md │ ├── ModuleACategory │ │ ├── LICENSE │ │ ├── ModuleACategory │ │ │ └── Classes │ │ │ │ └── Category │ │ │ │ ├── CTMediator+Elelnvoice.h │ │ │ │ └── CTMediator+Elelnvoice.m │ │ └── README.md │ ├── ModuleB │ │ ├── LICENSE │ │ ├── ModuleB │ │ │ └── Classes │ │ │ │ ├── Controller │ │ │ │ ├── BViewController.h │ │ │ │ ├── BViewController.m │ │ │ │ ├── ModuleBViewController.h │ │ │ │ ├── ModuleBViewController.m │ │ │ │ ├── PageBViewController.h │ │ │ │ └── PageBViewController.m │ │ │ │ ├── HandyFrame │ │ │ │ ├── UIView+LayoutMethods.h │ │ │ │ └── UIView+LayoutMethods.m │ │ │ │ └── Target │ │ │ │ ├── Target_ModuleB.h │ │ │ │ └── Target_ModuleB.m │ │ └── README.md │ ├── NSModuleBCategory │ │ ├── LICENSE │ │ ├── NSModuleBCategory │ │ │ └── Classes │ │ │ │ └── Category │ │ │ │ ├── CTMediator+ModuleB.h │ │ │ │ └── CTMediator+ModuleB.m │ │ └── README.md │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── CTMediator │ │ ├── CTMediator-dummy.m │ │ ├── CTMediator-prefix.pch │ │ └── CTMediator.xcconfig │ │ ├── ModuleA │ │ ├── ModuleA-dummy.m │ │ ├── ModuleA-prefix.pch │ │ └── ModuleA.xcconfig │ │ ├── ModuleACategory │ │ ├── ModuleACategory-dummy.m │ │ ├── ModuleACategory-prefix.pch │ │ └── ModuleACategory.xcconfig │ │ ├── ModuleB │ │ ├── ModuleB-dummy.m │ │ ├── ModuleB-prefix.pch │ │ └── ModuleB.xcconfig │ │ ├── NSMainProject │ │ ├── NSMainProject-Info.plist │ │ ├── NSMainProject-dummy.m │ │ ├── NSMainProject-prefix.pch │ │ ├── NSMainProject-umbrella.h │ │ ├── NSMainProject.modulemap │ │ └── NSMainProject.xcconfig │ │ ├── NSModuleBCategory │ │ ├── NSModuleBCategory-dummy.m │ │ ├── NSModuleBCategory-prefix.pch │ │ └── NSModuleBCategory.xcconfig │ │ ├── Pods-NSMainProject_Example │ │ ├── Pods-NSMainProject_Example-Info.plist │ │ ├── Pods-NSMainProject_Example-acknowledgements.markdown │ │ ├── Pods-NSMainProject_Example-acknowledgements.plist │ │ ├── Pods-NSMainProject_Example-dummy.m │ │ ├── Pods-NSMainProject_Example-frameworks.sh │ │ ├── Pods-NSMainProject_Example-umbrella.h │ │ ├── Pods-NSMainProject_Example.debug.xcconfig │ │ ├── Pods-NSMainProject_Example.modulemap │ │ └── Pods-NSMainProject_Example.release.xcconfig │ │ └── Pods-NSMainProject_Tests │ │ ├── Pods-NSMainProject_Tests-Info.plist │ │ ├── Pods-NSMainProject_Tests-acknowledgements.markdown │ │ ├── Pods-NSMainProject_Tests-acknowledgements.plist │ │ ├── Pods-NSMainProject_Tests-dummy.m │ │ ├── Pods-NSMainProject_Tests-umbrella.h │ │ ├── Pods-NSMainProject_Tests.debug.xcconfig │ │ ├── Pods-NSMainProject_Tests.modulemap │ │ └── Pods-NSMainProject_Tests.release.xcconfig └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── NSMainProject.podspec ├── NSMainProject ├── Assets │ └── .gitkeep └── Classes │ └── .gitkeep ├── README.md ├── _Pods.xcodeproj └── imgs └── 270478-21ba52ac7438edd8.png /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/NSMainProject.xcworkspace -scheme NSMainProject-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/NSMainProject.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D232E763CC0415ACE51F345 /* libPods-NSMainProject_Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C71477861F252838EF75D924 /* libPods-NSMainProject_Tests.a */; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* NSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* NSAppDelegate.m */; }; 17 | 6003F5A7195388D20070C39A /* NSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* NSViewController.m */; }; 18 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 19 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 20 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 21 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 22 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 24 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 25 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 26 | C6E946922202D17E00A59505 /* NSTestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C6E946912202D17E00A59505 /* NSTestViewController.m */; }; 27 | C6E946952202D53800A59505 /* Target_NSTest.m in Sources */ = {isa = PBXBuildFile; fileRef = C6E946942202D53800A59505 /* Target_NSTest.m */; }; 28 | DD5EFB97A40EEA9E81E4932A /* libPods-NSMainProject_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CB0501324A7BB8CC3F640A94 /* libPods-NSMainProject_Example.a */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 6003F582195388D10070C39A /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 6003F589195388D20070C39A; 37 | remoteInfo = NSMainProject; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 3E9DFC6DBF04E80D5E40FCC7 /* Pods-NSMainProject_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NSMainProject_Tests.debug.xcconfig"; path = "Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests.debug.xcconfig"; sourceTree = ""; }; 43 | 6003F58A195388D20070C39A /* NSMainProject_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NSMainProject_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 45 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 46 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 47 | 6003F595195388D20070C39A /* NSMainProject-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NSMainProject-Info.plist"; sourceTree = ""; }; 48 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 49 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 50 | 6003F59B195388D20070C39A /* NSMainProject-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSMainProject-Prefix.pch"; sourceTree = ""; }; 51 | 6003F59C195388D20070C39A /* NSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSAppDelegate.h; sourceTree = ""; }; 52 | 6003F59D195388D20070C39A /* NSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSAppDelegate.m; sourceTree = ""; }; 53 | 6003F5A5195388D20070C39A /* NSViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSViewController.h; sourceTree = ""; }; 54 | 6003F5A6195388D20070C39A /* NSViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSViewController.m; sourceTree = ""; }; 55 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 56 | 6003F5AE195388D20070C39A /* NSMainProject_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NSMainProject_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 58 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 59 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 60 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 61 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 62 | 6CC0614836165340AAC96EFB /* Pods-NSMainProject_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NSMainProject_Example.release.xcconfig"; path = "Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example.release.xcconfig"; sourceTree = ""; }; 63 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 64 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 65 | 9540025653AE045CA5A83CEA /* NSMainProject.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = NSMainProject.podspec; path = ../NSMainProject.podspec; sourceTree = ""; }; 66 | 964C4EE6E410594FC8F98E77 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 67 | C6E946902202D17E00A59505 /* NSTestViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSTestViewController.h; sourceTree = ""; }; 68 | C6E946912202D17E00A59505 /* NSTestViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSTestViewController.m; sourceTree = ""; }; 69 | C6E946932202D53800A59505 /* Target_NSTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Target_NSTest.h; sourceTree = ""; }; 70 | C6E946942202D53800A59505 /* Target_NSTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Target_NSTest.m; sourceTree = ""; }; 71 | C71477861F252838EF75D924 /* libPods-NSMainProject_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NSMainProject_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 72 | C91306A583627C9D93F4164B /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 73 | CB0501324A7BB8CC3F640A94 /* libPods-NSMainProject_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NSMainProject_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 74 | D72F7C5B09FB0349EB483677 /* Pods-NSMainProject_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NSMainProject_Tests.release.xcconfig"; path = "Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests.release.xcconfig"; sourceTree = ""; }; 75 | E38B717FEC0D32E00E148D37 /* Pods-NSMainProject_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NSMainProject_Example.debug.xcconfig"; path = "Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example.debug.xcconfig"; sourceTree = ""; }; 76 | /* End PBXFileReference section */ 77 | 78 | /* Begin PBXFrameworksBuildPhase section */ 79 | 6003F587195388D20070C39A /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 84 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 85 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 86 | DD5EFB97A40EEA9E81E4932A /* libPods-NSMainProject_Example.a in Frameworks */, 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | 6003F5AB195388D20070C39A /* Frameworks */ = { 91 | isa = PBXFrameworksBuildPhase; 92 | buildActionMask = 2147483647; 93 | files = ( 94 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 95 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 96 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 97 | 1D232E763CC0415ACE51F345 /* libPods-NSMainProject_Tests.a in Frameworks */, 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | /* End PBXFrameworksBuildPhase section */ 102 | 103 | /* Begin PBXGroup section */ 104 | 589CE4A10584A1AD1B4DD2AB /* Pods */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | E38B717FEC0D32E00E148D37 /* Pods-NSMainProject_Example.debug.xcconfig */, 108 | 6CC0614836165340AAC96EFB /* Pods-NSMainProject_Example.release.xcconfig */, 109 | 3E9DFC6DBF04E80D5E40FCC7 /* Pods-NSMainProject_Tests.debug.xcconfig */, 110 | D72F7C5B09FB0349EB483677 /* Pods-NSMainProject_Tests.release.xcconfig */, 111 | ); 112 | path = Pods; 113 | sourceTree = ""; 114 | }; 115 | 6003F581195388D10070C39A = { 116 | isa = PBXGroup; 117 | children = ( 118 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 119 | 6003F593195388D20070C39A /* Example for NSMainProject */, 120 | 6003F5B5195388D20070C39A /* Tests */, 121 | 6003F58C195388D20070C39A /* Frameworks */, 122 | 6003F58B195388D20070C39A /* Products */, 123 | 589CE4A10584A1AD1B4DD2AB /* Pods */, 124 | ); 125 | sourceTree = ""; 126 | }; 127 | 6003F58B195388D20070C39A /* Products */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 6003F58A195388D20070C39A /* NSMainProject_Example.app */, 131 | 6003F5AE195388D20070C39A /* NSMainProject_Tests.xctest */, 132 | ); 133 | name = Products; 134 | sourceTree = ""; 135 | }; 136 | 6003F58C195388D20070C39A /* Frameworks */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 6003F58D195388D20070C39A /* Foundation.framework */, 140 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 141 | 6003F591195388D20070C39A /* UIKit.framework */, 142 | 6003F5AF195388D20070C39A /* XCTest.framework */, 143 | CB0501324A7BB8CC3F640A94 /* libPods-NSMainProject_Example.a */, 144 | C71477861F252838EF75D924 /* libPods-NSMainProject_Tests.a */, 145 | ); 146 | name = Frameworks; 147 | sourceTree = ""; 148 | }; 149 | 6003F593195388D20070C39A /* Example for NSMainProject */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 6003F59C195388D20070C39A /* NSAppDelegate.h */, 153 | 6003F59D195388D20070C39A /* NSAppDelegate.m */, 154 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 155 | 6003F5A5195388D20070C39A /* NSViewController.h */, 156 | 6003F5A6195388D20070C39A /* NSViewController.m */, 157 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, 158 | 6003F5A8195388D20070C39A /* Images.xcassets */, 159 | 6003F594195388D20070C39A /* Supporting Files */, 160 | C6E946902202D17E00A59505 /* NSTestViewController.h */, 161 | C6E946912202D17E00A59505 /* NSTestViewController.m */, 162 | C6E946932202D53800A59505 /* Target_NSTest.h */, 163 | C6E946942202D53800A59505 /* Target_NSTest.m */, 164 | ); 165 | name = "Example for NSMainProject"; 166 | path = NSMainProject; 167 | sourceTree = ""; 168 | }; 169 | 6003F594195388D20070C39A /* Supporting Files */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 6003F595195388D20070C39A /* NSMainProject-Info.plist */, 173 | 6003F596195388D20070C39A /* InfoPlist.strings */, 174 | 6003F599195388D20070C39A /* main.m */, 175 | 6003F59B195388D20070C39A /* NSMainProject-Prefix.pch */, 176 | ); 177 | name = "Supporting Files"; 178 | sourceTree = ""; 179 | }; 180 | 6003F5B5195388D20070C39A /* Tests */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | 6003F5BB195388D20070C39A /* Tests.m */, 184 | 6003F5B6195388D20070C39A /* Supporting Files */, 185 | ); 186 | path = Tests; 187 | sourceTree = ""; 188 | }; 189 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 193 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 194 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 195 | ); 196 | name = "Supporting Files"; 197 | sourceTree = ""; 198 | }; 199 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | 9540025653AE045CA5A83CEA /* NSMainProject.podspec */, 203 | C91306A583627C9D93F4164B /* README.md */, 204 | 964C4EE6E410594FC8F98E77 /* LICENSE */, 205 | ); 206 | name = "Podspec Metadata"; 207 | sourceTree = ""; 208 | }; 209 | /* End PBXGroup section */ 210 | 211 | /* Begin PBXNativeTarget section */ 212 | 6003F589195388D20070C39A /* NSMainProject_Example */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "NSMainProject_Example" */; 215 | buildPhases = ( 216 | 035B707828E861FC6D06080B /* [CP] Check Pods Manifest.lock */, 217 | 6003F586195388D20070C39A /* Sources */, 218 | 6003F587195388D20070C39A /* Frameworks */, 219 | 6003F588195388D20070C39A /* Resources */, 220 | ); 221 | buildRules = ( 222 | ); 223 | dependencies = ( 224 | ); 225 | name = NSMainProject_Example; 226 | productName = NSMainProject; 227 | productReference = 6003F58A195388D20070C39A /* NSMainProject_Example.app */; 228 | productType = "com.apple.product-type.application"; 229 | }; 230 | 6003F5AD195388D20070C39A /* NSMainProject_Tests */ = { 231 | isa = PBXNativeTarget; 232 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "NSMainProject_Tests" */; 233 | buildPhases = ( 234 | A04DF49B7C0CD05478F2F929 /* [CP] Check Pods Manifest.lock */, 235 | 6003F5AA195388D20070C39A /* Sources */, 236 | 6003F5AB195388D20070C39A /* Frameworks */, 237 | 6003F5AC195388D20070C39A /* Resources */, 238 | ); 239 | buildRules = ( 240 | ); 241 | dependencies = ( 242 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 243 | ); 244 | name = NSMainProject_Tests; 245 | productName = NSMainProjectTests; 246 | productReference = 6003F5AE195388D20070C39A /* NSMainProject_Tests.xctest */; 247 | productType = "com.apple.product-type.bundle.unit-test"; 248 | }; 249 | /* End PBXNativeTarget section */ 250 | 251 | /* Begin PBXProject section */ 252 | 6003F582195388D10070C39A /* Project object */ = { 253 | isa = PBXProject; 254 | attributes = { 255 | CLASSPREFIX = NS; 256 | LastUpgradeCheck = 0720; 257 | ORGANIZATIONNAME = NShunJian; 258 | TargetAttributes = { 259 | 6003F5AD195388D20070C39A = { 260 | TestTargetID = 6003F589195388D20070C39A; 261 | }; 262 | }; 263 | }; 264 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "NSMainProject" */; 265 | compatibilityVersion = "Xcode 3.2"; 266 | developmentRegion = English; 267 | hasScannedForEncodings = 0; 268 | knownRegions = ( 269 | en, 270 | Base, 271 | ); 272 | mainGroup = 6003F581195388D10070C39A; 273 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 274 | projectDirPath = ""; 275 | projectRoot = ""; 276 | targets = ( 277 | 6003F589195388D20070C39A /* NSMainProject_Example */, 278 | 6003F5AD195388D20070C39A /* NSMainProject_Tests */, 279 | ); 280 | }; 281 | /* End PBXProject section */ 282 | 283 | /* Begin PBXResourcesBuildPhase section */ 284 | 6003F588195388D20070C39A /* Resources */ = { 285 | isa = PBXResourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 289 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, 290 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 291 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | 6003F5AC195388D20070C39A /* Resources */ = { 296 | isa = PBXResourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXResourcesBuildPhase section */ 304 | 305 | /* Begin PBXShellScriptBuildPhase section */ 306 | 035B707828E861FC6D06080B /* [CP] Check Pods Manifest.lock */ = { 307 | isa = PBXShellScriptBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | ); 311 | inputFileListPaths = ( 312 | ); 313 | inputPaths = ( 314 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 315 | "${PODS_ROOT}/Manifest.lock", 316 | ); 317 | name = "[CP] Check Pods Manifest.lock"; 318 | outputFileListPaths = ( 319 | ); 320 | outputPaths = ( 321 | "$(DERIVED_FILE_DIR)/Pods-NSMainProject_Example-checkManifestLockResult.txt", 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | shellPath = /bin/sh; 325 | 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"; 326 | showEnvVarsInLog = 0; 327 | }; 328 | A04DF49B7C0CD05478F2F929 /* [CP] Check Pods Manifest.lock */ = { 329 | isa = PBXShellScriptBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | ); 333 | inputFileListPaths = ( 334 | ); 335 | inputPaths = ( 336 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 337 | "${PODS_ROOT}/Manifest.lock", 338 | ); 339 | name = "[CP] Check Pods Manifest.lock"; 340 | outputFileListPaths = ( 341 | ); 342 | outputPaths = ( 343 | "$(DERIVED_FILE_DIR)/Pods-NSMainProject_Tests-checkManifestLockResult.txt", 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | shellPath = /bin/sh; 347 | 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"; 348 | showEnvVarsInLog = 0; 349 | }; 350 | /* End PBXShellScriptBuildPhase section */ 351 | 352 | /* Begin PBXSourcesBuildPhase section */ 353 | 6003F586195388D20070C39A /* Sources */ = { 354 | isa = PBXSourcesBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | 6003F59E195388D20070C39A /* NSAppDelegate.m in Sources */, 358 | C6E946922202D17E00A59505 /* NSTestViewController.m in Sources */, 359 | 6003F5A7195388D20070C39A /* NSViewController.m in Sources */, 360 | 6003F59A195388D20070C39A /* main.m in Sources */, 361 | C6E946952202D53800A59505 /* Target_NSTest.m in Sources */, 362 | ); 363 | runOnlyForDeploymentPostprocessing = 0; 364 | }; 365 | 6003F5AA195388D20070C39A /* Sources */ = { 366 | isa = PBXSourcesBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | /* End PBXSourcesBuildPhase section */ 374 | 375 | /* Begin PBXTargetDependency section */ 376 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 377 | isa = PBXTargetDependency; 378 | target = 6003F589195388D20070C39A /* NSMainProject_Example */; 379 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 380 | }; 381 | /* End PBXTargetDependency section */ 382 | 383 | /* Begin PBXVariantGroup section */ 384 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 385 | isa = PBXVariantGroup; 386 | children = ( 387 | 6003F597195388D20070C39A /* en */, 388 | ); 389 | name = InfoPlist.strings; 390 | sourceTree = ""; 391 | }; 392 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 393 | isa = PBXVariantGroup; 394 | children = ( 395 | 6003F5B9195388D20070C39A /* en */, 396 | ); 397 | name = InfoPlist.strings; 398 | sourceTree = ""; 399 | }; 400 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { 401 | isa = PBXVariantGroup; 402 | children = ( 403 | 71719F9E1E33DC2100824A3D /* Base */, 404 | ); 405 | name = LaunchScreen.storyboard; 406 | sourceTree = ""; 407 | }; 408 | /* End PBXVariantGroup section */ 409 | 410 | /* Begin XCBuildConfiguration section */ 411 | 6003F5BD195388D20070C39A /* Debug */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ALWAYS_SEARCH_USER_PATHS = NO; 415 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 416 | CLANG_CXX_LIBRARY = "libc++"; 417 | CLANG_ENABLE_MODULES = YES; 418 | CLANG_ENABLE_OBJC_ARC = YES; 419 | CLANG_WARN_BOOL_CONVERSION = YES; 420 | CLANG_WARN_CONSTANT_CONVERSION = YES; 421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 422 | CLANG_WARN_EMPTY_BODY = YES; 423 | CLANG_WARN_ENUM_CONVERSION = YES; 424 | CLANG_WARN_INT_CONVERSION = YES; 425 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 426 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 427 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 428 | COPY_PHASE_STRIP = NO; 429 | ENABLE_TESTABILITY = YES; 430 | GCC_C_LANGUAGE_STANDARD = gnu99; 431 | GCC_DYNAMIC_NO_PIC = NO; 432 | GCC_OPTIMIZATION_LEVEL = 0; 433 | GCC_PREPROCESSOR_DEFINITIONS = ( 434 | "DEBUG=1", 435 | "$(inherited)", 436 | ); 437 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 438 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 439 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 440 | GCC_WARN_UNDECLARED_SELECTOR = YES; 441 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 442 | GCC_WARN_UNUSED_FUNCTION = YES; 443 | GCC_WARN_UNUSED_VARIABLE = YES; 444 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 445 | ONLY_ACTIVE_ARCH = YES; 446 | SDKROOT = iphoneos; 447 | TARGETED_DEVICE_FAMILY = "1,2"; 448 | }; 449 | name = Debug; 450 | }; 451 | 6003F5BE195388D20070C39A /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ALWAYS_SEARCH_USER_PATHS = NO; 455 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 456 | CLANG_CXX_LIBRARY = "libc++"; 457 | CLANG_ENABLE_MODULES = YES; 458 | CLANG_ENABLE_OBJC_ARC = YES; 459 | CLANG_WARN_BOOL_CONVERSION = YES; 460 | CLANG_WARN_CONSTANT_CONVERSION = YES; 461 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 462 | CLANG_WARN_EMPTY_BODY = YES; 463 | CLANG_WARN_ENUM_CONVERSION = YES; 464 | CLANG_WARN_INT_CONVERSION = YES; 465 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 466 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 467 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 468 | COPY_PHASE_STRIP = YES; 469 | ENABLE_NS_ASSERTIONS = NO; 470 | GCC_C_LANGUAGE_STANDARD = gnu99; 471 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 472 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 473 | GCC_WARN_UNDECLARED_SELECTOR = YES; 474 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 475 | GCC_WARN_UNUSED_FUNCTION = YES; 476 | GCC_WARN_UNUSED_VARIABLE = YES; 477 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 478 | SDKROOT = iphoneos; 479 | TARGETED_DEVICE_FAMILY = "1,2"; 480 | VALIDATE_PRODUCT = YES; 481 | }; 482 | name = Release; 483 | }; 484 | 6003F5C0195388D20070C39A /* Debug */ = { 485 | isa = XCBuildConfiguration; 486 | baseConfigurationReference = E38B717FEC0D32E00E148D37 /* Pods-NSMainProject_Example.debug.xcconfig */; 487 | buildSettings = { 488 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 489 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 490 | GCC_PREFIX_HEADER = "NSMainProject/NSMainProject-Prefix.pch"; 491 | INFOPLIST_FILE = "NSMainProject/NSMainProject-Info.plist"; 492 | MODULE_NAME = ExampleApp; 493 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 494 | PRODUCT_NAME = "$(TARGET_NAME)"; 495 | WRAPPER_EXTENSION = app; 496 | }; 497 | name = Debug; 498 | }; 499 | 6003F5C1195388D20070C39A /* Release */ = { 500 | isa = XCBuildConfiguration; 501 | baseConfigurationReference = 6CC0614836165340AAC96EFB /* Pods-NSMainProject_Example.release.xcconfig */; 502 | buildSettings = { 503 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 504 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 505 | GCC_PREFIX_HEADER = "NSMainProject/NSMainProject-Prefix.pch"; 506 | INFOPLIST_FILE = "NSMainProject/NSMainProject-Info.plist"; 507 | MODULE_NAME = ExampleApp; 508 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 509 | PRODUCT_NAME = "$(TARGET_NAME)"; 510 | WRAPPER_EXTENSION = app; 511 | }; 512 | name = Release; 513 | }; 514 | 6003F5C3195388D20070C39A /* Debug */ = { 515 | isa = XCBuildConfiguration; 516 | baseConfigurationReference = 3E9DFC6DBF04E80D5E40FCC7 /* Pods-NSMainProject_Tests.debug.xcconfig */; 517 | buildSettings = { 518 | BUNDLE_LOADER = "$(TEST_HOST)"; 519 | FRAMEWORK_SEARCH_PATHS = ( 520 | "$(SDKROOT)/Developer/Library/Frameworks", 521 | "$(inherited)", 522 | "$(DEVELOPER_FRAMEWORKS_DIR)", 523 | ); 524 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 525 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 526 | GCC_PREPROCESSOR_DEFINITIONS = ( 527 | "DEBUG=1", 528 | "$(inherited)", 529 | ); 530 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 531 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NSMainProject_Example.app/NSMainProject_Example"; 534 | WRAPPER_EXTENSION = xctest; 535 | }; 536 | name = Debug; 537 | }; 538 | 6003F5C4195388D20070C39A /* Release */ = { 539 | isa = XCBuildConfiguration; 540 | baseConfigurationReference = D72F7C5B09FB0349EB483677 /* Pods-NSMainProject_Tests.release.xcconfig */; 541 | buildSettings = { 542 | BUNDLE_LOADER = "$(TEST_HOST)"; 543 | FRAMEWORK_SEARCH_PATHS = ( 544 | "$(SDKROOT)/Developer/Library/Frameworks", 545 | "$(inherited)", 546 | "$(DEVELOPER_FRAMEWORKS_DIR)", 547 | ); 548 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 549 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 550 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 551 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 552 | PRODUCT_NAME = "$(TARGET_NAME)"; 553 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NSMainProject_Example.app/NSMainProject_Example"; 554 | WRAPPER_EXTENSION = xctest; 555 | }; 556 | name = Release; 557 | }; 558 | /* End XCBuildConfiguration section */ 559 | 560 | /* Begin XCConfigurationList section */ 561 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "NSMainProject" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | 6003F5BD195388D20070C39A /* Debug */, 565 | 6003F5BE195388D20070C39A /* Release */, 566 | ); 567 | defaultConfigurationIsVisible = 0; 568 | defaultConfigurationName = Release; 569 | }; 570 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "NSMainProject_Example" */ = { 571 | isa = XCConfigurationList; 572 | buildConfigurations = ( 573 | 6003F5C0195388D20070C39A /* Debug */, 574 | 6003F5C1195388D20070C39A /* Release */, 575 | ); 576 | defaultConfigurationIsVisible = 0; 577 | defaultConfigurationName = Release; 578 | }; 579 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "NSMainProject_Tests" */ = { 580 | isa = XCConfigurationList; 581 | buildConfigurations = ( 582 | 6003F5C3195388D20070C39A /* Debug */, 583 | 6003F5C4195388D20070C39A /* Release */, 584 | ); 585 | defaultConfigurationIsVisible = 0; 586 | defaultConfigurationName = Release; 587 | }; 588 | /* End XCConfigurationList section */ 589 | }; 590 | rootObject = 6003F582195388D10070C39A /* Project object */; 591 | } 592 | -------------------------------------------------------------------------------- /Example/NSMainProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/NSMainProject.xcodeproj/xcshareddata/xcschemes/NSMainProject-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/NSMainProject.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/NSMainProject.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/NSMainProject/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /Example/NSMainProject/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 | -------------------------------------------------------------------------------- /Example/NSMainProject/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSAppDelegate.h 3 | // NSMainProject 4 | // 5 | // Created by NShunJian on 01/31/2019. 6 | // Copyright (c) 2019 NShunJian. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface NSAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSAppDelegate.m 3 | // NSMainProject 4 | // 5 | // Created by NShunJian on 01/31/2019. 6 | // Copyright (c) 2019 NShunJian. All rights reserved. 7 | // 8 | 9 | #import "NSAppDelegate.h" 10 | #import "NSViewController.h" 11 | 12 | @implementation NSAppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | // Override point for customization after application launch. 17 | // Override point for customization after application launch. 18 | NSViewController *VC = [[NSViewController alloc] init]; 19 | UINavigationController *navVC = [[UINavigationController alloc] initWithRootViewController:VC]; 20 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 21 | self.window.backgroundColor = [UIColor whiteColor]; 22 | self.window.rootViewController = navVC; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application 28 | { 29 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 30 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 31 | } 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application 34 | { 35 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application 40 | { 41 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 42 | } 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application 45 | { 46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 47 | } 48 | 49 | - (void)applicationWillTerminate:(UIApplication *)application 50 | { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSMainProject-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSMainProject-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSTestViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSTestViewController.h 3 | // NSMainProject_Example 4 | // 5 | // Created by NShunjian on 2019/1/31. 6 | // Copyright © 2019年 NShunJian. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSTestViewController : UIViewController 14 | @property (nonatomic,strong) NSDictionary *params; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSTestViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSTestViewController.m 3 | // NSMainProject_Example 4 | // 5 | // Created by NShunjian on 2019/1/31. 6 | // Copyright © 2019年 NShunJian. All rights reserved. 7 | // 8 | 9 | #import "NSTestViewController.h" 10 | 11 | @interface NSTestViewController () 12 | 13 | @end 14 | 15 | @implementation NSTestViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | self.title = self.params[@"param"]; 20 | // Do any additional setup after loading the view. 21 | self.view.backgroundColor = [UIColor redColor]; 22 | } 23 | 24 | /* 25 | #pragma mark - Navigation 26 | 27 | // In a storyboard-based application, you will often want to do a little preparation before navigation 28 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 29 | // Get the new view controller using [segue destinationViewController]. 30 | // Pass the selected object to the new view controller. 31 | } 32 | */ 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSViewController.h 3 | // NSMainProject 4 | // 5 | // Created by NShunJian on 01/31/2019. 6 | // Copyright (c) 2019 NShunJian. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface NSViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/NSMainProject/NSViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSViewController.m 3 | // NSMainProject 4 | // 5 | // Created by NShunJian on 01/31/2019. 6 | // Copyright (c) 2019 NShunJian. All rights reserved. 7 | // 8 | 9 | #import "NSViewController.h" 10 | #import 11 | #import 12 | 13 | 14 | @interface NSViewController () 15 | 16 | @end 17 | 18 | @implementation NSViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view, typically from a nib. 23 | 24 | self.title = @"这是项目主工程"; 25 | 26 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; 27 | btn.frame = CGRectMake(50, 100, 300, 100); 28 | btn.backgroundColor = [UIColor orangeColor]; 29 | [btn setTitle:@"点我进业务模块组件" forState: UIControlStateNormal]; 30 | [btn addTarget:self action:@selector(moduleA) forControlEvents:UIControlEventTouchUpInside]; 31 | [self.view addSubview:btn]; 32 | 33 | UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeCustom]; 34 | btn2.frame = CGRectMake(50, 300, 300, 100); 35 | btn2.backgroundColor = [UIColor orangeColor]; 36 | [btn2 setTitle:@"点我进业B务模块B组件" forState: UIControlStateNormal]; 37 | [btn2 addTarget:self action:@selector(moduleB) forControlEvents:UIControlEventTouchUpInside]; 38 | [self.view addSubview:btn2]; 39 | 40 | UIButton *btn3 = [UIButton buttonWithType:UIButtonTypeCustom]; 41 | btn3.frame = CGRectMake(50, 500, 300, 100); 42 | btn3.backgroundColor = [UIColor orangeColor]; 43 | [btn3 setTitle:@"点我进B组件" forState: UIControlStateNormal]; 44 | [btn3 addTarget:self action:@selector(moduleC) forControlEvents:UIControlEventTouchUpInside]; 45 | [self.view addSubview:btn3]; 46 | } 47 | 48 | - (void)moduleA { 49 | UIViewController *VC = [[CTMediator sharedInstance] performTarget:@"EleInvoice" action:@"viewController" shouldCacheTarget:NO EleInvoice_ViewControllerWithCallback:^(NSString *result) { 50 | NSLog(@"moduleA_%@",result); 51 | }]; 52 | [self.navigationController pushViewController:VC animated:YES]; 53 | } 54 | 55 | - (void)moduleB { 56 | // UIViewController *VC = [[CTMediator sharedInstance] performTarget:@"NSTest" action:@"method" shouldCacheTarget:NO ModuleB_viewControllerWithParams:@{@"param":@"我是测试页面NSTestViewController"}]; 57 | 58 | 59 | UIViewController *VC = [[CTMediator sharedInstance] performTarget:@"ModuleB" action:@"viewController" shouldCacheTarget:NO ModuleB_viewControllerWithParams:@{@"param":@"我是NSViewController传来的参数"}]; 60 | [self.navigationController pushViewController:VC animated:YES]; 61 | } 62 | 63 | -(void)moduleC { 64 | UIViewController *VC = [[CTMediator sharedInstance] performTarget:@"ModuleB" action:@"contentText" shouldCacheTarget:NO B_viewControllerWithContentText:@"Hello 我是模块通讯参数"]; 65 | 66 | [self.navigationController pushViewController:VC animated:YES]; 67 | } 68 | 69 | 70 | - (void)didReceiveMemoryWarning 71 | { 72 | [super didReceiveMemoryWarning]; 73 | // Dispose of any resources that can be recreated. 74 | } 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Example/NSMainProject/Target_NSTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // Target_NSTest.h 3 | // NSMainProject_Example 4 | // 5 | // Created by NShunjian on 2019/1/31. 6 | // Copyright © 2019年 NShunJian. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface Target_NSTest : NSObject 14 | //- (UIViewController *)Action_method:(NSDictionary *)params; 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Example/NSMainProject/Target_NSTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // Target_NSTest.m 3 | // NSMainProject_Example 4 | // 5 | // Created by NShunjian on 2019/1/31. 6 | // Copyright © 2019年 NShunJian. All rights reserved. 7 | // 8 | 9 | #import "Target_NSTest.h" 10 | #import "NSTestViewController.h" 11 | 12 | @implementation Target_NSTest 13 | - (UIViewController *)Action_method:(NSDictionary *)params { 14 | NSTestViewController *VC = [[NSTestViewController alloc] init]; 15 | VC.params = params; 16 | return VC; 17 | } 18 | @end 19 | -------------------------------------------------------------------------------- /Example/NSMainProject/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/NSMainProject/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NSMainProject 4 | // 5 | // Created by NShunJian on 01/31/2019. 6 | // Copyright (c) 2019 NShunJian. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "NSAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([NSAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | #use_frameworks! 2 | 3 | source 'https://github.com/CocoaPods/Specs.git' 4 | source 'https://github.com/NShunjian/PodSpecs.git' 5 | 6 | platform :ios, '8.0' 7 | 8 | target 'NSMainProject_Example' do 9 | pod 'NSMainProject', :path => '../' 10 | pod 'ModuleB' 11 | pod 'NSModuleBCategory' 12 | pod 'ModuleA' 13 | pod 'ModuleACategory' 14 | 15 | target 'NSMainProject_Tests' do 16 | inherit! :search_paths 17 | 18 | 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CTMediator (25) 3 | - ModuleA (0.1.0) 4 | - ModuleACategory (0.1.0): 5 | - CTMediator 6 | - ModuleB (0.3.3) 7 | - NSMainProject (0.1.0) 8 | - NSModuleBCategory (0.1.3): 9 | - CTMediator 10 | 11 | DEPENDENCIES: 12 | - ModuleA 13 | - ModuleACategory 14 | - ModuleB 15 | - NSMainProject (from `../`) 16 | - NSModuleBCategory 17 | 18 | SPEC REPOS: 19 | https://github.com/cocoapods/specs.git: 20 | - CTMediator 21 | https://github.com/NShunjian/PodSpecs.git: 22 | - ModuleA 23 | - ModuleACategory 24 | - ModuleB 25 | - NSModuleBCategory 26 | 27 | EXTERNAL SOURCES: 28 | NSMainProject: 29 | :path: "../" 30 | 31 | SPEC CHECKSUMS: 32 | CTMediator: 830c1fc204b3a6abf2a059510c7380f56343da0f 33 | ModuleA: d342f8eb113909d7cd6c886ddbe32e06785848f5 34 | ModuleACategory: d99af2949bd4156cb895722ac2fd18f0b8526cde 35 | ModuleB: db5e928e41f0de4f882b0bc394df68408fa42621 36 | NSMainProject: 17cdd88d91ed11a27ee75eb1a2ba2fc16b33ea7a 37 | NSModuleBCategory: 716d98672f8890f485d4e8add3510ca1d5cf5590 38 | 39 | PODFILE CHECKSUM: faee92fb8daeb078d55a70efc3240f0c11bc5ea8 40 | 41 | COCOAPODS: 1.6.0.beta.1 42 | -------------------------------------------------------------------------------- /Example/Pods/CTMediator/CTMediator/CTMediator/CTMediator.h: -------------------------------------------------------------------------------- 1 | // 2 | // CTMediator.h 3 | // CTMediator 4 | // 5 | // Created by casa on 16/3/13. 6 | // Copyright © 2016年 casa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * const kCTMediatorParamsKeySwiftTargetModuleName; 12 | 13 | @interface CTMediator : NSObject 14 | 15 | + (instancetype)sharedInstance; 16 | 17 | // 远程App调用入口 18 | - (id)performActionWithUrl:(NSURL *)url completion:(void(^)(NSDictionary *info))completion; 19 | // 本地组件调用入口 20 | - (id)performTarget:(NSString *)targetName action:(NSString *)actionName params:(NSDictionary *)params shouldCacheTarget:(BOOL)shouldCacheTarget; 21 | - (void)releaseCachedTargetWithTargetName:(NSString *)targetName; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Example/Pods/CTMediator/CTMediator/CTMediator/CTMediator.m: -------------------------------------------------------------------------------- 1 | // 2 | // CTMediator.m 3 | // CTMediator 4 | // 5 | // Created by casa on 16/3/13. 6 | // Copyright © 2016年 casa. All rights reserved. 7 | // 8 | 9 | #import "CTMediator.h" 10 | #import 11 | 12 | NSString * const kCTMediatorParamsKeySwiftTargetModuleName = @"kCTMediatorParamsKeySwiftTargetModuleName"; 13 | 14 | @interface CTMediator () 15 | 16 | @property (nonatomic, strong) NSMutableDictionary *cachedTarget; 17 | 18 | @end 19 | 20 | @implementation CTMediator 21 | 22 | #pragma mark - public methods 23 | + (instancetype)sharedInstance 24 | { 25 | static CTMediator *mediator; 26 | static dispatch_once_t onceToken; 27 | dispatch_once(&onceToken, ^{ 28 | mediator = [[CTMediator alloc] init]; 29 | }); 30 | return mediator; 31 | } 32 | 33 | /* 34 | scheme://[target]/[action]?[params] 35 | 36 | url sample: 37 | aaa://targetA/actionB?id=1234 38 | */ 39 | 40 | - (id)performActionWithUrl:(NSURL *)url completion:(void (^)(NSDictionary *))completion 41 | { 42 | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; 43 | NSString *urlString = [url query]; 44 | for (NSString *param in [urlString componentsSeparatedByString:@"&"]) { 45 | NSArray *elts = [param componentsSeparatedByString:@"="]; 46 | if([elts count] < 2) continue; 47 | [params setObject:[elts lastObject] forKey:[elts firstObject]]; 48 | } 49 | 50 | // 这里这么写主要是出于安全考虑,防止黑客通过远程方式调用本地模块。这里的做法足以应对绝大多数场景,如果要求更加严苛,也可以做更加复杂的安全逻辑。 51 | NSString *actionName = [url.path stringByReplacingOccurrencesOfString:@"/" withString:@""]; 52 | if ([actionName hasPrefix:@"native"]) { 53 | return @(NO); 54 | } 55 | 56 | // 这个demo针对URL的路由处理非常简单,就只是取对应的target名字和method名字,但这已经足以应对绝大部份需求。如果需要拓展,可以在这个方法调用之前加入完整的路由逻辑 57 | id result = [self performTarget:url.host action:actionName params:params shouldCacheTarget:NO]; 58 | if (completion) { 59 | if (result) { 60 | completion(@{@"result":result}); 61 | } else { 62 | completion(nil); 63 | } 64 | } 65 | return result; 66 | } 67 | 68 | - (id)performTarget:(NSString *)targetName action:(NSString *)actionName params:(NSDictionary *)params shouldCacheTarget:(BOOL)shouldCacheTarget 69 | { 70 | NSString *swiftModuleName = params[kCTMediatorParamsKeySwiftTargetModuleName]; 71 | 72 | // generate target 73 | NSString *targetClassString = nil; 74 | if (swiftModuleName.length > 0) { 75 | targetClassString = [NSString stringWithFormat:@"%@.Target_%@", swiftModuleName, targetName]; 76 | } else { 77 | targetClassString = [NSString stringWithFormat:@"Target_%@", targetName]; 78 | } 79 | NSObject *target = self.cachedTarget[targetClassString]; 80 | if (target == nil) { 81 | Class targetClass = NSClassFromString(targetClassString); 82 | target = [[targetClass alloc] init]; 83 | } 84 | 85 | // generate action 86 | NSString *actionString = [NSString stringWithFormat:@"Action_%@:", actionName]; 87 | SEL action = NSSelectorFromString(actionString); 88 | 89 | if (target == nil) { 90 | // 这里是处理无响应请求的地方之一,这个demo做得比较简单,如果没有可以响应的target,就直接return了。实际开发过程中是可以事先给一个固定的target专门用于在这个时候顶上,然后处理这种请求的 91 | [self NoTargetActionResponseWithTargetString:targetClassString selectorString:actionString originParams:params]; 92 | return nil; 93 | } 94 | 95 | if (shouldCacheTarget) { 96 | self.cachedTarget[targetClassString] = target; 97 | } 98 | 99 | if ([target respondsToSelector:action]) { 100 | return [self safePerformAction:action target:target params:params]; 101 | } else { 102 | // 这里是处理无响应请求的地方,如果无响应,则尝试调用对应target的notFound方法统一处理 103 | SEL action = NSSelectorFromString(@"notFound:"); 104 | if ([target respondsToSelector:action]) { 105 | return [self safePerformAction:action target:target params:params]; 106 | } else { 107 | // 这里也是处理无响应请求的地方,在notFound都没有的时候,这个demo是直接return了。实际开发过程中,可以用前面提到的固定的target顶上的。 108 | [self NoTargetActionResponseWithTargetString:targetClassString selectorString:actionString originParams:params]; 109 | [self.cachedTarget removeObjectForKey:targetClassString]; 110 | return nil; 111 | } 112 | } 113 | } 114 | 115 | - (void)releaseCachedTargetWithTargetName:(NSString *)targetName 116 | { 117 | NSString *targetClassString = [NSString stringWithFormat:@"Target_%@", targetName]; 118 | [self.cachedTarget removeObjectForKey:targetClassString]; 119 | } 120 | 121 | #pragma mark - private methods 122 | - (void)NoTargetActionResponseWithTargetString:(NSString *)targetString selectorString:(NSString *)selectorString originParams:(NSDictionary *)originParams 123 | { 124 | SEL action = NSSelectorFromString(@"Action_response:"); 125 | NSObject *target = [[NSClassFromString(@"Target_NoTargetAction") alloc] init]; 126 | 127 | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; 128 | params[@"originParams"] = originParams; 129 | params[@"targetString"] = targetString; 130 | params[@"selectorString"] = selectorString; 131 | 132 | [self safePerformAction:action target:target params:params]; 133 | } 134 | 135 | - (id)safePerformAction:(SEL)action target:(NSObject *)target params:(NSDictionary *)params 136 | { 137 | NSMethodSignature* methodSig = [target methodSignatureForSelector:action]; 138 | if(methodSig == nil) { 139 | return nil; 140 | } 141 | const char* retType = [methodSig methodReturnType]; 142 | 143 | if (strcmp(retType, @encode(void)) == 0) { 144 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSig]; 145 | [invocation setArgument:¶ms atIndex:2]; 146 | [invocation setSelector:action]; 147 | [invocation setTarget:target]; 148 | [invocation invoke]; 149 | return nil; 150 | } 151 | 152 | if (strcmp(retType, @encode(NSInteger)) == 0) { 153 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSig]; 154 | [invocation setArgument:¶ms atIndex:2]; 155 | [invocation setSelector:action]; 156 | [invocation setTarget:target]; 157 | [invocation invoke]; 158 | NSInteger result = 0; 159 | [invocation getReturnValue:&result]; 160 | return @(result); 161 | } 162 | 163 | if (strcmp(retType, @encode(BOOL)) == 0) { 164 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSig]; 165 | [invocation setArgument:¶ms atIndex:2]; 166 | [invocation setSelector:action]; 167 | [invocation setTarget:target]; 168 | [invocation invoke]; 169 | BOOL result = 0; 170 | [invocation getReturnValue:&result]; 171 | return @(result); 172 | } 173 | 174 | if (strcmp(retType, @encode(CGFloat)) == 0) { 175 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSig]; 176 | [invocation setArgument:¶ms atIndex:2]; 177 | [invocation setSelector:action]; 178 | [invocation setTarget:target]; 179 | [invocation invoke]; 180 | CGFloat result = 0; 181 | [invocation getReturnValue:&result]; 182 | return @(result); 183 | } 184 | 185 | if (strcmp(retType, @encode(NSUInteger)) == 0) { 186 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSig]; 187 | [invocation setArgument:¶ms atIndex:2]; 188 | [invocation setSelector:action]; 189 | [invocation setTarget:target]; 190 | [invocation invoke]; 191 | NSUInteger result = 0; 192 | [invocation getReturnValue:&result]; 193 | return @(result); 194 | } 195 | 196 | #pragma clang diagnostic push 197 | #pragma clang diagnostic ignored "-Warc-performSelector-leaks" 198 | return [target performSelector:action withObject:params]; 199 | #pragma clang diagnostic pop 200 | } 201 | 202 | #pragma mark - getters and setters 203 | - (NSMutableDictionary *)cachedTarget 204 | { 205 | if (_cachedTarget == nil) { 206 | _cachedTarget = [[NSMutableDictionary alloc] init]; 207 | } 208 | return _cachedTarget; 209 | } 210 | 211 | @end 212 | -------------------------------------------------------------------------------- /Example/Pods/CTMediator/FILE_LICENSE: -------------------------------------------------------------------------------- 1 | MIT 2 | -------------------------------------------------------------------------------- /Example/Pods/CTMediator/readme.md: -------------------------------------------------------------------------------- 1 | CTMediator 2 | ========== 3 | 4 | objective-c: 5 | 6 | ``` 7 | pod "CTMediator" 8 | ``` 9 | 10 | swift: 11 | 12 | ``` 13 | use_frameworks! 14 | pod "CTMediator" 15 | ``` 16 | 17 | --- 18 | 19 | 20 | `CTMediator` helps you to devide your project into multi-project, and use `Target-Action` pattern to let subprojects to communicate with each other. *with no regist process!* 21 | 22 | you can check demo for more details: 23 | 24 | [Origin project](https://github.com/ModulizationDemo/MainProject) 25 | 26 | [Modulized Main Project with CTMediator](https://github.com/ModulizationDemo/ModulizedMainProject) 27 | 28 | [Demos](https://github.com/ModulizationDemo) 29 | 30 | [Swift Demo](https://github.com/ModulizationDemo/SwfitDemo) 31 | 32 | add private repo before you run demos: 33 | 34 | ``` 35 | pod repo add PrivatePods https://github.com/ModulizationDemo/PrivatePods.git 36 | ``` 37 | 38 | remember to run `pod install` before you run the demo! 39 | 40 | --- 41 | 42 | [Origin project](https://github.com/ModulizationDemo/MainProject) 43 | 44 | [Modulized Main Project with CTMediator](https://github.com/ModulizationDemo/ModulizedMainProject) 45 | 46 | [Demos](https://github.com/ModulizationDemo) 47 | 48 | [Swift Demo](https://github.com/ModulizationDemo/SwfitDemo) 49 | 50 | 跑demo时先添加私有库: 51 | 52 | ``` 53 | pod repo add PrivatePods https://github.com/ModulizationDemo/PrivatePods.git 54 | ``` 55 | 56 | 然后就可以`pod install`了 57 | 58 | --- 59 | 60 | [iOS应用架构谈 组件化方案](http://casatwy.com/iOS-Modulization.html) 61 | 62 | [在现有工程中实施基于CTMediator的组件化方案](http://casatwy.com/modulization_in_action.html) 63 | 64 | --- 65 | 66 | 本工程其实也是个Demo 67 | 68 | `Category`目录在实际工程中是单独的一个repo,调用者通过依赖category这个repo来完成功能调度。一般来说是每一个业务对应一个category的repo。因此调用者需要调度哪个业务,就依赖哪个业务的category。category这个repo由对应提供服务的业务来维护。 69 | 70 | `CTMediator`目录在实际工程中也是一个单独的repo,仅用于存放中间件。被每一个业务线各自维护的category repo所依赖。 71 | 72 | `DemoModule`目录是实际提供服务的业务,这个在实际工程中也是一个单独的repo。这个repo不被任何人所依赖,这个repo通过target-action来提供被调度的功能,然后由category repo通过runtime调度。 73 | 74 | --- 75 | 76 | `CTMediator` helps you to devide your project into multi-project, and use `Target-Action` pattern to let subprojects to communicate with each other. 77 | 78 | you can check demo for more details: 79 | 80 | [Demo](https://github.com/ModulizationDemo) 81 | 82 | [Swift Demo](https://github.com/ModulizationDemo/SwfitDemo) 83 | -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/CTMediator/CTMediator.h: -------------------------------------------------------------------------------- 1 | ../../../CTMediator/CTMediator/CTMediator/CTMediator.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleA/TargetViewContainer.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleA/ModuleA/Classes/TargetViewContainer.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleA/Target_EleInvoice.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleA/ModuleA/Classes/Target_EleInvoice.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleACategory/CTMediator+Elelnvoice.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleACategory/ModuleACategory/Classes/Category/CTMediator+Elelnvoice.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleB/BViewController.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Controller/BViewController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleB/ModuleBViewController.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Controller/ModuleBViewController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleB/PageBViewController.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Controller/PageBViewController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleB/Target_ModuleB.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Target/Target_ModuleB.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/ModuleB/UIView+LayoutMethods.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/HandyFrame/UIView+LayoutMethods.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/NSModuleBCategory/CTMediator+ModuleB.h: -------------------------------------------------------------------------------- 1 | ../../../NSModuleBCategory/NSModuleBCategory/Classes/Category/CTMediator+ModuleB.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/CTMediator/CTMediator.h: -------------------------------------------------------------------------------- 1 | ../../../CTMediator/CTMediator/CTMediator/CTMediator.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleA/TargetViewContainer.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleA/ModuleA/Classes/TargetViewContainer.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleA/Target_EleInvoice.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleA/ModuleA/Classes/Target_EleInvoice.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleACategory/CTMediator+Elelnvoice.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleACategory/ModuleACategory/Classes/Category/CTMediator+Elelnvoice.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleB/BViewController.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Controller/BViewController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleB/ModuleBViewController.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Controller/ModuleBViewController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleB/PageBViewController.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Controller/PageBViewController.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleB/Target_ModuleB.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/Target/Target_ModuleB.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/ModuleB/UIView+LayoutMethods.h: -------------------------------------------------------------------------------- 1 | ../../../ModuleB/ModuleB/Classes/HandyFrame/UIView+LayoutMethods.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/NSModuleBCategory/CTMediator+ModuleB.h: -------------------------------------------------------------------------------- 1 | ../../../NSModuleBCategory/NSModuleBCategory/Classes/Category/CTMediator+ModuleB.h -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/NSMainProject.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NSMainProject", 3 | "version": "0.1.0", 4 | "summary": "A short description of NSMainProject.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com/NShunJian/NSMainProject", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "NShunJian": "528392911@qq.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/NShunJian/NSMainProject.git", 16 | "tag": "0.1.0" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "NSMainProject/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CTMediator (25) 3 | - ModuleA (0.1.0) 4 | - ModuleACategory (0.1.0): 5 | - CTMediator 6 | - ModuleB (0.3.3) 7 | - NSMainProject (0.1.0) 8 | - NSModuleBCategory (0.1.3): 9 | - CTMediator 10 | 11 | DEPENDENCIES: 12 | - ModuleA 13 | - ModuleACategory 14 | - ModuleB 15 | - NSMainProject (from `../`) 16 | - NSModuleBCategory 17 | 18 | SPEC REPOS: 19 | https://github.com/cocoapods/specs.git: 20 | - CTMediator 21 | https://github.com/NShunjian/PodSpecs.git: 22 | - ModuleA 23 | - ModuleACategory 24 | - ModuleB 25 | - NSModuleBCategory 26 | 27 | EXTERNAL SOURCES: 28 | NSMainProject: 29 | :path: "../" 30 | 31 | SPEC CHECKSUMS: 32 | CTMediator: 830c1fc204b3a6abf2a059510c7380f56343da0f 33 | ModuleA: d342f8eb113909d7cd6c886ddbe32e06785848f5 34 | ModuleACategory: d99af2949bd4156cb895722ac2fd18f0b8526cde 35 | ModuleB: db5e928e41f0de4f882b0bc394df68408fa42621 36 | NSMainProject: 17cdd88d91ed11a27ee75eb1a2ba2fc16b33ea7a 37 | NSModuleBCategory: 716d98672f8890f485d4e8add3510ca1d5cf5590 38 | 39 | PODFILE CHECKSUM: faee92fb8daeb078d55a70efc3240f0c11bc5ea8 40 | 41 | COCOAPODS: 1.6.0.beta.1 42 | -------------------------------------------------------------------------------- /Example/Pods/ModuleA/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 NShunJian <528392911@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/ModuleA/ModuleA/Classes/TargetViewContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // TargetViewContainer.h 3 | // WLMElectronicInvoice 4 | // 5 | // Created by 刘光强 on 2018/9/12. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TargetViewContainer : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Pods/ModuleA/ModuleA/Classes/TargetViewContainer.m: -------------------------------------------------------------------------------- 1 | // 2 | // TargetViewContainer.m 3 | // WLMElectronicInvoice 4 | // 5 | // Created by 刘光强 on 2018/9/12. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "TargetViewContainer.h" 10 | 11 | //#import "WLMSelectedApplyMerchantVM.h" 12 | //#import "WLMSelectApplyMerchantVC.h" 13 | //#import "WLBViewModelServiceImp.h" 14 | //#import "WLMInvoiceManagerListVC.h" 15 | 16 | @interface TargetViewContainer () 17 | 18 | //@property (nonatomic, strong) WLBViewModelServiceImp *viewModelService; 19 | //@property (nonatomic, strong) WLMSelectApplyMerchantVC *VC; 20 | 21 | @end 22 | 23 | @implementation TargetViewContainer 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | // Do any additional setup after loading the view, typically from a nib. 28 | 29 | self.title = @"这是电子发票业务组件模块"; 30 | self.view.backgroundColor = [UIColor whiteColor]; 31 | 32 | // self.viewModelService = [[WLBViewModelServiceImp alloc] init]; 33 | // WLMSelectedApplyMerchantVM *viewModel = [[WLMSelectedApplyMerchantVM alloc] initWithService:self.viewModelService params:nil]; 34 | // self.VC = [[WLMSelectApplyMerchantVC alloc] initWithViewModel:viewModel]; 35 | 36 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; 37 | btn.frame = CGRectMake(0, 0, 300, 100); 38 | btn.backgroundColor = [UIColor redColor]; 39 | btn.center = self.view.center; 40 | [btn setTitle:@"电子发票模块组件" forState: UIControlStateNormal]; 41 | [btn addTarget:self action:@selector(push) forControlEvents:UIControlEventTouchUpInside]; 42 | [self.view addSubview:btn]; 43 | } 44 | 45 | - (void)push { 46 | // [self.navigationController pushViewController:self.VC animated:YES]; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Example/Pods/ModuleA/ModuleA/Classes/Target_EleInvoice.h: -------------------------------------------------------------------------------- 1 | // 2 | // Target_EleInvoice.h 3 | // WLMElectronicInvoice 4 | // 5 | // Created by 刘光强 on 2018/9/12. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Target_EleInvoice : NSObject 12 | 13 | - (UIViewController *)Action_viewController:(NSDictionary *)params; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Pods/ModuleA/ModuleA/Classes/Target_EleInvoice.m: -------------------------------------------------------------------------------- 1 | // 2 | // Target_EleInvoice.m 3 | // WLMElectronicInvoice 4 | // 5 | // Created by 刘光强 on 2018/9/12. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "Target_EleInvoice.h" 10 | #import "TargetViewContainer.h" 11 | 12 | typedef void(^RouterCallBack)(NSString *); 13 | 14 | @interface Target_EleInvoice () 15 | 16 | @property (nonatomic, copy) RouterCallBack callback; 17 | @end 18 | 19 | @implementation Target_EleInvoice 20 | 21 | - (UIViewController *)Action_viewController:(NSDictionary *)params { 22 | TargetViewContainer *VC = [[TargetViewContainer alloc] init]; 23 | self.callback = params[@"callback"]; 24 | self.callback(@"这是路由回调的数据"); 25 | return VC; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Example/Pods/ModuleA/README.md: -------------------------------------------------------------------------------- 1 | # ModuleA 2 | 3 | [![CI Status](https://img.shields.io/travis/NShunJian/ModuleA.svg?style=flat)](https://travis-ci.org/NShunJian/ModuleA) 4 | [![Version](https://img.shields.io/cocoapods/v/ModuleA.svg?style=flat)](https://cocoapods.org/pods/ModuleA) 5 | [![License](https://img.shields.io/cocoapods/l/ModuleA.svg?style=flat)](https://cocoapods.org/pods/ModuleA) 6 | [![Platform](https://img.shields.io/cocoapods/p/ModuleA.svg?style=flat)](https://cocoapods.org/pods/ModuleA) 7 | 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | 14 | ## Installation 15 | 16 | ModuleA is available through [CocoaPods](https://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | 19 | ```ruby 20 | pod 'ModuleA' 21 | ``` 22 | 23 | ## Author 24 | 25 | NShunJian, 528392911@qq.com 26 | 27 | ## License 28 | 29 | ModuleA is available under the MIT license. See the LICENSE file for more info. 30 | -------------------------------------------------------------------------------- /Example/Pods/ModuleACategory/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 NShunJian <528392911@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/ModuleACategory/ModuleACategory/Classes/Category/CTMediator+Elelnvoice.h: -------------------------------------------------------------------------------- 1 | // 2 | // CTMediator+Elelnvoice.h 3 | // ModuleCategory 4 | // 5 | // Created by NShunjian on 2018/10/1. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "CTMediator.h" 10 | 11 | @interface CTMediator (Elelnvoice) 12 | 13 | - (UIViewController *)performTarget:(NSString *)targetName action:(NSString *)actionName shouldCacheTarget:(BOOL)shouldCacheTarget EleInvoice_ViewControllerWithCallback:(void(^)(NSString *result))callback; 14 | @end 15 | -------------------------------------------------------------------------------- /Example/Pods/ModuleACategory/ModuleACategory/Classes/Category/CTMediator+Elelnvoice.m: -------------------------------------------------------------------------------- 1 | // 2 | // CTMediator+Elelnvoice.m 3 | // ModuleCategory 4 | // 5 | // Created by NShunjian on 2018/10/1. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "CTMediator+Elelnvoice.h" 10 | 11 | @implementation CTMediator (Elelnvoice) 12 | 13 | - (UIViewController *)performTarget:(NSString *)targetName action:(NSString *)actionName shouldCacheTarget:(BOOL)shouldCacheTarget EleInvoice_ViewControllerWithCallback:(void(^)(NSString *result))callback { 14 | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; 15 | params[@"callback"] = callback; 16 | return [self performTarget:targetName action:actionName params:params shouldCacheTarget:shouldCacheTarget]; 17 | } 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/ModuleACategory/README.md: -------------------------------------------------------------------------------- 1 | # ModuleACategory 2 | 3 | [![CI Status](https://img.shields.io/travis/NShunJian/ModuleACategory.svg?style=flat)](https://travis-ci.org/NShunJian/ModuleACategory) 4 | [![Version](https://img.shields.io/cocoapods/v/ModuleACategory.svg?style=flat)](https://cocoapods.org/pods/ModuleACategory) 5 | [![License](https://img.shields.io/cocoapods/l/ModuleACategory.svg?style=flat)](https://cocoapods.org/pods/ModuleACategory) 6 | [![Platform](https://img.shields.io/cocoapods/p/ModuleACategory.svg?style=flat)](https://cocoapods.org/pods/ModuleACategory) 7 | 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | 14 | ## Installation 15 | 16 | ModuleACategory is available through [CocoaPods](https://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | 19 | ```ruby 20 | pod 'ModuleACategory' 21 | ``` 22 | 23 | ## Author 24 | 25 | NShunJian, 528392911@qq.com 26 | 27 | ## License 28 | 29 | ModuleACategory is available under the MIT license. See the LICENSE file for more info. 30 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 NShunJian <528392911@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Controller/BViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BViewController.h 3 | // MainProject 4 | // 5 | // Created by NShunjian on 2016/12/10. 6 | // Copyright © 2016年 casa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BViewController : UIViewController 12 | 13 | - (instancetype)initWithContentText:(NSString *)contentText; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Controller/BViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BViewController.m 3 | // MainProject 4 | // 5 | // Created by NShunjian on 2016/12/10. 6 | // Copyright © 2016年 casa. All rights reserved. 7 | // 8 | 9 | #import "BViewController.h" 10 | #import 11 | 12 | @interface BViewController () 13 | 14 | @property (nonatomic, strong) UILabel *contentLabel; 15 | 16 | @end 17 | 18 | @implementation BViewController 19 | 20 | #pragma mark - life cycle 21 | - (instancetype)initWithContentText:(NSString *)contentText 22 | { 23 | self = [super init]; 24 | if (self) { 25 | self.contentLabel.text = contentText; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)viewDidLoad 31 | { 32 | [super viewDidLoad]; 33 | self.view.backgroundColor = [UIColor whiteColor]; 34 | [self.view addSubview:self.contentLabel]; 35 | } 36 | 37 | - (void)viewWillLayoutSubviews 38 | { 39 | [super viewWillLayoutSubviews]; 40 | [self.contentLabel sizeToFit]; 41 | [self.contentLabel centerEqualToView:self.view]; 42 | } 43 | 44 | #pragma mark - getters and setters 45 | - (UILabel *)contentLabel 46 | { 47 | if (_contentLabel == nil) { 48 | _contentLabel = [[UILabel alloc] init]; 49 | _contentLabel.textColor = [UIColor blueColor]; 50 | } 51 | return _contentLabel; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Controller/ModuleBViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ModuleBViewController.h 3 | // ModuleB-Component 4 | // 5 | // Created by NShunjian on 2018/9/13. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ModuleBViewController : UIViewController 12 | @property (nonatomic,strong) NSDictionary *params; 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Controller/ModuleBViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ModuleBViewController.m 3 | // ModuleB-Component 4 | // 5 | // Created by NShunjian on 2018/9/13. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "ModuleBViewController.h" 10 | #import "PageBViewController.h" 11 | 12 | @interface ModuleBViewController () 13 | 14 | @end 15 | 16 | @implementation ModuleBViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | self.title = self.params[@"param"]; 22 | 23 | self.view.backgroundColor = [UIColor whiteColor]; 24 | 25 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; 26 | btn.frame = CGRectMake(0, 0, 300, 100); 27 | btn.backgroundColor = [UIColor greenColor]; 28 | btn.center = self.view.center; 29 | [btn setTitle:@"模块B业务功能组件" forState: UIControlStateNormal]; 30 | [btn addTarget:self action:@selector(push) forControlEvents:UIControlEventTouchUpInside]; 31 | [self.view addSubview:btn]; 32 | } 33 | 34 | - (void)push { 35 | PageBViewController *VC = [[PageBViewController alloc] init]; 36 | [self.navigationController pushViewController:VC animated:YES]; 37 | } 38 | 39 | - (void)didReceiveMemoryWarning { 40 | [super didReceiveMemoryWarning]; 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | /* 45 | #pragma mark - Navigation 46 | 47 | // In a storyboard-based application, you will often want to do a little preparation before navigation 48 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 49 | // Get the new view controller using [segue destinationViewController]. 50 | // Pass the selected object to the new view controller. 51 | } 52 | */ 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Controller/PageBViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PageBViewController.h 3 | // ModuleB-Component 4 | // 5 | // Created by NShunjian on 2018/9/13. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PageBViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Controller/PageBViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PageBViewController.m 3 | // ModuleB-Component 4 | // 5 | // Created by NShunjian on 2018/9/13. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "PageBViewController.h" 10 | 11 | @interface PageBViewController () 12 | 13 | @end 14 | 15 | @implementation PageBViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | self.title = @"这是页面B"; 21 | self.view.backgroundColor = [UIColor purpleColor]; 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | /* 30 | #pragma mark - Navigation 31 | 32 | // In a storyboard-based application, you will often want to do a little preparation before navigation 33 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 34 | // Get the new view controller using [segue destinationViewController]. 35 | // Pass the selected object to the new view controller. 36 | } 37 | */ 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/HandyFrame/UIView+LayoutMethods.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+LayoutMethods.h 3 | // TmallClient4iOS-Prime 4 | // 5 | // Created by casa on 14/12/8. 6 | // Copyright (c) 2014年 casa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) 12 | #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) 13 | #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) 14 | #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) 15 | #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) 16 | 17 | #define SCREEN_WIDTH ([[UIScreen mainScreen]bounds].size.width) 18 | #define SCREEN_HEIGHT ([[UIScreen mainScreen]bounds].size.height) 19 | 20 | #define kHPercentage(a) (SCREEN_HEIGHT*((a)/667.00)) 21 | #define kWPercentage(a) (SCREEN_WIDTH *((a)/375.00)) 22 | 23 | #define SCREEN_WITHOUT_STATUS_HEIGHT (SCREEN_HEIGHT - [[UIApplication sharedApplication] statusBarFrame].size.height) 24 | 25 | typedef CGFloat UIScreenType; 26 | 27 | static UIScreenType UIScreenType_iPhone5 = 320.0f; 28 | static UIScreenType UIScreenType_iPhone6 = 375.0f; 29 | static UIScreenType UIScreenType_iPhone6P = 414.0f; 30 | 31 | @interface UIView (LayoutMethods) 32 | 33 | // coordinator getters 34 | - (CGFloat)ct_height; 35 | - (CGFloat)ct_width; 36 | - (CGFloat)ct_x; 37 | - (CGFloat)ct_y; 38 | - (CGSize)ct_size; 39 | - (CGPoint)ct_origin; 40 | - (CGFloat)ct_centerX; 41 | - (CGFloat)ct_centerY; 42 | 43 | - (CGFloat)ct_left; 44 | - (CGFloat)ct_top; 45 | - (CGFloat)ct_bottom; 46 | - (CGFloat)ct_right; 47 | 48 | - (void)setCt_x:(CGFloat)x; 49 | - (void)setCt_left:(CGFloat)left; 50 | - (void)setCt_y:(CGFloat)y; 51 | - (void)setCt_top:(CGFloat)top; 52 | 53 | // height 54 | - (void)setCt_height:(CGFloat)height; 55 | - (void)heightEqualToView:(UIView *)view; 56 | 57 | // width 58 | - (void)setCt_width:(CGFloat)width; 59 | - (void)widthEqualToView:(UIView *)view; 60 | 61 | // size 62 | - (void)setCt_size:(CGSize)size; 63 | - (void)setSize:(CGSize)size screenType:(UIScreenType)screenType; 64 | - (void)sizeEqualToView:(UIView *)view; 65 | 66 | // center 67 | - (void)setCt_centerX:(CGFloat)centerX; 68 | - (void)setCt_centerY:(CGFloat)centerY; 69 | - (void)centerXEqualToView:(UIView *)view; 70 | - (void)centerYEqualToView:(UIView *)view; 71 | - (void)centerEqualToView:(UIView *)view; 72 | 73 | // top, bottom, left, right -- Version 1.1.0 74 | - (void)fromTheTop:(CGFloat)distance ofView:(UIView *)view; 75 | - (void)fromTheBottom:(CGFloat)distance ofView:(UIView *)view; 76 | - (void)fromTheLeft:(CGFloat)distance ofView:(UIView *)view; 77 | - (void)fromTheRight:(CGFloat)distance ofView:(UIView *)view; 78 | 79 | - (void)fromTheRelativeTop:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType; 80 | - (void)fromTheRelativeBottom:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType; 81 | - (void)fromTheRelativeLeft:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType; 82 | - (void)fromTheRelativeRight:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType; 83 | 84 | - (void)relativeTopInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 85 | - (void)relativeBottomInContainer:(CGFloat)bottom shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 86 | - (void)relativeLeftInContainer:(CGFloat)left shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 87 | - (void)relativeRightInContainer:(CGFloat)right shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 88 | 89 | // top, bottom, left, right -- Old Version 90 | - (void)top:(CGFloat)top FromView:(UIView *)view; 91 | - (void)bottom:(CGFloat)bottom FromView:(UIView *)view; 92 | - (void)left:(CGFloat)left FromView:(UIView *)view; 93 | - (void)right:(CGFloat)right FromView:(UIView *)view; 94 | 95 | - (void)topRatio:(CGFloat)top FromView:(UIView *)view screenType:(UIScreenType)screenType; 96 | - (void)bottomRatio:(CGFloat)bottom FromView:(UIView *)view screenType:(UIScreenType)screenType; 97 | - (void)leftRatio:(CGFloat)left FromView:(UIView *)view screenType:(UIScreenType)screenType; 98 | - (void)rightRatio:(CGFloat)right FromView:(UIView *)view screenType:(UIScreenType)screenType; 99 | 100 | - (void)topInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize; 101 | - (void)bottomInContainer:(CGFloat)bottom shouldResize:(BOOL)shouldResize; 102 | - (void)leftInContainer:(CGFloat)left shouldResize:(BOOL)shouldResize; 103 | - (void)rightInContainer:(CGFloat)right shouldResize:(BOOL)shouldResize; 104 | 105 | - (void)topRatioInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 106 | - (void)bottomRatioInContainer:(CGFloat)bottom shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 107 | - (void)leftRatioInContainer:(CGFloat)left shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 108 | - (void)rightRatioInContainer:(CGFloat)right shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType; 109 | 110 | - (void)topEqualToView:(UIView *)view; 111 | - (void)bottomEqualToView:(UIView *)view; 112 | - (void)leftEqualToView:(UIView *)view; 113 | - (void)rightEqualToView:(UIView *)view; 114 | 115 | // imbueset 116 | - (void)fillWidth; 117 | - (void)fillHeight; 118 | - (void)fill; 119 | 120 | - (UIView *)topSuperView; 121 | 122 | // iPhoneX adapt 123 | - (CGFloat)safeAreaBottomGap; 124 | - (CGFloat)safeAreaTopGap; 125 | - (CGFloat)safeAreaLeftGap; 126 | - (CGFloat)safeAreaRightGap; 127 | 128 | @end 129 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/HandyFrame/UIView+LayoutMethods.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+LayoutMethods.m 3 | // TmallClient4iOS-Prime 4 | // 5 | // Created by casa on 14/12/8. 6 | // Copyright (c) 2014年 casa. All rights reserved. 7 | // 8 | 9 | #import "UIView+LayoutMethods.h" 10 | #import 11 | 12 | static void *kUIViewLayoutMethodPropertyBottomGap = &kUIViewLayoutMethodPropertyBottomGap; 13 | static void *kUIViewLayoutMethodPropertyTopGap = &kUIViewLayoutMethodPropertyTopGap; 14 | static void *kUIViewLayoutMethodPropertyLeftGap = &kUIViewLayoutMethodPropertyLeftGap; 15 | static void *kUIViewLayoutMethodPropertyRightGap = &kUIViewLayoutMethodPropertyRightGap; 16 | 17 | @implementation UIView (LayoutMethods) 18 | 19 | // coordinator getters 20 | - (CGFloat)ct_height 21 | { 22 | return self.frame.size.height; 23 | } 24 | 25 | - (CGFloat)ct_width 26 | { 27 | return self.frame.size.width; 28 | } 29 | 30 | - (CGFloat)ct_x 31 | { 32 | return self.frame.origin.x; 33 | } 34 | 35 | - (CGFloat)ct_y 36 | { 37 | return self.frame.origin.y; 38 | } 39 | 40 | - (CGSize)ct_size 41 | { 42 | return self.frame.size; 43 | } 44 | 45 | - (CGPoint)ct_origin 46 | { 47 | return self.frame.origin; 48 | } 49 | 50 | - (CGFloat)ct_centerX 51 | { 52 | return self.center.x; 53 | } 54 | 55 | - (CGFloat)ct_centerY 56 | { 57 | return self.center.y; 58 | } 59 | 60 | - (CGFloat)ct_left 61 | { 62 | return self.frame.origin.x; 63 | } 64 | 65 | - (CGFloat)ct_top 66 | { 67 | return self.frame.origin.y; 68 | } 69 | 70 | - (CGFloat)ct_bottom 71 | { 72 | return self.frame.size.height + self.frame.origin.y; 73 | } 74 | 75 | - (CGFloat)ct_right 76 | { 77 | return self.frame.size.width + self.frame.origin.x; 78 | } 79 | 80 | - (void)setCt_x:(CGFloat)x 81 | { 82 | self.frame = CGRectMake(x, self.frame.origin.y, self.frame.size.width, self.frame.size.height); 83 | } 84 | 85 | - (void)setCt_y:(CGFloat)y 86 | { 87 | self.frame = CGRectMake(self.frame.origin.x, y, self.frame.size.width, self.frame.size.height); 88 | } 89 | 90 | - (void)setCt_left:(CGFloat)left 91 | { 92 | self.ct_x = left; 93 | } 94 | 95 | - (void)setCt_top:(CGFloat)top 96 | { 97 | self.ct_y = top; 98 | } 99 | 100 | - (void)setCt_height:(CGFloat)height 101 | { 102 | CGRect newFrame = CGRectMake(self.ct_x, self.ct_y, self.ct_width, height); 103 | self.frame = newFrame; 104 | } 105 | 106 | - (void)heightEqualToView:(UIView *)view 107 | { 108 | self.ct_height = view.ct_height; 109 | } 110 | 111 | // width 112 | - (void)setCt_width:(CGFloat)width 113 | { 114 | CGRect newFrame = CGRectMake(self.ct_x, self.ct_y, width, self.ct_height); 115 | self.frame = newFrame; 116 | } 117 | 118 | - (void)widthEqualToView:(UIView *)view 119 | { 120 | self.ct_width = view.ct_width; 121 | } 122 | 123 | // center 124 | - (void)setCt_centerX:(CGFloat)centerX 125 | { 126 | CGPoint center = CGPointMake(self.ct_centerX, self.ct_centerY); 127 | center.x = centerX; 128 | self.center = center; 129 | } 130 | 131 | - (void)setCt_centerY:(CGFloat)centerY 132 | { 133 | CGPoint center = CGPointMake(self.ct_centerX, self.ct_centerY); 134 | center.y = centerY; 135 | self.center = center; 136 | } 137 | 138 | - (void)centerXEqualToView:(UIView *)view 139 | { 140 | UIView *superView = view.superview ? view.superview : view; 141 | CGPoint viewCenterPoint = [superView convertPoint:view.center toView:self.topSuperView]; 142 | CGPoint centerPoint = [self.topSuperView convertPoint:viewCenterPoint toView:self.superview]; 143 | self.ct_centerX = centerPoint.x; 144 | } 145 | 146 | - (void)centerYEqualToView:(UIView *)view 147 | { 148 | UIView *superView = view.superview ? view.superview : view; 149 | CGPoint viewCenterPoint = [superView convertPoint:view.center toView:self.topSuperView]; 150 | CGPoint centerPoint = [self.topSuperView convertPoint:viewCenterPoint toView:self.superview]; 151 | self.ct_centerY = centerPoint.y; 152 | } 153 | 154 | - (void)centerEqualToView:(UIView *)view 155 | { 156 | UIView *superView = view.superview ? view.superview : view; 157 | CGPoint viewCenterPoint = [superView convertPoint:view.center toView:self.topSuperView]; 158 | CGPoint centerPoint = [self.topSuperView convertPoint:viewCenterPoint toView:self.superview]; 159 | self.ct_centerX = centerPoint.x; 160 | self.ct_centerY = centerPoint.y; 161 | } 162 | 163 | // top, bottom, left, right -- Version 1.1.0 164 | - (void)fromTheTop:(CGFloat)distance ofView:(UIView *)view 165 | { 166 | [self bottom:distance FromView:view]; 167 | } 168 | 169 | - (void)fromTheBottom:(CGFloat)distance ofView:(UIView *)view 170 | { 171 | [self top:distance FromView:view]; 172 | } 173 | 174 | - (void)fromTheLeft:(CGFloat)distance ofView:(UIView *)view 175 | { 176 | [self left:distance FromView:view]; 177 | } 178 | 179 | - (void)fromTheRight:(CGFloat)distance ofView:(UIView *)view 180 | { 181 | [self right:distance FromView:view]; 182 | } 183 | 184 | 185 | - (void)fromTheRelativeTop:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType 186 | { 187 | [self bottomRatio:distance FromView:view screenType:screenType]; 188 | } 189 | 190 | - (void)fromTheRelativeBottom:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType 191 | { 192 | [self topRatio:distance FromView:view screenType:screenType]; 193 | } 194 | 195 | - (void)fromTheRelativeLeft:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType 196 | { 197 | [self leftRatio:distance FromView:view screenType:screenType]; 198 | } 199 | 200 | - (void)fromTheRelativeRight:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType 201 | { 202 | [self rightRatio:distance FromView:view screenType:screenType]; 203 | } 204 | 205 | 206 | - (void)relativeTopInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 207 | { 208 | [self topRatioInContainer:top shouldResize:shouldResize screenType:screenType]; 209 | } 210 | 211 | - (void)relativeBottomInContainer:(CGFloat)bottom shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 212 | { 213 | [self bottomRatioInContainer:bottom shouldResize:shouldResize screenType:screenType]; 214 | } 215 | 216 | - (void)relativeLeftInContainer:(CGFloat)left shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 217 | { 218 | [self leftRatioInContainer:left shouldResize:shouldResize screenType:screenType]; 219 | } 220 | 221 | - (void)relativeRightInContainer:(CGFloat)right shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 222 | { 223 | [self rightRatioInContainer:right shouldResize:shouldResize screenType:screenType]; 224 | } 225 | 226 | 227 | // top, bottom, left, right -- Old Version 228 | - (void)top:(CGFloat)top FromView:(UIView *)view 229 | { 230 | UIView *superView = view.superview ? view.superview : view; 231 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 232 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 233 | 234 | self.ct_y = floorf(newOrigin.y + top + view.ct_height); 235 | } 236 | 237 | - (void)bottom:(CGFloat)bottom FromView:(UIView *)view 238 | { 239 | UIView *superView = view.superview ? view.superview : view; 240 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 241 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 242 | 243 | self.ct_y = newOrigin.y - bottom - self.ct_height; 244 | } 245 | 246 | - (void)left:(CGFloat)left FromView:(UIView *)view 247 | { 248 | UIView *superView = view.superview ? view.superview : view; 249 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 250 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 251 | 252 | self.ct_x = newOrigin.x - left - self.ct_width; 253 | } 254 | 255 | - (void)right:(CGFloat)right FromView:(UIView *)view 256 | { 257 | UIView *superView = view.superview ? view.superview : view; 258 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 259 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 260 | 261 | self.ct_x = newOrigin.x + right + view.ct_width; 262 | } 263 | 264 | - (void)topRatio:(CGFloat)top FromView:(UIView *)view screenType:(UIScreenType)screenType 265 | { 266 | CGFloat topRatio = top / screenType; 267 | CGFloat topValue = topRatio * self.superview.ct_width; 268 | [self top:topValue FromView:view]; 269 | } 270 | 271 | - (void)bottomRatio:(CGFloat)bottom FromView:(UIView *)view screenType:(UIScreenType)screenType 272 | { 273 | CGFloat bottomRatio = bottom / screenType; 274 | CGFloat bottomValue = bottomRatio * self.superview.ct_width; 275 | [self bottom:bottomValue FromView:view]; 276 | } 277 | 278 | - (void)leftRatio:(CGFloat)left FromView:(UIView *)view screenType:(UIScreenType)screenType 279 | { 280 | CGFloat leftRatio = left / screenType; 281 | CGFloat leftValue = leftRatio * self.superview.ct_width; 282 | [self left:leftValue FromView:view]; 283 | } 284 | 285 | - (void)rightRatio:(CGFloat)right FromView:(UIView *)view screenType:(UIScreenType)screenType 286 | { 287 | CGFloat rightRatio = right / screenType; 288 | CGFloat rightValue = rightRatio * self.superview.ct_width; 289 | [self right:rightValue FromView:view]; 290 | } 291 | 292 | - (void)topInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize 293 | { 294 | if (shouldResize) { 295 | self.ct_height = self.ct_y - top + self.ct_height; 296 | } 297 | self.ct_y = top; 298 | } 299 | 300 | - (void)bottomInContainer:(CGFloat)bottom shouldResize:(BOOL)shouldResize 301 | { 302 | if (shouldResize) { 303 | self.ct_height = self.superview.ct_height - bottom - self.ct_y - self.safeAreaBottomGap; 304 | } else { 305 | self.ct_y = self.superview.ct_height - self.ct_height - bottom - self.safeAreaBottomGap; 306 | } 307 | } 308 | 309 | - (void)leftInContainer:(CGFloat)left shouldResize:(BOOL)shouldResize 310 | { 311 | if (shouldResize) { 312 | self.ct_width = self.ct_x - left + self.ct_width; 313 | } 314 | self.ct_x = left; 315 | } 316 | 317 | - (void)rightInContainer:(CGFloat)right shouldResize:(BOOL)shouldResize 318 | { 319 | if (shouldResize) { 320 | self.ct_width = self.superview.ct_width - right - self.ct_x; 321 | } else { 322 | self.ct_x = self.superview.ct_width - self.ct_width - right; 323 | } 324 | } 325 | 326 | - (void)topRatioInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 327 | { 328 | CGFloat topRatio = top / screenType; 329 | CGFloat topValue = topRatio * self.superview.ct_width; 330 | [self topInContainer:topValue shouldResize:shouldResize]; 331 | } 332 | 333 | - (void)bottomRatioInContainer:(CGFloat)bottom shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 334 | { 335 | CGFloat bottomRatio = bottom / screenType; 336 | CGFloat bottomValue = bottomRatio * self.superview.ct_width; 337 | [self bottomInContainer:bottomValue shouldResize:shouldResize]; 338 | } 339 | 340 | - (void)leftRatioInContainer:(CGFloat)left shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 341 | { 342 | CGFloat leftRatio = left / screenType; 343 | CGFloat leftValue = leftRatio * self.superview.ct_width; 344 | [self leftInContainer:leftValue shouldResize:shouldResize]; 345 | } 346 | 347 | - (void)rightRatioInContainer:(CGFloat)right shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType 348 | { 349 | CGFloat rightRatio = right / screenType; 350 | CGFloat rightValue = rightRatio * self.superview.ct_width; 351 | [self rightInContainer:rightValue shouldResize:shouldResize]; 352 | } 353 | 354 | - (void)topEqualToView:(UIView *)view 355 | { 356 | UIView *superView = view.superview ? view.superview : view; 357 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 358 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 359 | 360 | self.ct_y = newOrigin.y; 361 | } 362 | 363 | - (void)bottomEqualToView:(UIView *)view 364 | { 365 | UIView *superView = view.superview ? view.superview : view; 366 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 367 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 368 | 369 | self.ct_y = newOrigin.y + view.ct_height - self.ct_height; 370 | } 371 | 372 | - (void)leftEqualToView:(UIView *)view 373 | { 374 | UIView *superView = view.superview ? view.superview : view; 375 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 376 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 377 | 378 | self.ct_x = newOrigin.x; 379 | } 380 | 381 | - (void)rightEqualToView:(UIView *)view 382 | { 383 | UIView *superView = view.superview ? view.superview : view; 384 | CGPoint viewOrigin = [superView convertPoint:view.ct_origin toView:self.topSuperView]; 385 | CGPoint newOrigin = [self.topSuperView convertPoint:viewOrigin toView:self.superview]; 386 | 387 | self.ct_x = newOrigin.x + view.ct_width - self.ct_width; 388 | } 389 | 390 | // size 391 | - (void)setCt_size:(CGSize)size 392 | { 393 | self.frame = CGRectMake(self.ct_x, self.ct_y, size.width, size.height); 394 | } 395 | 396 | - (void)setSize:(CGSize)size screenType:(UIScreenType)screenType 397 | { 398 | CGFloat ratio = SCREEN_WIDTH / screenType; 399 | self.frame = CGRectMake(self.ct_x, self.ct_y, size.width * ratio, size.height * ratio); 400 | } 401 | 402 | - (void)sizeEqualToView:(UIView *)view 403 | { 404 | self.frame = CGRectMake(self.ct_x, self.ct_y, view.ct_width, view.ct_height); 405 | } 406 | 407 | // imbueset 408 | - (void)fillWidth 409 | { 410 | self.ct_width = self.superview.ct_width; 411 | self.ct_x = 0; 412 | } 413 | 414 | - (void)fillHeight 415 | { 416 | self.ct_height = self.superview.ct_height; 417 | self.ct_y = 0; 418 | } 419 | 420 | - (void)fill 421 | { 422 | self.frame = CGRectMake(0, 0, self.superview.ct_width, self.superview.ct_height); 423 | } 424 | 425 | - (UIView *)topSuperView 426 | { 427 | UIView *topSuperView = self.superview; 428 | 429 | if (topSuperView == nil) { 430 | topSuperView = self; 431 | } else { 432 | while (topSuperView.superview) { 433 | topSuperView = topSuperView.superview; 434 | } 435 | } 436 | 437 | return topSuperView; 438 | } 439 | 440 | // iPhoneX adapt 441 | - (CGFloat)safeAreaBottomGap 442 | { 443 | NSNumber *gap = objc_getAssociatedObject(self, kUIViewLayoutMethodPropertyBottomGap); 444 | if (gap == nil) { 445 | if (@available(iOS 11, *)) { 446 | if (self.superview.safeAreaLayoutGuide.layoutFrame.size.height > 0) { 447 | gap = @((self.superview.ct_height - self.superview.safeAreaLayoutGuide.layoutFrame.origin.y - self.superview.safeAreaLayoutGuide.layoutFrame.size.height)); 448 | } else { 449 | gap = nil; 450 | } 451 | } else { 452 | gap = @(0); 453 | } 454 | objc_setAssociatedObject(self, kUIViewLayoutMethodPropertyBottomGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 455 | } 456 | return gap.floatValue; 457 | } 458 | 459 | - (CGFloat)safeAreaTopGap 460 | { 461 | NSNumber *gap = objc_getAssociatedObject(self, kUIViewLayoutMethodPropertyTopGap); 462 | if (gap == nil) { 463 | if (@available(iOS 11, *)) { 464 | gap = @(self.superview.safeAreaLayoutGuide.layoutFrame.origin.y); 465 | } else { 466 | gap = @(0); 467 | } 468 | objc_setAssociatedObject(self, kUIViewLayoutMethodPropertyTopGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 469 | } 470 | return gap.floatValue; 471 | } 472 | 473 | - (CGFloat)safeAreaLeftGap 474 | { 475 | NSNumber *gap = objc_getAssociatedObject(self, kUIViewLayoutMethodPropertyLeftGap); 476 | if (gap == nil) { 477 | if (@available(iOS 11, *)) { 478 | gap = @(self.superview.safeAreaLayoutGuide.layoutFrame.origin.x); 479 | } else { 480 | gap = @(0); 481 | } 482 | objc_setAssociatedObject(self, kUIViewLayoutMethodPropertyLeftGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 483 | } 484 | return gap.floatValue; 485 | } 486 | 487 | - (CGFloat)safeAreaRightGap 488 | { 489 | NSNumber *gap = objc_getAssociatedObject(self, kUIViewLayoutMethodPropertyRightGap); 490 | if (gap == nil) { 491 | if (@available(iOS 11, *)) { 492 | gap = @(self.superview.safeAreaLayoutGuide.layoutFrame.origin.x); 493 | } else { 494 | gap = @(0); 495 | } 496 | objc_setAssociatedObject(self, kUIViewLayoutMethodPropertyRightGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 497 | } 498 | return gap.floatValue; 499 | } 500 | 501 | @end 502 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Target/Target_ModuleB.h: -------------------------------------------------------------------------------- 1 | // 2 | // Target_ModuleB.h 3 | // ModuleB-Component 4 | // 5 | // Created by NShunjian on 2018/9/13. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface Target_ModuleB : NSObject 13 | /*下面的方法定义可不写*/ 14 | - (UIViewController *)Action_viewController:(NSDictionary *)params; 15 | - (UIViewController *)Action_contentText:(NSDictionary *)params; 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/ModuleB/Classes/Target/Target_ModuleB.m: -------------------------------------------------------------------------------- 1 | // 2 | // Target_ModuleB.m 3 | // ModuleB-Component 4 | // 5 | // Created by NShunjian on 2018/9/13. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "Target_ModuleB.h" 10 | #import "ModuleBViewController.h" 11 | #import "BViewController.h" 12 | 13 | @implementation Target_ModuleB 14 | 15 | - (UIViewController *)Action_viewController:(NSDictionary *)params { 16 | ModuleBViewController *VC = [[ModuleBViewController alloc] init]; 17 | VC.params = params; 18 | return VC; 19 | } 20 | 21 | - (UIViewController *)Action_contentText:(NSDictionary *)params 22 | { 23 | NSString *contentText = params[@"contentText"]; 24 | BViewController *viewController = [[BViewController alloc] initWithContentText:contentText]; 25 | return viewController; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /Example/Pods/ModuleB/README.md: -------------------------------------------------------------------------------- 1 | # ModuleB 2 | 3 | [![CI Status](https://img.shields.io/travis/NShunJian/ModuleB.svg?style=flat)](https://travis-ci.org/NShunJian/ModuleB) 4 | [![Version](https://img.shields.io/cocoapods/v/ModuleB.svg?style=flat)](https://cocoapods.org/pods/ModuleB) 5 | [![License](https://img.shields.io/cocoapods/l/ModuleB.svg?style=flat)](https://cocoapods.org/pods/ModuleB) 6 | [![Platform](https://img.shields.io/cocoapods/p/ModuleB.svg?style=flat)](https://cocoapods.org/pods/ModuleB) 7 | 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | 14 | ## Installation 15 | 16 | ModuleB is available through [CocoaPods](https://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | 19 | ```ruby 20 | pod 'ModuleB' 21 | ``` 22 | 23 | ## Author 24 | 25 | NShunJian, 528392911@qq.com 26 | 27 | ## License 28 | 29 | ModuleB is available under the MIT license. See the LICENSE file for more info. 30 | -------------------------------------------------------------------------------- /Example/Pods/NSModuleBCategory/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 NShunJian <528392911@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/NSModuleBCategory/NSModuleBCategory/Classes/Category/CTMediator+ModuleB.h: -------------------------------------------------------------------------------- 1 | // 2 | // CTMediator+ModuleB.h 3 | // ModuleB-Category 4 | // 5 | // Created by NShunjian on 2018/10/1. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "CTMediator.h" 10 | 11 | @interface CTMediator (ModuleB) 12 | 13 | - (UIViewController *)performTarget:(NSString *)targetName action:(NSString *)actionName shouldCacheTarget:(BOOL)shouldCacheTarget ModuleB_viewControllerWithParams:(NSDictionary *)params; 14 | - (UIViewController *)performTarget:(NSString *)targetName action:(NSString *)actionName shouldCacheTarget:(BOOL)shouldCacheTarget B_viewControllerWithContentText:(NSString *)contentText; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/NSModuleBCategory/NSModuleBCategory/Classes/Category/CTMediator+ModuleB.m: -------------------------------------------------------------------------------- 1 | // 2 | // CTMediator+ModuleB.m 3 | // ModuleB-Category 4 | // 5 | // Created by NShunjian on 2018/10/1. 6 | // Copyright © 2018年 quangqiang. All rights reserved. 7 | // 8 | 9 | #import "CTMediator+ModuleB.h" 10 | 11 | @implementation CTMediator (ModuleB) 12 | 13 | - (UIViewController *)performTarget:(NSString *)targetName action:(NSString *)actionName shouldCacheTarget:(BOOL)shouldCacheTarget ModuleB_viewControllerWithParams:(NSDictionary *)params{ 14 | return [self performTarget:targetName action:actionName params:params shouldCacheTarget:shouldCacheTarget]; 15 | } 16 | - (UIViewController *)performTarget:(NSString *)targetName action:(NSString *)actionName shouldCacheTarget:(BOOL)shouldCacheTarget B_viewControllerWithContentText:(NSString *)contentText { 17 | 18 | /* 19 | BViewController *viewController = [[BViewController alloc] initWithContentText:@"hello, world!"]; 20 | */ 21 | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; 22 | params[@"contentText"] = contentText; 23 | return [self performTarget:targetName action:actionName params:params shouldCacheTarget:shouldCacheTarget]; 24 | } 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/NSModuleBCategory/README.md: -------------------------------------------------------------------------------- 1 | # NSModuleBCategory 2 | 3 | [![CI Status](https://img.shields.io/travis/NShunJian/NSModuleBCategory.svg?style=flat)](https://travis-ci.org/NShunJian/NSModuleBCategory) 4 | [![Version](https://img.shields.io/cocoapods/v/NSModuleBCategory.svg?style=flat)](https://cocoapods.org/pods/NSModuleBCategory) 5 | [![License](https://img.shields.io/cocoapods/l/NSModuleBCategory.svg?style=flat)](https://cocoapods.org/pods/NSModuleBCategory) 6 | [![Platform](https://img.shields.io/cocoapods/p/NSModuleBCategory.svg?style=flat)](https://cocoapods.org/pods/NSModuleBCategory) 7 | 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | 14 | ## Installation 15 | 16 | NSModuleBCategory is available through [CocoaPods](https://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | 19 | ```ruby 20 | pod 'NSModuleBCategory' 21 | ``` 22 | 23 | ## Author 24 | 25 | NShunJian, 528392911@qq.com 26 | 27 | ## License 28 | 29 | NSModuleBCategory is available under the MIT license. See the LICENSE file for more info. 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CTMediator/CTMediator-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CTMediator : NSObject 3 | @end 4 | @implementation PodsDummy_CTMediator 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CTMediator/CTMediator-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CTMediator/CTMediator.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CTMediator 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CTMediator" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CTMediator" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CTMediator 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleA/ModuleA-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ModuleA : NSObject 3 | @end 4 | @implementation PodsDummy_ModuleA 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleA/ModuleA-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleA/ModuleA.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ModuleA 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ModuleA" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ModuleA" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ModuleA 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleACategory/ModuleACategory-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ModuleACategory : NSObject 3 | @end 4 | @implementation PodsDummy_ModuleACategory 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleACategory/ModuleACategory-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleACategory/ModuleACategory.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ModuleACategory 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ModuleACategory" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CTMediator" "${PODS_ROOT}/Headers/Public/ModuleACategory" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ModuleACategory 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleB/ModuleB-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ModuleB : NSObject 3 | @end 4 | @implementation PodsDummy_ModuleB 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleB/ModuleB-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ModuleB/ModuleB.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ModuleB 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/ModuleB" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ModuleB" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/ModuleB 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSMainProject/NSMainProject-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 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSMainProject/NSMainProject-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_NSMainProject : NSObject 3 | @end 4 | @implementation PodsDummy_NSMainProject 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSMainProject/NSMainProject-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSMainProject/NSMainProject-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double NSMainProjectVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char NSMainProjectVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSMainProject/NSMainProject.modulemap: -------------------------------------------------------------------------------- 1 | framework module NSMainProject { 2 | umbrella header "NSMainProject-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSMainProject/NSMainProject.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSMainProject 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSModuleBCategory/NSModuleBCategory-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_NSModuleBCategory : NSObject 3 | @end 4 | @implementation PodsDummy_NSModuleBCategory 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSModuleBCategory/NSModuleBCategory-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/NSModuleBCategory/NSModuleBCategory.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/NSModuleBCategory 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/NSModuleBCategory" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CTMediator" "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/NSModuleBCategory 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example-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.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## CTMediator 5 | 6 | MIT 7 | 8 | 9 | ## ModuleA 10 | 11 | Copyright (c) 2019 NShunJian <528392911@qq.com> 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in 21 | all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 | THE SOFTWARE. 30 | 31 | 32 | ## ModuleACategory 33 | 34 | Copyright (c) 2019 NShunJian <528392911@qq.com> 35 | 36 | Permission is hereby granted, free of charge, to any person obtaining a copy 37 | of this software and associated documentation files (the "Software"), to deal 38 | in the Software without restriction, including without limitation the rights 39 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 40 | copies of the Software, and to permit persons to whom the Software is 41 | furnished to do so, subject to the following conditions: 42 | 43 | The above copyright notice and this permission notice shall be included in 44 | all copies or substantial portions of the Software. 45 | 46 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 47 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 48 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 49 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 50 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 51 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 52 | THE SOFTWARE. 53 | 54 | 55 | ## ModuleB 56 | 57 | Copyright (c) 2019 NShunJian <528392911@qq.com> 58 | 59 | Permission is hereby granted, free of charge, to any person obtaining a copy 60 | of this software and associated documentation files (the "Software"), to deal 61 | in the Software without restriction, including without limitation the rights 62 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 63 | copies of the Software, and to permit persons to whom the Software is 64 | furnished to do so, subject to the following conditions: 65 | 66 | The above copyright notice and this permission notice shall be included in 67 | all copies or substantial portions of the Software. 68 | 69 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 70 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 71 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 72 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 73 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 74 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 75 | THE SOFTWARE. 76 | 77 | 78 | ## NSMainProject 79 | 80 | Copyright (c) 2019 NShunJian <528392911@qq.com> 81 | 82 | Permission is hereby granted, free of charge, to any person obtaining a copy 83 | of this software and associated documentation files (the "Software"), to deal 84 | in the Software without restriction, including without limitation the rights 85 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 86 | copies of the Software, and to permit persons to whom the Software is 87 | furnished to do so, subject to the following conditions: 88 | 89 | The above copyright notice and this permission notice shall be included in 90 | all copies or substantial portions of the Software. 91 | 92 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 93 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 94 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 95 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 96 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 97 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 98 | THE SOFTWARE. 99 | 100 | 101 | ## NSModuleBCategory 102 | 103 | Copyright (c) 2019 NShunJian <528392911@qq.com> 104 | 105 | Permission is hereby granted, free of charge, to any person obtaining a copy 106 | of this software and associated documentation files (the "Software"), to deal 107 | in the Software without restriction, including without limitation the rights 108 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 109 | copies of the Software, and to permit persons to whom the Software is 110 | furnished to do so, subject to the following conditions: 111 | 112 | The above copyright notice and this permission notice shall be included in 113 | all copies or substantial portions of the Software. 114 | 115 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 116 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 117 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 118 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 119 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 120 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 121 | THE SOFTWARE. 122 | 123 | Generated by CocoaPods - https://cocoapods.org 124 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_NSMainProject_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_NSMainProject_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | 51 | if ! [ -r "$binary" ]; then 52 | binary="${destination}/${basename}" 53 | elif [ -L "${binary}" ]; then 54 | echo "Destination binary is symlinked..." 55 | dirname="$(dirname "${binary}")" 56 | binary="${dirname}/$(readlink "${binary}")" 57 | fi 58 | 59 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 60 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 61 | strip_invalid_archs "$binary" 62 | fi 63 | 64 | # Resign the code if required by the build settings to avoid unstable apps 65 | code_sign_if_enabled "${destination}/$(basename "$1")" 66 | 67 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 68 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 69 | local swift_runtime_libs 70 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 71 | for lib in $swift_runtime_libs; do 72 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 73 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 74 | code_sign_if_enabled "${destination}/${lib}" 75 | done 76 | fi 77 | } 78 | 79 | # Copies and strips a vendored dSYM 80 | install_dsym() { 81 | local source="$1" 82 | if [ -r "$source" ]; then 83 | # Copy the dSYM into a the targets temp dir. 84 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 85 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 86 | 87 | local basename 88 | basename="$(basename -s .framework.dSYM "$source")" 89 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 90 | 91 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 92 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 93 | strip_invalid_archs "$binary" 94 | fi 95 | 96 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 97 | # Move the stripped file into its final destination. 98 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 99 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 100 | else 101 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 102 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 103 | fi 104 | fi 105 | } 106 | 107 | # Signs a framework with the provided identity 108 | code_sign_if_enabled() { 109 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 110 | # Use the current code_sign_identity 111 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 112 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 113 | 114 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 115 | code_sign_cmd="$code_sign_cmd &" 116 | fi 117 | echo "$code_sign_cmd" 118 | eval "$code_sign_cmd" 119 | fi 120 | } 121 | 122 | # Strip invalid architectures 123 | strip_invalid_archs() { 124 | binary="$1" 125 | # Get architectures for current target binary 126 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 127 | # Intersect them with the architectures we are building for 128 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 129 | # If there are no archs supported by this binary then warn the user 130 | if [[ -z "$intersected_archs" ]]; then 131 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 132 | STRIP_BINARY_RETVAL=0 133 | return 134 | fi 135 | stripped="" 136 | for arch in $binary_archs; do 137 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 138 | # Strip non-valid architectures in-place 139 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 140 | stripped="$stripped $arch" 141 | fi 142 | done 143 | if [[ "$stripped" ]]; then 144 | echo "Stripped $binary of architectures:$stripped" 145 | fi 146 | STRIP_BINARY_RETVAL=1 147 | } 148 | 149 | 150 | if [[ "$CONFIGURATION" == "Debug" ]]; then 151 | install_framework "${BUILT_PRODUCTS_DIR}/NSMainProject/NSMainProject.framework" 152 | fi 153 | if [[ "$CONFIGURATION" == "Release" ]]; then 154 | install_framework "${BUILT_PRODUCTS_DIR}/NSMainProject/NSMainProject.framework" 155 | fi 156 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 157 | wait 158 | fi 159 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_NSMainProject_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_NSMainProject_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CTMediator" "${PODS_ROOT}/Headers/Public/ModuleA" "${PODS_ROOT}/Headers/Public/ModuleACategory" "${PODS_ROOT}/Headers/Public/ModuleB" "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CTMediator" "${PODS_CONFIGURATION_BUILD_DIR}/ModuleA" "${PODS_CONFIGURATION_BUILD_DIR}/ModuleACategory" "${PODS_CONFIGURATION_BUILD_DIR}/ModuleB" "${PODS_CONFIGURATION_BUILD_DIR}/NSModuleBCategory" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CTMediator" -isystem "${PODS_ROOT}/Headers/Public/ModuleA" -isystem "${PODS_ROOT}/Headers/Public/ModuleACategory" -isystem "${PODS_ROOT}/Headers/Public/ModuleB" -isystem "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"CTMediator" -l"ModuleA" -l"ModuleACategory" -l"ModuleB" -l"NSModuleBCategory" -framework "UIKit" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_NSMainProject_Example { 2 | umbrella header "Pods-NSMainProject_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Example/Pods-NSMainProject_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CTMediator" "${PODS_ROOT}/Headers/Public/ModuleA" "${PODS_ROOT}/Headers/Public/ModuleACategory" "${PODS_ROOT}/Headers/Public/ModuleB" "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CTMediator" "${PODS_CONFIGURATION_BUILD_DIR}/ModuleA" "${PODS_CONFIGURATION_BUILD_DIR}/ModuleACategory" "${PODS_CONFIGURATION_BUILD_DIR}/ModuleB" "${PODS_CONFIGURATION_BUILD_DIR}/NSModuleBCategory" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CTMediator" -isystem "${PODS_ROOT}/Headers/Public/ModuleA" -isystem "${PODS_ROOT}/Headers/Public/ModuleACategory" -isystem "${PODS_ROOT}/Headers/Public/ModuleB" -isystem "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"CTMediator" -l"ModuleA" -l"ModuleACategory" -l"ModuleB" -l"NSModuleBCategory" -framework "UIKit" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_NSMainProject_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_NSMainProject_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_NSMainProject_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_NSMainProject_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CTMediator" "${PODS_ROOT}/Headers/Public/ModuleA" "${PODS_ROOT}/Headers/Public/ModuleACategory" "${PODS_ROOT}/Headers/Public/ModuleB" "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CTMediator" -isystem "${PODS_ROOT}/Headers/Public/ModuleA" -isystem "${PODS_ROOT}/Headers/Public/ModuleACategory" -isystem "${PODS_ROOT}/Headers/Public/ModuleB" -isystem "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_NSMainProject_Tests { 2 | umbrella header "Pods-NSMainProject_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-NSMainProject_Tests/Pods-NSMainProject_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CTMediator" "${PODS_ROOT}/Headers/Public/ModuleA" "${PODS_ROOT}/Headers/Public/ModuleACategory" "${PODS_ROOT}/Headers/Public/ModuleB" "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CTMediator" -isystem "${PODS_ROOT}/Headers/Public/ModuleA" -isystem "${PODS_ROOT}/Headers/Public/ModuleACategory" -isystem "${PODS_ROOT}/Headers/Public/ModuleB" -isystem "${PODS_ROOT}/Headers/Public/NSModuleBCategory" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Tests/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 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMainProjectTests.m 3 | // NSMainProjectTests 4 | // 5 | // Created by NShunJian on 01/31/2019. 6 | // Copyright (c) 2019 NShunJian. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 NShunJian <528392911@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /NSMainProject.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint NSMainProject.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 https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'NSMainProject' 11 | s.version = '0.1.0' 12 | s.summary = 'A short description of NSMainProject.' 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 | TODO: Add long description of the pod here. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/NShunJian/NSMainProject' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'NShunJian' => '528392911@qq.com' } 28 | s.source = { :git => 'https://github.com/NShunJian/NSMainProject.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '8.0' 32 | 33 | s.source_files = 'NSMainProject/Classes/**/*' 34 | 35 | # s.resource_bundles = { 36 | # 'NSMainProject' => ['NSMainProject/Assets/*.png'] 37 | # } 38 | 39 | # s.public_header_files = 'Pod/Classes/**/*.h' 40 | # s.frameworks = 'UIKit', 'MapKit' 41 | # s.dependency 'AFNetworking', '~> 2.3' 42 | end 43 | -------------------------------------------------------------------------------- /NSMainProject/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NShunjian/iOSMainProject/9054d0bf7a873c8fcecde297ac319c56f09c477b/NSMainProject/Assets/.gitkeep -------------------------------------------------------------------------------- /NSMainProject/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NShunjian/iOSMainProject/9054d0bf7a873c8fcecde297ac319c56f09c477b/NSMainProject/Classes/.gitkeep -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iOSMainProject 2 | 3 | [![CI Status](https://img.shields.io/travis/NShunJian/NSMainProject.svg?style=flat)](https://travis-ci.org/NShunJian/NSMainProject) 4 | [![Version](https://img.shields.io/cocoapods/v/NSMainProject.svg?style=flat)](https://cocoapods.org/pods/NSMainProject) 5 | [![License](https://img.shields.io/cocoapods/l/NSMainProject.svg?style=flat)](https://cocoapods.org/pods/NSMainProject) 6 | [![Platform](https://img.shields.io/cocoapods/p/NSMainProject.svg?style=flat)](https://cocoapods.org/pods/NSMainProject) 7 | 8 | 9 | - 业务划分更佳清晰,新人接手更佳容易,可以按组件分配开发任务。 10 | - 项目可维护性更强,提高开发效率。 11 | - 更好排查问题,某个组件出现问题,直接对组件进行处理。 12 | - 开发测试过程中,可以只编译自己那部分代码,不需要编译整个项目代码。 13 | - 方便集成,项目需要哪个模块直接通过CocoaPods集成即可。 14 | 15 | 16 | 17 | 18 | 改进后的架构 19 | 20 | 进行组件化开发后,可以把每个组件当做一个独立的app,每个组件甚至可以采取不同的架构,例如分别使用MVVM、MVC、MVCS等架构,根据自己的编程习惯做选择。 21 | 22 | ## Example 23 | 24 | 要运行示例项目, clone the repo, run `pod install`. 25 | 26 | [跑演示时先添加私有库:](https://github.com/NShunjian/PodSpecs.git)https://github.com/NShunjian/PodSpecs.git 27 | ``` 28 | pod repo add PrivatePods https://github.com/NShunjian/PodSpecs.git 29 | ``` 30 | ## Requirements 31 | 32 | 本工程部分介绍 33 | 34 | `Category`目录在实际工程中是单独的一个repo,调用者通过依赖category这个repo来完成功能调度。一般来说是每一个业务对应一个category的repo。因此调用者需要调度哪个业务,就依赖哪个业务的category。category这个repo由对应提供服务的业务来维护。 35 | 36 | `CTMediator`目录在实际工程中也是一个单独的repo,仅用于存放中间件。被每一个业务线各自维护的category repo所依赖。 37 | 38 | `Target_`目录是实际提供服务的业务,这个在实际工程中也是一个单独的repo。这个repo不被任何人所依赖,这个repo通过target-action来提供被调度的功能,然后由category repo通过runtime调度。 39 | 40 | --- 41 | 42 | - [iOS应用架构谈 组件化方案](http://casatwy.com/iOS-Modulization.html) 43 | 44 | - [在现有工程中实施基于CTMediator的组件化方案](http://casatwy.com/modulization_in_action.html) 45 | 46 | - [CTMediator的Swift应用](https://casatwy.com/CTMediator_in_Swift.html) 47 | 48 | - [组件化架构漫谈](https://www.jianshu.com/p/67a6004f6930) 49 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /imgs/270478-21ba52ac7438edd8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NShunjian/iOSMainProject/9054d0bf7a873c8fcecde297ac319c56f09c477b/imgs/270478-21ba52ac7438edd8.png --------------------------------------------------------------------------------