yk_command 0.6.2 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/sonarlint/issuestore/index.pb +39 -33
- data/.idea/vcs.xml +2 -0
- data/.idea/yk_command.iml +58 -65
- data/.ruby-version +1 -1
- data/Gemfile +6 -3
- data/Gemfile.lock +11 -26
- data/debugProject/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/yk_command/.DS_Store +0 -0
- data/lib/yk_command/commands.rb +38 -20
- data/lib/yk_command/config/yk_config.rb +6 -7
- data/lib/yk_command/module/.DS_Store +0 -0
- data/lib/yk_command/module/module_handler.rb +48 -69
- data/lib/yk_command/module/template/.DS_Store +0 -0
- data/lib/yk_command/module/template/objc/.DS_Store +0 -0
- data/{.idea/sonarlint/issuestore/2/2/2264693887a1513e6c4ed16a6231e00d3045ec4e → lib/yk_command/module/template/objc/BusinessHeader.h} +0 -0
- data/lib/yk_command/module/template/objc/CategoryHeader.h +0 -2
- data/lib/yk_command/module/template/objc/Helper.h +16 -0
- data/lib/yk_command/module/template/objc/Helper.m +41 -0
- data/lib/yk_command/module/template/objc/RouterRegister.m +8 -15
- data/lib/yk_command/module/template/objc/ServiceRegister.m +4 -8
- data/lib/yk_command/module/template/swift/.DS_Store +0 -0
- data/lib/yk_command/module/template/swift/PrefixHeader_swift.swift +10 -0
- data/lib/yk_command/module/template/swift/RouterRegisterSwift.swift +23 -0
- data/lib/yk_command/module/template/swift/ServiceRegisterSwift.swift +20 -0
- data/lib/yk_command/module/template/swift/Tool.swift +53 -0
- data/lib/yk_command/module/yk_module.rb +2 -2
- data/lib/yk_command/project/.DS_Store +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/.gitignore +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/.travis.yml +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/CODE_OF_CONDUCT.md +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/LICENSE +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/NAME-osx.podspec +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/NAME.podspec +15 -15
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/POD_LICENSE +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/POD_README.md +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/Pod/Assets/.gitkeep +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/Pod/Classes/.gitkeep +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/README.md +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/configure +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/Base.lproj/LaunchScreen.storyboard +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/Base.lproj/Main.storyboard +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/CPDAppDelegate.h +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/CPDAppDelegate.m +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/CPDViewController.h +0 -0
- data/lib/yk_command/project/full_component_demo_template/templates/ios/Example/PROJECT/CPDViewController.m +47 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/PROJECT-Info.plist +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/PROJECT-Prefix.pch +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT/main.m +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT.xcodeproj/project.pbxproj +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/lib/yk_command/project/full_component_demo_template/templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +0 -0
- data/lib/yk_command/project/full_component_demo_template/templates/ios/Example/Podfile +34 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/Tests/Tests-Info.plist +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/Tests/Tests-Prefix.pch +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/Tests/Tests.m +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/ios/Example/Tests/en.lproj/InfoPlist.strings +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT/AppDelegate.swift +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT/Base.lproj/Main.storyboard +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT/Info.plist +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT/PROJECT.entitlements +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT/ViewController.swift +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT.xcodeproj/project.pbxproj +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/Podfile +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/Tests/Info.plist +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/macos-swift/Example/Tests/Tests.swift +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT/AppDelegate.swift +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT/Base.lproj/LaunchScreen.xib +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT/Base.lproj/Main.storyboard +0 -0
- data/lib/yk_command/project/full_component_demo_template/templates/swift/Example/PROJECT/Example-Bridging-Header.h +4 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT/Info.plist +0 -0
- data/lib/yk_command/project/full_component_demo_template/templates/swift/Example/PROJECT/STTestAppDelegate.swift +16 -0
- data/lib/yk_command/project/full_component_demo_template/templates/swift/Example/PROJECT/Tests-Bridging-Header.h +4 -0
- data/lib/yk_command/project/full_component_demo_template/templates/swift/Example/PROJECT/ViewController.swift +51 -0
- data/lib/yk_command/project/full_component_demo_template/templates/swift/Example/PROJECT/YKEmptyOcFile.m +9 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT.xcodeproj/project.pbxproj +41 -20
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/lib/yk_command/project/full_component_demo_template/templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +0 -0
- data/lib/yk_command/project/full_component_demo_template/templates/swift/Example/Podfile +35 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/Tests/Info.plist +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/templates/swift/Example/Tests/Tests.swift +0 -0
- data/lib/yk_command/project/setup/ConfigureMacOSSwift.rb +1 -1
- data/lib/yk_command/project/setup/ConfigureiOS.rb +1 -2
- data/lib/yk_command/project/setup/TemplateConfigurator.rb +4 -4
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/.gitignore +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/.travis.yml +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/CODE_OF_CONDUCT.md +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/LICENSE +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/NAME-osx.podspec +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/NAME.podspec +1 -1
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/POD_LICENSE +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/POD_README.md +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/Pod/Assets/.gitkeep +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/Pod/Classes/.gitkeep +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/README.md +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/configure +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/Base.lproj/LaunchScreen.storyboard +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/Base.lproj/Main.storyboard +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/CPDAppDelegate.h +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/CPDAppDelegate.m +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/CPDViewController.h +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/CPDViewController.m +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/PROJECT-Info.plist +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/PROJECT-Prefix.pch +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT/main.m +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT.xcodeproj/project.pbxproj +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/lib/yk_command/project/simple_component_demo_template/templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → simple_component_demo_template}/templates/ios/Example/Podfile +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/Tests/Tests-Info.plist +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/Tests/Tests-Prefix.pch +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/Tests/Tests.m +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/ios/Example/Tests/en.lproj/InfoPlist.strings +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT/AppDelegate.swift +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT/Base.lproj/Main.storyboard +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT/Info.plist +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT/PROJECT.entitlements +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT/ViewController.swift +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT.xcodeproj/project.pbxproj +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/Podfile +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/Tests/Info.plist +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/macos-swift/Example/Tests/Tests.swift +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT/AppDelegate.swift +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT/Base.lproj/LaunchScreen.xib +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT/Base.lproj/Main.storyboard +19 -2
- data/lib/yk_command/project/simple_component_demo_template/templates/swift/Example/PROJECT/EmptyOcFile.m +9 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT/Info.plist +0 -0
- data/lib/yk_command/project/simple_component_demo_template/templates/swift/Example/PROJECT/PROJECT_Example-Bridging-Header.h +4 -0
- data/lib/yk_command/project/simple_component_demo_template/templates/swift/Example/PROJECT/PROJECT_Tests-Bridging-Header.h +4 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT/ViewController.swift +3 -1
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT.xcodeproj/project.pbxproj +41 -20
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- data/lib/yk_command/project/simple_component_demo_template/templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +0 -0
- data/lib/yk_command/project/{YKProjectTemplate → simple_component_demo_template}/templates/swift/Example/Podfile +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/Tests/Info.plist +0 -0
- data/lib/yk_command/project/{simple_project_template → simple_component_demo_template}/templates/swift/Example/Tests/Tests.swift +0 -0
- data/lib/yk_command/project/yk_project.rb +7 -2
- data/lib/yk_command/version.rb +1 -1
- metadata +141 -129
- data/.idea/sonarlint/issuestore/2/4/2461a61a84d866812e64ff95d40bd7836fb136ea +0 -0
- data/.idea/sonarlint/issuestore/2/e/2e113f2d3dc9bee6a98073d85966fbd9773c044f +0 -0
- data/.idea/sonarlint/issuestore/7/1/71fc201a1096db97453882ad1da5120a71f77bb5 +0 -0
- data/.idea/sonarlint/issuestore/7/e/7ed8a0c3d2507e911337de44fdef07f89e35091a +0 -0
- data/.idea/sonarlint/issuestore/9/5/95a45210972238034e9fed522811176fe20117d3 +0 -0
- data/.idea/sonarlint/issuestore/9/7/97c2c9c7adeb7fa2e6ffbf07cba2418868ac9739 +0 -0
- data/.idea/sonarlint/issuestore/a/d/ad7bffefc6248a8f673a10e668a82bdbbe38a3e3 +0 -0
- data/.idea/sonarlint/issuestore/e/5/e5580d669a0c327c5b0897ba7dd8465a3d4db45a +0 -0
- data/lib/yk_command/module/template/objc/RouterDefine.h +0 -14
- data/lib/yk_command/module/template/objc/ServiceProtocol.h +0 -15
- data/lib/yk_command/module/template/objc/demo/DemoViewController.h +0 -17
- data/lib/yk_command/module/template/objc/demo/DemoViewController.m +0 -28
- data/lib/yk_command/module/template/objc/demo/DemoViewModel.h +0 -14
- data/lib/yk_command/module/template/objc/demo/DemoViewModel.m +0 -19
- data/lib/yk_command/module/template/swift/RouterDefine.swift +0 -28
- data/lib/yk_command/project/YKProjectTemplate/templates/ios/Example/PROJECT/CPDViewController.m +0 -60
- data/lib/yk_command/project/YKProjectTemplate/templates/swift/Example/PROJECT/ViewController.swift +0 -37
- data/lib/yk_command/project/simple_project_template/templates/ios/Example/Podfile +0 -19
- data/lib/yk_command/project/simple_project_template/templates/swift/Example/Podfile +0 -20
|
@@ -17,93 +17,72 @@ module YkCommand
|
|
|
17
17
|
|
|
18
18
|
no_commands do
|
|
19
19
|
def yk_module_folders
|
|
20
|
-
class_folder_path = "#{@final_path}/#{@name}/Classes"
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
end
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
# public_level_folders.each do |folder|
|
|
26
|
-
# path = "#{class_folder_path}/Public/#{folder}"
|
|
27
|
-
# empty_directory path
|
|
28
|
-
# end
|
|
23
|
+
YkCommand::ModuleHandler.source_root(File.dirname(__FILE__))
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
def yk_template_files
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
end
|
|
27
|
+
module_root_path = File.join(@final_path, @name)
|
|
28
|
+
module_classes_path = File.join(module_root_path, "Classes")
|
|
29
|
+
file_root_path = File.join(__dir__, "template")
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
end
|
|
31
|
+
# assets bundle
|
|
32
|
+
FileUtils.mkdir(File.join(module_root_path, "Assets", "Images.xcassets"))
|
|
33
|
+
# resources directory
|
|
34
|
+
FileUtils.mkdir(File.join(module_root_path,"Resources"))
|
|
42
35
|
|
|
43
|
-
|
|
36
|
+
dest_dir_business = "Work/Business"
|
|
37
|
+
dest_dir_category = "Work/Category"
|
|
38
|
+
dest_dir_vendor = "Work/Vendor"
|
|
39
|
+
dest_dir_tools = "Work/Tools"
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
dest_dir_register_oc = "Work/RegisterOC"
|
|
42
|
+
dest_dir_register_swift = "Work/RegisterSwift"
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'
|
|
52
|
-
'ServiceRegister.m' => 'ServiceRegister'
|
|
44
|
+
dest_dir_pch = "."
|
|
45
|
+
# pch file
|
|
46
|
+
file_dir_pch = File.join(file_root_path, "objc")
|
|
47
|
+
file_arr_pch = {
|
|
48
|
+
'PrefixHeader.pch' => dest_dir_pch,
|
|
53
49
|
}
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
template "#{__dir__}/template/objc/#{file_name}", final_file
|
|
51
|
+
file_arr_pch.each do |file, folder|
|
|
52
|
+
template(File.join(file_dir_pch, file), File.join(module_classes_path, folder, "#{@project}#{file}"))
|
|
58
53
|
end
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
# objc files
|
|
56
|
+
file_dir_oc = File.join(file_root_path, "objc")
|
|
57
|
+
file_arr_oc = {
|
|
58
|
+
'RouterRegister.h' => dest_dir_register_oc,
|
|
59
|
+
'RouterRegister.m' => dest_dir_register_oc,
|
|
60
|
+
'ServiceRegister.h' => dest_dir_register_oc,
|
|
61
|
+
'ServiceRegister.m' => dest_dir_register_oc,
|
|
62
|
+
'CategoryHeader.h' => dest_dir_category,
|
|
63
|
+
'ToolsHeader.h' => dest_dir_tools,
|
|
64
|
+
'Helper.h' => dest_dir_tools,
|
|
65
|
+
'Helper.m' => dest_dir_tools,
|
|
66
|
+
'VendorHeader.h' => dest_dir_vendor,
|
|
67
|
+
'BusinessHeader.h' => dest_dir_business,
|
|
68
|
+
}
|
|
61
69
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
final_file = "#{public_folder_path}/#{@prefixed_module}#{file_name}"
|
|
65
|
-
source = "#{__dir__}/template/objc/#{file_name}"
|
|
66
|
-
template source, final_file
|
|
70
|
+
file_arr_oc.each do |file, folder|
|
|
71
|
+
template(File.join(file_dir_oc, file), File.join(module_classes_path, folder, "#{@prefixed_module}#{file}"))
|
|
67
72
|
end
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
end
|
|
74
|
+
# swift files
|
|
75
|
+
file_dir_swift = File.join(file_root_path, "swift")
|
|
76
|
+
file_arr_swift = {
|
|
77
|
+
'RouterRegisterSwift.swift' => dest_dir_register_swift,
|
|
78
|
+
'ServiceRegisterSwift.swift' => dest_dir_register_swift,
|
|
75
79
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
# pch_file_name = "PrefixHeader.pch"
|
|
79
|
-
# final_file = "#{private_folder_path}/#{@prefixed_module}#{pch_file_name}"
|
|
80
|
-
# source = "#{__dir__}/template/objc/#{pch_file_name}"
|
|
81
|
-
# template source, final_file
|
|
82
|
-
|
|
83
|
-
private_level_folder_files = {
|
|
84
|
-
'PrefixHeader.pch' => 'Business',
|
|
85
|
-
'CategoryHeader.h' => 'Category',
|
|
86
|
-
'ToolsHeader.h' => 'Tools',
|
|
87
|
-
'vendorHeader.h' => 'Vendor'
|
|
80
|
+
'PrefixHeader_swift.swift' => dest_dir_pch,
|
|
81
|
+
'Tool.swift' => dest_dir_tools,
|
|
88
82
|
}
|
|
89
83
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if file_name == 'PrefixHeader.pch'
|
|
93
|
-
final_prefix = @name
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
final_file = "#{private_folder_path}/#{folder}/#{final_prefix}#{file_name}"
|
|
97
|
-
source = "#{__dir__}/template/objc/#{file_name}"
|
|
98
|
-
template source, final_file
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
business_demo_path = "#{@final_path}/#{@name}/Classes/Private/Business"
|
|
102
|
-
demo_replace_file = ['DemoViewController.h', 'DemoViewController.m', 'DemoViewModel.h', 'DemoViewModel.m']
|
|
103
|
-
demo_replace_file.each do |file_name|
|
|
104
|
-
final_file = "#{business_demo_path}/Demo/#{@prefixed_module}#{file_name}"
|
|
105
|
-
source = "#{__dir__}/template/objc/demo/#{file_name}"
|
|
106
|
-
template source, final_file
|
|
84
|
+
file_arr_swift.each do |file, folder|
|
|
85
|
+
template(File.join(file_dir_swift, file), File.join(module_classes_path, folder, "#{@prefixed_module}#{file}"))
|
|
107
86
|
end
|
|
108
87
|
|
|
109
88
|
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// <%= @prefixed_module %>Helper.h
|
|
3
|
+
// <%= @project %>
|
|
4
|
+
//
|
|
5
|
+
// Created by <%= @author %> on <%= @date %>.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
NSBundle * kModuleBundle_<%= @project %>(void);
|
|
13
|
+
NSBundle * kModuleResourceBundle_<%= @project %>(void);
|
|
14
|
+
UIImage * __nullable kModuleResourceImage_<%= @project %>(NSString *name);
|
|
15
|
+
|
|
16
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// <%= @prefixed_module %>Helper.m
|
|
3
|
+
// <%= @project %>
|
|
4
|
+
//
|
|
5
|
+
// Created by <%= @author %> on <%= @date %>.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import "<%= @prefixed_module %>Helper.h"
|
|
9
|
+
|
|
10
|
+
@interface <%= @prefixed_module %>HelperPrivate: NSObject
|
|
11
|
+
@end
|
|
12
|
+
|
|
13
|
+
@implementation <%= @prefixed_module %>HelperPrivate
|
|
14
|
+
@end
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
NSString * const kModuleName<%= @project %> = @"<%= @project %>";
|
|
18
|
+
|
|
19
|
+
NSBundle * kModuleBundle_<%= @project %>(void) {
|
|
20
|
+
return [NSBundle bundleForClass:[<%= @prefixed_module %>HelperPrivate class]];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
NSString * __nullable kModuleResourceBundlePath_<%= @project %>(void) {
|
|
24
|
+
NSString *bundlePath = [kModuleBundle_<%= @project %>() pathForResource:kModuleName<%= @project %> ofType:@"bundle"];
|
|
25
|
+
if (bundlePath.length == 0) { //bundle 不存在
|
|
26
|
+
return nil;
|
|
27
|
+
}
|
|
28
|
+
return bundlePath;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
NSBundle * kModuleResourceBundle_<%= @project %>(void) {
|
|
32
|
+
NSString *path = kModuleResourceBundlePath_<%= @project %>();
|
|
33
|
+
return path.length ? [NSBundle bundleWithPath:path] : kModuleBundle_<%= @project %>();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
UIImage * __nullable kModuleResourceImage_<%= @project %>(NSString *name) {
|
|
37
|
+
return [UIImage imageNamed:name inBundle:kModuleResourceBundle_<%= @project %>() compatibleWithTraitCollection:nil];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
@@ -10,23 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
#import <YKRouterComponent/YKRouterComponentHeader.h>
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#import "<%= @prefixed_module %>DemoViewController.h"
|
|
16
|
-
|
|
17
|
-
#import <<%= @name %>/<%= @name %>-Swift.h>
|
|
18
|
-
|
|
13
|
+
@interface <%= @prefixed_module %>RouterRegister()<YKRouterComponentRegisterProtocol>
|
|
14
|
+
@end
|
|
19
15
|
@implementation <%= @prefixed_module %>RouterRegister
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}];
|
|
29
|
-
|
|
17
|
+
+ (void)ykRouterRegisterExecute {
|
|
18
|
+
// [[YKRouterComponent shareInstance] ykRegisterUrlPartterns:@"kDemoRouterString" error:nil action:^(YKRouterUrlRequest * _Nonnull urlRequest, YKRouterUrlCompletion _Nonnull completetion) {
|
|
19
|
+
//
|
|
20
|
+
// UIViewController *vc = [[UIViewController alloc] init];
|
|
21
|
+
// [urlRequest.fromVC.navigationController pushViewController:vc animated:YES];
|
|
22
|
+
// }];
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
|
|
@@ -9,17 +9,13 @@
|
|
|
9
9
|
#import "<%= @prefixed_module %>ServiceRegister.h"
|
|
10
10
|
#import <YKModuleServiceComponent/YKModuleServiceComponentHeader.h>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#import "<%= @prefixed_module %>DemoViewModel.h"
|
|
16
|
-
|
|
12
|
+
@interface <%= @prefixed_module %>ServiceRegister()<YKModuleServiceRegisterProtocol>
|
|
13
|
+
@end
|
|
17
14
|
|
|
18
15
|
@implementation <%= @prefixed_module %>ServiceRegister
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
+ (void)ykModuleServiceRegistAction {
|
|
18
|
+
// YKModuleServiceRegisterExecute(XXXX.class, @protocol(XXXProtocol), nil);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
|
|
25
21
|
@end
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// <%= @prefixed_module %>RouterRegisterSwift.swift
|
|
2
|
+
//
|
|
3
|
+
// <%= @project %>
|
|
4
|
+
//
|
|
5
|
+
// Created by <%= @author %> on <%= @date %>.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import UIKit
|
|
9
|
+
|
|
10
|
+
import YKRouterComponent
|
|
11
|
+
|
|
12
|
+
class <%= @prefixed_module %>RouterRegisterSwift: NSObject {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
extension <%= @prefixed_module %>RouterRegisterSwift: YKRouterComponentRegisterProtocol {
|
|
16
|
+
static func ykRouterRegisterExecute() {
|
|
17
|
+
//注册路由 kRouter_example_POD_NAME_swift
|
|
18
|
+
//YKRouterRegisterUrlParttern("routerUrl", nil) { (urlRequest: YKRouterUrlRequest, complete: YKRouterUrlCompletion?) in
|
|
19
|
+
//let vc = UIViewController()
|
|
20
|
+
//urlRequest.fromVC?.navigationController?.pushViewController(vc, animated: true)
|
|
21
|
+
//}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// <%= @prefixed_module %>ServiceRegisterSwift.swift
|
|
3
|
+
// <%= @project %>
|
|
4
|
+
//
|
|
5
|
+
// Created by <%= @author %> on <%= @date %>.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
|
|
10
|
+
import YKModuleServiceComponentSwift
|
|
11
|
+
|
|
12
|
+
class <%= @prefixed_module %>ServiceRegisterSwift: NSObject, YKModuleServiceRegisterProtocol {
|
|
13
|
+
static func ykModuleServiceRegistAction() {
|
|
14
|
+
//注册服务 NSObject --> NSObjectProtocol NSObjectProtocol为 swift 协议
|
|
15
|
+
//YKModuleServiceComponent().ykRegistModuleService(service: NSObject.self, protocol: NSObjectProtocol.self, err: nil)
|
|
16
|
+
|
|
17
|
+
//注册服务 NSObject --> NSObjectProtocol NSObjectProtocol为 OC 协议
|
|
18
|
+
//YKService().ykRegisterModuleService_oc(NSObject.self, protocol: NSObjectProtocol.self, err: nil)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//
|
|
2
|
+
// <%= @prefixed_module %>Tool.swift
|
|
3
|
+
// <%= @project %>
|
|
4
|
+
//
|
|
5
|
+
// Created by <%= @author %> on <%= @date %>.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import UIKit
|
|
9
|
+
|
|
10
|
+
@objc
|
|
11
|
+
open class <%= @prefixed_module %>Tool: NSObject {
|
|
12
|
+
static let kModuleName = "<%= @project %>"
|
|
13
|
+
|
|
14
|
+
private class func kResourceBundlePath() -> String? {
|
|
15
|
+
let bundlePath: String? = kModuleBundle().path(forResource: kModuleName, ofType: "bundle")
|
|
16
|
+
if bundlePath == nil { //bundle 不存在
|
|
17
|
+
print("\nPOD_NAME xcassets bundle not exist:\(kModuleName)\n")
|
|
18
|
+
}
|
|
19
|
+
return bundlePath
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// 组件bundle
|
|
23
|
+
@objc public class func kModuleBundle() -> Bundle{
|
|
24
|
+
let result = Bundle.init(for: <%= @prefixed_module %>Tool.self)
|
|
25
|
+
return result
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// 组件 素材bundle
|
|
29
|
+
@objc public class func kModuleResourceBundle() -> Bundle {
|
|
30
|
+
let path: String? = self.kResourceBundlePath()
|
|
31
|
+
var result = Bundle.main
|
|
32
|
+
if path != nil {
|
|
33
|
+
result = Bundle.init(path: path!)!
|
|
34
|
+
if result.isLoaded == false {
|
|
35
|
+
do {
|
|
36
|
+
try result.loadAndReturnError()
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return result
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
///资源组件 获取xcasserts 中图片
|
|
48
|
+
@objc public class func kResourceImage(name: String?) -> UIImage? {
|
|
49
|
+
let imgName = name ?? ""
|
|
50
|
+
let result = UIImage.init(named: imgName, in: kModuleResourceBundle(), compatibleWith: nil)
|
|
51
|
+
return result
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -201,11 +201,11 @@ module YkCommand
|
|
|
201
201
|
|
|
202
202
|
# host_a = 'yeah'
|
|
203
203
|
# host_b = 'ka'
|
|
204
|
-
# template_repo_url = "http://gitlab.#{host_a}#{host_b}.com/App/iOS/YKComponents/
|
|
204
|
+
# template_repo_url = "http://gitlab.#{host_a}#{host_b}.com/App/iOS/YKComponents/full_component_demo_template.git"
|
|
205
205
|
# system("git clone #{template_repo_url} #{@final_path}")
|
|
206
206
|
|
|
207
207
|
# FileUtils.remove_dir(@final_path, true)
|
|
208
|
-
# FileUtils.cp_r('/Users/imacn24/Documents/dev/
|
|
208
|
+
# FileUtils.cp_r('/Users/imacn24/Documents/dev/full_component_demo_template', @final_path)
|
|
209
209
|
# FileUtils.remove_dir("#{@final_path}/.git", true)
|
|
210
210
|
# end
|
|
211
211
|
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/CODE_OF_CONDUCT.md
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/NAME-osx.podspec
RENAMED
|
File without changes
|
|
@@ -91,15 +91,13 @@ Pod::Spec.new do |spec|
|
|
|
91
91
|
# Not including the public_header_files will make all headers public.
|
|
92
92
|
#
|
|
93
93
|
|
|
94
|
-
spec.source_files = '${POD_NAME}/Classes
|
|
95
|
-
spec.exclude_files = "Classes/Exclude"
|
|
96
|
-
spec.prefix_header_file = '${POD_NAME}/Classes/Private/Business/${POD_NAME}PrefixHeader.pch'
|
|
97
|
-
spec.public_header_files = '${POD_NAME}/Classes/Public/**/*.h'
|
|
98
|
-
|
|
99
|
-
# spec.public_header_files = "Classes/**/*.h"
|
|
100
|
-
|
|
94
|
+
spec.source_files = '${POD_NAME}/Classes/**/*.{h,m,mm,c,cpp,swift,pch}'
|
|
95
|
+
# spec.exclude_files = "Classes/Exclude" #排除文件
|
|
101
96
|
|
|
97
|
+
spec.prefix_header_file = '${POD_NAME}/Classes/${POD_NAME}PrefixHeader.pch'
|
|
102
98
|
|
|
99
|
+
spec.project_header_files = '${POD_NAME}/Classes/{Category,Register,Tools,Vendor,Business}/**/*.{h}'
|
|
100
|
+
#spec.public_header_files = '${POD_NAME}/Classes/Public/**/*.h' #此处放置组件的对外暴漏的头文件
|
|
103
101
|
|
|
104
102
|
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
|
105
103
|
#
|
|
@@ -110,10 +108,12 @@ Pod::Spec.new do |spec|
|
|
|
110
108
|
#
|
|
111
109
|
|
|
112
110
|
# spec.resource = "icon.png"
|
|
113
|
-
#
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
# 放置 json,font,jpg,png等资源
|
|
112
|
+
spec.resources = "${POD_NAME}/{Classes,Resources}/**/*.{png,jpg,font,json,xib}"
|
|
113
|
+
|
|
114
|
+
spec.resource_bundles = {
|
|
115
|
+
'${POD_NAME}' => ['${POD_NAME}/Assets/**/*.xcassets']
|
|
116
|
+
}
|
|
117
117
|
# spec.preserve_paths = "FilesToSave", "MoreFilesToSave"
|
|
118
118
|
|
|
119
119
|
|
|
@@ -141,11 +141,11 @@ Pod::Spec.new do |spec|
|
|
|
141
141
|
# spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
|
|
142
142
|
# spec.dependency "JSONKit", "~> 1.4"
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
spec.dependency "YKCategoryComponent"
|
|
144
|
+
# 组件化架构中间件
|
|
147
145
|
spec.dependency "YKModuleLifeCircleComponent"
|
|
148
146
|
spec.dependency "YKRouterComponent"
|
|
149
|
-
spec.dependency "YKModuleServiceComponent"
|
|
147
|
+
spec.dependency "YKModuleServiceComponent" # oc 服务中间件
|
|
148
|
+
spec.dependency "YKModuleServiceComponent.swift" #swift 服务中间件, 如果是纯oc组件,请注释此中间件
|
|
150
149
|
|
|
150
|
+
# 其他依赖pod
|
|
151
151
|
end
|
|
File without changes
|
data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/POD_README.md
RENAMED
|
File without changes
|
data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/Pod/Assets/.gitkeep
RENAMED
|
File without changes
|
data/lib/yk_command/project/{YKProjectTemplate → full_component_demo_template}/Pod/Classes/.gitkeep
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// CPDViewController.m
|
|
3
|
+
// PROJECT
|
|
4
|
+
//
|
|
5
|
+
// Created by PROJECT_OWNER on TODAYS_DATE.
|
|
6
|
+
// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "CPDViewController.h"
|
|
10
|
+
|
|
11
|
+
#import <YKRouterComponent/YKRouterComponentHeader.h>
|
|
12
|
+
#import <YKModuleServiceComponent/YKModuleServiceComponentHeader.h>
|
|
13
|
+
|
|
14
|
+
@interface CPDViewController ()
|
|
15
|
+
|
|
16
|
+
@end
|
|
17
|
+
@implementation CPDViewController
|
|
18
|
+
|
|
19
|
+
- (void)viewDidLoad
|
|
20
|
+
{
|
|
21
|
+
[super viewDidLoad];
|
|
22
|
+
// Do any additional setup after loading the view, typically from a nib.
|
|
23
|
+
self.navigationItem.title = [NSString stringWithFormat:@"%@",@"PROJECT Demo"];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
- (IBAction)routerEvent:(id)sender {
|
|
27
|
+
NSLog(@"这里调用模块的路由");
|
|
28
|
+
// YKRouterUrlRequest* request = [YKRouterUrlRequest instanceWithBuilder:^(YKRouterUrlRequest * _Nonnull builder) {
|
|
29
|
+
// builder.url = @"url";
|
|
30
|
+
// builder.parameter = @{};
|
|
31
|
+
// }];
|
|
32
|
+
// return [[YKRouterComponent shareInstance] ykOpenUrl:request complete:^(YKRouterUrlResponse * _Nonnull urlResponse) {
|
|
33
|
+
//
|
|
34
|
+
// }];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
- (IBAction)serviceEvent:(id)sender {
|
|
38
|
+
NSLog(@"这里调用模块的服务");
|
|
39
|
+
// NSError *err;
|
|
40
|
+
// __kindof Class<NSObject> cls =YKModuleServiceWithProtocol(@protocol(CPDPROJECTServiceProtocol), &err);
|
|
41
|
+
// if (!err) {
|
|
42
|
+
// NSObject <CPDPROJECTServiceProtocol>* obj = [[cls alloc] init];
|
|
43
|
+
// [obj replaceThisMethod];
|
|
44
|
+
// }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
platform :ios, '10.0'
|
|
3
|
+
|
|
4
|
+
inhibit_all_warnings!
|
|
5
|
+
use_modular_headers!
|
|
6
|
+
use_frameworks! :linkage => :static
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
#pod_install hook
|
|
10
|
+
post_install do |installer|
|
|
11
|
+
|
|
12
|
+
# 单个target编辑配置
|
|
13
|
+
installer.pods_project.targets.each do |target|
|
|
14
|
+
target.build_configurations.each do |config|
|
|
15
|
+
#config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
|
|
16
|
+
|
|
17
|
+
config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = "org.cocoapods.${PRODUCT_NAME}"
|
|
18
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
19
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
20
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
target '${POD_NAME}_Example' do
|
|
27
|
+
pod '${POD_NAME}', :path => '../'
|
|
28
|
+
|
|
29
|
+
target '${POD_NAME}_Tests' do
|
|
30
|
+
inherit! :search_paths
|
|
31
|
+
|
|
32
|
+
${INCLUDED_PODS}
|
|
33
|
+
end
|
|
34
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|