├── docs ├── html │ ├── css │ │ └── scss │ │ │ ├── style.scss │ │ │ ├── _index.scss │ │ │ ├── _variables.scss │ │ │ ├── _xcode.scss │ │ │ ├── _print.scss │ │ │ └── _object.scss │ ├── img │ │ ├── disclosure.png │ │ ├── disclosure_open.png │ │ ├── title_background.png │ │ ├── library_background.png │ │ └── button_bar_background.png │ ├── js │ │ └── script.js │ ├── Blocks │ │ ├── BHBackgroundHandler.html │ │ ├── BHWatchReplyHandler.html │ │ ├── BHNotificationResultHandler.html │ │ ├── BHRPathComponentCustomHandler.html │ │ ├── BHShortcutCompletionHandler.html │ │ ├── BHNotificationCompletionHandler.html │ │ ├── MLSRouteHandleTargetCallBackBlock.html │ │ ├── MLSRouteUnMatchedURLHandlerBlock.html │ │ ├── BHUserActivityRestorationHandler.html │ │ ├── MLSRouteHandlerParamsCallBackBlock.html │ │ └── BHNotificationPresentationOptionsHandler.html │ ├── Classes │ │ ├── MLSBaseModule.html │ │ ├── MLSAppDelegate.html │ │ ├── BHAnnotation.html │ │ ├── MLSModule.html │ │ ├── BHAppDelegate.html │ │ ├── BHWatchItem.html │ │ ├── BHBackgroundItem.html │ │ ├── BHShortcutItem.html │ │ └── BHWatchDog.html │ └── Categories │ │ ├── NSObject+MLSRouter.html │ │ └── UIViewController+MLSRouter.html └── markdown │ ├── Classes │ ├── MLSBaseModule.md │ ├── MLSAppDelegate.md │ ├── BHAnnotation.md │ ├── MLSModule.md │ ├── BHAppDelegate.md │ ├── BHWatchItem.md │ ├── BHBackgroundItem.md │ ├── BHShortcutItem.md │ ├── BHWatchDog.md │ ├── BHOpenURLItem.md │ ├── BHUserActivityItem.md │ ├── MLSGenerateRouteHeaderTool.md │ ├── MLSParsingUtilities.md │ ├── BHNotificationsItem.md │ ├── BeeHive.md │ ├── BHTimeProfiler.md │ ├── MLSRouteResponse.md │ ├── BHModuleManager.md │ ├── BHServiceManager.md │ ├── MLSRouteRequest.md │ ├── BHConfig.md │ └── BHRouter.md │ ├── Categories │ ├── NSObject+MLSRouter.md │ ├── UIViewController+MLSRouter.md │ └── NSDictionary+RouterParams.md │ ├── Blocks │ ├── BHBackgroundHandler.md │ ├── BHWatchReplyHandler.md │ ├── BHShortcutCompletionHandler.md │ ├── BHNotificationCompletionHandler.md │ ├── BHNotificationResultHandler.md │ ├── BHUserActivityRestorationHandler.md │ ├── BHRPathComponentCustomHandler.md │ ├── MLSRouteHandlerParamsCallBackBlock.md │ ├── BHNotificationPresentationOptionsHandler.md │ ├── MLSRouteUnMatchedURLHandlerBlock.md │ └── MLSRouteHandleTargetCallBackBlock.md │ ├── Protocols │ ├── MLSServiceProtocol.md │ ├── MLSRouteDefinitionTargetController.md │ └── BHServiceProtocol.md │ └── Constants │ └── BHModuleLevel.md ├── MLSModuleCenterDemo ├── MLSModuleCenterDemo │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ViewController.h │ ├── AppDelegate.h │ ├── Moudles │ │ ├── MLSTestMoudle.h │ │ ├── Route │ │ │ ├── MLSTestDefaultViewController.h │ │ │ ├── MLSTestSchemeViewController.h │ │ │ ├── MLSTestPathParamsViewController.h │ │ │ ├── MLSTestDefaultViewController.m │ │ │ ├── MLSTestPathParamsViewController.m │ │ │ └── MLSTestSchemeViewController.m │ │ └── MLSTestMoudle.m │ ├── main.m │ ├── Header │ │ ├── MLSRouteHeader.h │ │ └── MLSRouteHeader.m │ ├── Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ ├── ViewController.m │ └── AppDelegate.m ├── Pods │ ├── Target Support Files │ │ ├── MLSModuleCenter │ │ │ ├── MLSModuleCenter.modulemap │ │ │ ├── MLSModuleCenter-dummy.m │ │ │ ├── MLSModuleCenter-prefix.pch │ │ │ ├── MLSModuleCenter.xcconfig │ │ │ ├── MLSModuleCenter-Info.plist │ │ │ └── MLSModuleCenter-umbrella.h │ │ └── Pods-MLSModuleCenterDemo │ │ │ ├── Pods-MLSModuleCenterDemo.modulemap │ │ │ ├── Pods-MLSModuleCenterDemo-dummy.m │ │ │ ├── Pods-MLSModuleCenterDemo-umbrella.h │ │ │ ├── Pods-MLSModuleCenterDemo.debug.xcconfig │ │ │ ├── Pods-MLSModuleCenterDemo.release.xcconfig │ │ │ ├── Pods-MLSModuleCenterDemo-Info.plist │ │ │ ├── Pods-MLSModuleCenterDemo-acknowledgements.markdown │ │ │ └── Pods-MLSModuleCenterDemo-acknowledgements.plist │ ├── Manifest.lock │ └── Local Podspecs │ │ └── MLSModuleCenter.podspec.json ├── MLSModuleCenterDemo.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── MLSModuleCenterDemo.xcworkspace │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── contents.xcworkspacedata ├── Podfile └── Podfile.lock ├── Classes ├── Moudle │ ├── MLSAppDelegate.h │ ├── BeeHive │ │ ├── BHWatchDog.h │ │ ├── BHServiceProtocol.h │ │ ├── BHCommon.h │ │ ├── BHDefines.h │ │ ├── BHTimeProfiler.h │ │ ├── BHServiceManager.h │ │ ├── BeeHive.h │ │ ├── BHConfig.h │ │ ├── BeeHive.m │ │ ├── BHContext.h │ │ ├── BHModuleManager.h │ │ ├── BHRouter.h │ │ ├── BHModuleProtocol.h │ │ ├── BHAnnotation.h │ │ ├── BHWatchDog.m │ │ ├── BHContext.m │ │ └── BHAppDelegate.h │ ├── MLSAppDelegate.m │ ├── MLSBaseModule.h │ ├── Protocol │ │ └── MLSServiceProtocol.h │ └── MLSBaseModule.m ├── Route │ └── Core │ │ ├── Categories │ │ ├── UIViewController+MLSRouter.h │ │ ├── NSObject+MLSRouter.h │ │ ├── UIViewController+MLSRouter.m │ │ └── NSDictionary+MLSRouter.h │ │ ├── MLSRoutes │ │ ├── MLSParsingUtilities.h │ │ ├── MLSRouteResponse.m │ │ ├── MLSRouteResponse.h │ │ └── MLSRouteRequest.h │ │ └── Protocol │ │ └── MLSRouteControlProtocol.h ├── Tools │ └── MLSGenerateRouteHeaderTool.h └── MLSModuleCenter.h ├── push_repo.sh ├── LICENSE ├── README.md ├── MLSModuleCenter.podspec ├── .gitignore └── AppledocSettings.plist /docs/html/css/scss/style.scss: -------------------------------------------------------------------------------- 1 | @import "variables", "normalize", "layout", "index", "object", "print", "xcode"; 2 | -------------------------------------------------------------------------------- /docs/html/img/disclosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Minlison/MLSModuleCenter/HEAD/docs/html/img/disclosure.png -------------------------------------------------------------------------------- /docs/html/img/disclosure_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Minlison/MLSModuleCenter/HEAD/docs/html/img/disclosure_open.png -------------------------------------------------------------------------------- /docs/html/img/title_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Minlison/MLSModuleCenter/HEAD/docs/html/img/title_background.png -------------------------------------------------------------------------------- /docs/html/img/library_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Minlison/MLSModuleCenter/HEAD/docs/html/img/library_background.png -------------------------------------------------------------------------------- /docs/html/img/button_bar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Minlison/MLSModuleCenter/HEAD/docs/html/img/button_bar_background.png -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/MLSModuleCenter/MLSModuleCenter.modulemap: -------------------------------------------------------------------------------- 1 | framework module MLSModuleCenter { 2 | umbrella header "MLSModuleCenter-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /docs/markdown/Classes/MLSBaseModule.md: -------------------------------------------------------------------------------- 1 | # MLSBaseModule Class Reference 2 | 3 |   **Inherits from** MLSModule : 4 | NSObject 5 |   **Declared in** MLSBaseModule.h 6 | 7 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/MLSModuleCenter/MLSModuleCenter-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MLSModuleCenter : NSObject 3 | @end 4 | @implementation PodsDummy_MLSModuleCenter 5 | @end 6 | -------------------------------------------------------------------------------- /docs/markdown/Classes/MLSAppDelegate.md: -------------------------------------------------------------------------------- 1 | # MLSAppDelegate Class Reference 2 | 3 |   **Inherits from** BHAppDelegate : 4 | UIResponder 5 |   **Declared in** MLSAppDelegate.h 6 | 7 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_MLSModuleCenterDemo { 2 | umbrella header "Pods-MLSModuleCenterDemo-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /docs/markdown/Categories/NSObject+MLSRouter.md: -------------------------------------------------------------------------------- 1 | # NSObject(MLSRouter) Category Reference 2 | 3 |   **Conforms to** MLSRouteControlProtocol 4 |   **Declared in** NSObject+MLSRouter.h 5 | 6 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MLSModuleCenterDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MLSModuleCenterDemo 5 | @end 6 | -------------------------------------------------------------------------------- /docs/html/css/scss/_index.scss: -------------------------------------------------------------------------------- 1 | .index-container { 2 | display: flex; 3 | flex-direction: row; 4 | flex-wrap: wrap; 5 | 6 | @media (max-width: $mobile-max-width) { 7 | flex-direction: column; 8 | } 9 | 10 | .index-column { 11 | flex: 1 1 33%; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Classes/Moudle/MLSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSAppDelegate.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | #import "BHAppDelegate.h" 10 | @interface MLSAppDelegate : BHAppDelegate 11 | @end 12 | -------------------------------------------------------------------------------- /docs/markdown/Categories/UIViewController+MLSRouter.md: -------------------------------------------------------------------------------- 1 | # UIViewController(MLSRouter) Category Reference 2 | 3 |   **Conforms to** MLSRouteDefinitionTargetController 4 |   **Declared in** UIViewController+MLSRouter.h 5 | 6 | -------------------------------------------------------------------------------- /push_repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pod repo update minlison 3 | echo "-------发布 $1 到 minlison 库...-------" 4 | pod repo-tal push minlison MLSModuleCenter.podspec --sources=https://github.com/Minlison/Specs.git,master --allow-warnings --verbose 5 | echo "-------发布 $1 到 minlison 库完成-------" 6 | pod repo update minlison 7 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHBackgroundHandler.md: -------------------------------------------------------------------------------- 1 | # BHBackgroundHandler Block Reference 2 | 3 |   **Declared in** BHAppDelegate.h 4 | 5 | 6 | ## Block Definition 7 | ### BHBackgroundHandler 8 | 9 | typedef void (^BHBackgroundHandler) (void ) 10 | 11 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/MLSModuleCenter/MLSModuleCenter-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 | -------------------------------------------------------------------------------- /Classes/Route/Core/Categories/UIViewController+MLSRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MLSRouter.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/10. 6 | // 7 | 8 | #import 9 | #import "MLSRouteDefinition.h" 10 | @interface UIViewController (MLSRouter) 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MLSModuleCenterDemo 4 | // 5 | // Created by yuanhang on 2019/10/9. 6 | // Copyright © 2019 minlison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHWatchReplyHandler.md: -------------------------------------------------------------------------------- 1 | # BHWatchReplyHandler Block Reference 2 | 3 |   **Declared in** BHAppDelegate.h 4 | 5 | 6 | ## Block Definition 7 | ### BHWatchReplyHandler 8 | 9 | typedef void (^BHWatchReplyHandler) (NSDictionary *replyInfo) 10 | 11 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHShortcutCompletionHandler.md: -------------------------------------------------------------------------------- 1 | # BHShortcutCompletionHandler Block Reference 2 | 3 |   **Declared in** BHAppDelegate.h 4 | 5 | 6 | ## Block Definition 7 | ### BHShortcutCompletionHandler 8 | 9 | typedef void (^BHShortcutCompletionHandler) (BOOL ) 10 | 11 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHNotificationCompletionHandler.md: -------------------------------------------------------------------------------- 1 | # BHNotificationCompletionHandler Block Reference 2 | 3 |   **Declared in** BHAppDelegate.h 4 | 5 | 6 | ## Block Definition 7 | ### BHNotificationCompletionHandler 8 | 9 | typedef void (^BHNotificationCompletionHandler) (void ) 10 | 11 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MLSModuleCenterDemo 4 | // 5 | // Created by yuanhang on 2019/10/9. 6 | // Copyright © 2019 minlison. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface AppDelegate : MLSAppDelegate 13 | 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHNotificationResultHandler.md: -------------------------------------------------------------------------------- 1 | # BHNotificationResultHandler Block Reference 2 | 3 |   **Declared in** BHAppDelegate.h 4 | 5 | 6 | ## Block Definition 7 | ### BHNotificationResultHandler 8 | 9 | typedef void (^BHNotificationResultHandler) (UIBackgroundFetchResult ) 10 | 11 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHUserActivityRestorationHandler.md: -------------------------------------------------------------------------------- 1 | # BHUserActivityRestorationHandler Block Reference 2 | 3 |   **Declared in** BHAppDelegate.h 4 | 5 | 6 | ## Block Definition 7 | ### BHUserActivityRestorationHandler 8 | 9 | typedef void (^BHUserActivityRestorationHandler) (NSArray *) 10 | 11 | -------------------------------------------------------------------------------- /docs/html/css/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | $body-font: -apple-system-font, "Helvetica Neue", Helvetica, sans-serif; 2 | $code-font: "Source Code Pro", Monaco, Menlo, Consolas, monospace; 3 | 4 | $body-background: #f2f2f2; 5 | $content-background: #fff; 6 | $content-border: #e9e9e9; 7 | $tint-color: #08c; 8 | $object-background: #f9f9f9; 9 | $object-border: #e9e9e9; 10 | 11 | $mobile-max-width: 650px; 12 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHRPathComponentCustomHandler.md: -------------------------------------------------------------------------------- 1 | # BHRPathComponentCustomHandler Block Reference 2 | 3 |   **Declared in** BHRouter.h 4 | 5 | 6 | ## Block Definition 7 | ### BHRPathComponentCustomHandler 8 | 9 | typedef void (^BHRPathComponentCustomHandler) (NSDictionary <, NSString *, id >, * params) 10 | 11 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/MLSTestMoudle.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestMoudle.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/3/1. 6 | // Copyright © 2019 MinLison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MLSTestMoudle : MLSBaseModule 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Classes/Route/Core/Categories/NSObject+MLSRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MLSRouter.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/2/26. 6 | // 7 | 8 | #import 9 | #import 10 | #import "MLSRouteControlProtocol.h" 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (MLSRouter) 14 | @end 15 | 16 | NS_ASSUME_NONNULL_END 17 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/MLSRouteHandlerParamsCallBackBlock.md: -------------------------------------------------------------------------------- 1 | # MLSRouteHandlerParamsCallBackBlock Block Reference 2 | 3 |   **Declared in** MLSRoutes.h 4 | 5 | 6 | ## Block Definition 7 | ### MLSRouteHandlerParamsCallBackBlock 8 | 9 | typedef id (^MLSRouteHandlerParamsCallBackBlock) (NSMutableDictionary <, NSString *, id >, * _Nullable, parameters ) 10 | 11 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/Route/MLSTestDefaultViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestDefaultViewController.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/3/1. 6 | // Copyright © 2019 MinLison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MLSTestDefaultViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/BHNotificationPresentationOptionsHandler.md: -------------------------------------------------------------------------------- 1 | # BHNotificationPresentationOptionsHandler Block Reference 2 | 3 |   **Declared in** BHAppDelegate.h 4 | 5 | 6 | ## Block Definition 7 | ### BHNotificationPresentationOptionsHandler 8 | 9 | typedef void (^BHNotificationPresentationOptionsHandler) (UNNotificationPresentationOptions options) 10 | 11 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/Route/MLSTestSchemeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestSchemeViewController.h 3 | // MLSModuleCenterDemo 4 | // 5 | // Created by yuanhang on 2019/10/9. 6 | // Copyright © 2019 minlison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MLSTestSchemeViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/Route/MLSTestPathParamsViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestPathParamsViewController.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/3/1. 6 | // Copyright © 2019 MinLison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MLSTestPathParamsViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /docs/html/css/scss/_xcode.scss: -------------------------------------------------------------------------------- 1 | .xcode { 2 | header, aside { 3 | display: none; 4 | } 5 | 6 | .container { 7 | padding: 0; 8 | } 9 | 10 | article { 11 | margin-top: 0; 12 | 13 | #content { 14 | border: 0; 15 | margin: 0; 16 | } 17 | } 18 | 19 | .method-info { 20 | &, .section-method.hide & { 21 | max-height: auto; 22 | overflow: visible; 23 | 24 | &.hiding { 25 | display: block; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/MLSRouteUnMatchedURLHandlerBlock.md: -------------------------------------------------------------------------------- 1 | # MLSRouteUnMatchedURLHandlerBlock Block Reference 2 | 3 |   **Declared in** MLSRoutes.h 4 | 5 | 6 | ## Block Definition 7 | ### MLSRouteUnMatchedURLHandlerBlock 8 | 9 | typedef void (^MLSRouteUnMatchedURLHandlerBlock) (MLSRoutes *routes, NSURL *__nullable URL, NSDictionary <, NSString *, id >, * __nullable parameters) 10 | 11 | -------------------------------------------------------------------------------- /Classes/Route/Core/Categories/UIViewController+MLSRouter.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MLSRouter.m 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/10. 6 | // 7 | 8 | #import "UIViewController+MLSRouter.h" 9 | #import "MLSRoutes.h" 10 | @implementation UIViewController (MLSRouter) 11 | + (nullable UIViewController *)targetControllerWithParams:(nullable NSDictionary *)parameters { 12 | return nil; 13 | } 14 | @end 15 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo-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_MLSModuleCenterDemoVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_MLSModuleCenterDemoVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHAnnotation.md: -------------------------------------------------------------------------------- 1 | # BHAnnotation Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHAnnotation.h 5 | 6 | ## Overview 7 | 8 | Created by BeeHive. 9 | Copyright © 2016, Alibaba, Inc. All rights reserved. 10 | 11 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 12 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 13 | 14 | -------------------------------------------------------------------------------- /docs/markdown/Classes/MLSModule.md: -------------------------------------------------------------------------------- 1 | # MLSModule Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Conforms to** BHModuleProtocol 5 |   **Declared in** MLSBaseModule.h 6 | 7 | ## Overview 8 | 9 | 基类 Module 10 | 每创建一个模块时, 需要继承该类, 并在Module 头文件中, 引入该模块的所有暴露的头文件 11 | 可以使用 MOUDLE_EXPORT(NO) 是否异步加载 Module (该方法是在 +load 方法内调用, 需要写到 @implementation 和 @end 之间) 12 | 也可以使用 @BeeHiveMod(BaseModule) 来注册 Moudlle (该方法是在应用启动前, 加载符号文件时候调用) 13 | 14 | -------------------------------------------------------------------------------- /Classes/Route/Core/Categories/NSDictionary+MLSRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+RouterParams.h 3 | // MinLison 4 | // 5 | // Created by MinLison on 2017/9/12. 6 | // Copyright © 2017年 minlison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (RouterParams) 12 | 13 | /** 14 | 创建 router 的参数 15 | @{ 16 | @"name" : @"a", 17 | @"age" : @(10) 18 | } 19 | 20 | return @"name=a&age=10" 21 | @return 字符串参数 22 | */ 23 | - (NSString *)routerParams; 24 | @end 25 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHWatchDog.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface BHWatchDog : NSObject 12 | 13 | - (instancetype)initWithThreshold:(double)threshold strictMode:(BOOL)strictMode; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/MLSModuleCenter/MLSModuleCenter.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 MLSModuleCenterToolsEnable=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 | -------------------------------------------------------------------------------- /docs/markdown/Blocks/MLSRouteHandleTargetCallBackBlock.md: -------------------------------------------------------------------------------- 1 | # MLSRouteHandleTargetCallBackBlock Block Reference 2 | 3 |   **Declared in** MLSRoutes.h 4 | 5 | 6 | ## Block Definition 7 | ### MLSRouteHandleTargetCallBackBlock 8 | 9 | 回调Block 10 | 11 | typedef BOOL (^MLSRouteHandleTargetCallBackBlock) (NSMutableDictionary <, NSString *, id >, * _Nullable, parameters , id targetObj) 12 | 13 | #### Declared In 14 | MLSRoutes.h 15 | 16 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHServiceProtocol.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "BHAnnotation.h" 11 | 12 | @protocol BHServiceProtocol 13 | 14 | @optional 15 | 16 | + (BOOL)singleton; 17 | 18 | + (id)shareInstance; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHCommon.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #ifndef BHCommon_h 10 | #define BHCommon_h 11 | 12 | // Debug Logging 13 | #ifdef DEBUG 14 | #define BHLog(x, ...) NSLog(x, ## __VA_ARGS__); 15 | #else 16 | #define BHLog(x, ...) 17 | #endif 18 | 19 | #endif /* BHCommon_h */ 20 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHAppDelegate.md: -------------------------------------------------------------------------------- 1 | # BHAppDelegate Class Reference 2 | 3 |   **Inherits from** UIResponder 4 |   **Conforms to** UIApplicationDelegate 5 |   **Declared in** BHAppDelegate.h 6 | 7 | ## Overview 8 | 9 | Created by BeeHive. 10 | Copyright © 2016, Alibaba, Inc. All rights reserved. 11 | 12 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 13 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 14 | 15 | -------------------------------------------------------------------------------- /Classes/Moudle/MLSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSAppDelegate.m 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | #import "MLSAppDelegate.h" 10 | #import "BeeHive.h" 11 | #import "BHTimeProfiler.h" 12 | #import "BHModuleManager.h" 13 | #import "BHServiceManager.h" 14 | @implementation MLSAppDelegate 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 18 | } 19 | @end 20 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MLSModuleCenterDemo 4 | // 5 | // Created by yuanhang on 2019/10/9. 6 | // Copyright © 2019 minlison. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | NSString * appDelegateClassName; 14 | @autoreleasepool { 15 | // Setup code that might create autoreleased objects goes here. 16 | appDelegateClassName = NSStringFromClass([AppDelegate class]); 17 | } 18 | return UIApplicationMain(argc, argv, nil, appDelegateClassName); 19 | } 20 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHDefines.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #ifndef BHDefines_h 10 | #define BHDefines_h 11 | 12 | 13 | #if defined(__cplusplus) 14 | #define BH_EXTERN extern "C" __attribute__((visibility("default"))) 15 | #else 16 | #define BH_EXTERN extern __attribute__((visibility("default"))) 17 | #endif 18 | 19 | #endif /* BHDefines_h */ 20 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Podfile: -------------------------------------------------------------------------------- 1 | #source 'https://cdn.cocoapods.org/' 2 | source 'https://github.com/cocoapods/Specs.git' 3 | source 'https://github.com/Minlison/Specs.git' 4 | 5 | platform :ios, '9.0' 6 | install! 'cocoapods', 7 | #deterministic_uuids: false, 8 | #disable_input_output_paths: true, 9 | #generate_multiple_pod_projects: true, 10 | #incremental_installation: true 11 | 12 | use_frameworks! 13 | inhibit_all_warnings! 14 | 15 | target 'MLSModuleCenterDemo' do 16 | # Comment the next line if you don't want to use dynamic frameworks 17 | use_frameworks! 18 | 19 | # Pods for MLSModuleCenterDemo 20 | pod 'MLSModuleCenter', :path => '../' 21 | end 22 | -------------------------------------------------------------------------------- /Classes/Tools/MLSGenerateRouteHeaderTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSGenerateRouteHeaderTool.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/2/26. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface MLSGenerateRouteHeaderTool : NSObject 13 | /** 14 | 生成路由参数列表文件 15 | 默认某块名为 bundleID 的最后一部分大写 16 | @param dir 输出路径 17 | */ 18 | + (void)generateRoutesHeaderToDir:(NSString *)dir; 19 | 20 | /** 21 | 生成路由参数头文件 22 | 23 | @param dir 路径 24 | @param headerName 头文件名 25 | */ 26 | + (void)generateRoutesHeaderToDir:(NSString *)dir headerName:(NSString *)headerName; 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /docs/html/css/scss/_print.scss: -------------------------------------------------------------------------------- 1 | @media print { 2 | body { 3 | background: #fff; 4 | padding: 8px; 5 | } 6 | 7 | header { 8 | position: static; 9 | background: #fff; 10 | color: #000; 11 | } 12 | 13 | aside { 14 | display: none; 15 | } 16 | 17 | .container { 18 | max-width: none; 19 | padding: 0; 20 | } 21 | 22 | article { 23 | margin-top: 0; 24 | 25 | #content { 26 | border: 0; 27 | background: #fff; 28 | padding: 15px 0 0 0; 29 | 30 | .title { 31 | margin-top: 0; 32 | padding-top: 0; 33 | } 34 | } 35 | } 36 | 37 | .method-info { 38 | &, & .pointy-thing { 39 | background: #fff; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHWatchItem.md: -------------------------------------------------------------------------------- 1 | # BHWatchItem Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHAppDelegate.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [  userInfo](#//api/name/userInfo) *property* 11 | 12 | [  replyHandler](#//api/name/replyHandler) *property* 13 | 14 | ## Properties 15 | 16 | 17 | ### replyHandler 18 | 19 | `@property (nonatomic, copy) BHWatchReplyHandler replyHandler` 20 | 21 | 22 | ### userInfo 23 | 24 | `@property (nonatomic, strong) NSDictionary *userInfo` 25 | 26 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHBackgroundItem.md: -------------------------------------------------------------------------------- 1 | # BHBackgroundItem Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHAppDelegate.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [  handler](#//api/name/handler) *property* 11 | 12 | [  sessionIdentifier](#//api/name/sessionIdentifier) *property* 13 | 14 | ## Properties 15 | 16 | 17 | ### handler 18 | 19 | `@property (nonatomic, copy) BHBackgroundHandler handler` 20 | 21 | 22 | ### sessionIdentifier 23 | 24 | `@property (nonatomic, copy) NSString *sessionIdentifier` 25 | 26 | -------------------------------------------------------------------------------- /Classes/Route/Core/MLSRoutes/MLSParsingUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSParsingUtilities.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | 15 | @interface MLSParsingUtilities : NSObject 16 | 17 | + (NSString *)variableValueFrom:(NSString *)value decodePlusSymbols:(BOOL)decodePlusSymbols; 18 | 19 | + (NSDictionary *)queryParams:(NSDictionary *)queryParams decodePlusSymbols:(BOOL)decodePlusSymbols; 20 | 21 | + (NSArray *)expandOptionalRoutePatternsForPattern:(NSString *)routePattern; 22 | 23 | @end 24 | 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHShortcutItem.md: -------------------------------------------------------------------------------- 1 | # BHShortcutItem Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHAppDelegate.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [  )](#//api/name/)) *property* 11 | 12 | [  scompletionHandler](#//api/name/scompletionHandler) *property* 13 | 14 | ## Properties 15 | 16 | 17 | ### ) 18 | 19 | `@property (nonatomic, strong) UIApplicationShortcutItem *NS_AVAILABLE_IOS ( 9.0 )` 20 | 21 | 22 | ### scompletionHandler 23 | 24 | `@property (nonatomic, copy) BHShortcutCompletionHandler scompletionHandler` 25 | 26 | -------------------------------------------------------------------------------- /docs/markdown/Protocols/MLSServiceProtocol.md: -------------------------------------------------------------------------------- 1 | # MLSServiceProtocol Protocol Reference 2 | 3 |   **Conforms to** BHServiceProtocol
4 | NSObject 5 |   **Declared in** MLSServiceProtocol.h 6 | 7 | ## Tasks 8 | 9 | ### 10 | 11 | [– getController](#//api/name/getController) *required method* 12 | 13 | 14 | ## Instance Methods 15 | 16 | 17 | ### getController 18 | 19 | 获取控制器 20 | 21 | `- (nullable __kindof UIViewController *)getController` 22 | 23 | #### Return Value 24 | 控制器 25 | 26 | #### Declared In 27 | * `MLSServiceProtocol.h` 28 | 29 | -------------------------------------------------------------------------------- /docs/markdown/Categories/NSDictionary+RouterParams.md: -------------------------------------------------------------------------------- 1 | # NSDictionary(RouterParams) Category Reference 2 | 3 |   **Declared in** NSDictionary+MLSRouter.h 4 | 5 | ## Tasks 6 | 7 | ### 8 | 9 | [– routerParams](#//api/name/routerParams) 10 | 11 | 12 | ## Instance Methods 13 | 14 | 15 | ### routerParams 16 | 17 | 创建 router 的参数 18 | @{ 19 | @“name” : @“a”, 20 | @“age” : @(10) 21 | } 22 | 23 | `- (NSString *)routerParams` 24 | 25 | #### Return Value 26 | 字符串参数 27 | 28 | #### Discussion 29 | return @“name=a&age=10” 30 | 31 | #### Declared In 32 | * `NSDictionary+MLSRouter.h` 33 | 34 | -------------------------------------------------------------------------------- /Classes/Moudle/MLSBaseModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSModule.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "BHModuleProtocol.h" 11 | 12 | /** 13 | * 基类 Module 14 | * 每创建一个模块时, 需要继承该类, 并在Module 头文件中, 引入该模块的所有暴露的头文件 15 | * 可以使用 MOUDLE_EXPORT(NO) 是否异步加载 Module (该方法是在 +load 方法内调用, 需要写到 @implementation 和 @end 之间) 16 | * 也可以使用 @BeeHiveMod(BaseModule) 来注册 Moudlle (该方法是在应用启动前, 加载符号文件时候调用) 17 | */ 18 | #define MLS_MOUDLE_REGISTER(moudle_imp) BeeHiveMod(moudle_imp) 19 | 20 | #define MLS_MOUDLE_EXPORT(async) BH_EXPORT_MODULE(async) 21 | @interface MLSModule : NSObject 22 | 23 | @end 24 | 25 | @interface MLSBaseModule : MLSModule 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MLSModuleCenter (1.0.0): 3 | - MLSModuleCenter/Header (= 1.0.0) 4 | - MLSModuleCenter/Moudle (= 1.0.0) 5 | - MLSModuleCenter/Route (= 1.0.0) 6 | - MLSModuleCenter/Tools (= 1.0.0) 7 | - MLSModuleCenter/Header (1.0.0) 8 | - MLSModuleCenter/Moudle (1.0.0): 9 | - MLSModuleCenter/Route 10 | - MLSModuleCenter/Route (1.0.0): 11 | - MLSModuleCenter/Header 12 | - MLSModuleCenter/Tools (1.0.0): 13 | - MLSModuleCenter/Moudle 14 | 15 | DEPENDENCIES: 16 | - MLSModuleCenter (from `../`) 17 | 18 | EXTERNAL SOURCES: 19 | MLSModuleCenter: 20 | :path: "../" 21 | 22 | SPEC CHECKSUMS: 23 | MLSModuleCenter: 4fd0d741e06cb785b0180bf74e6ff0181a9b336a 24 | 25 | PODFILE CHECKSUM: 8698d5192c307d0a55fcdb36f47565cb8f524215 26 | 27 | COCOAPODS: 1.7.5 28 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MLSModuleCenter (1.0.0): 3 | - MLSModuleCenter/Header (= 1.0.0) 4 | - MLSModuleCenter/Moudle (= 1.0.0) 5 | - MLSModuleCenter/Route (= 1.0.0) 6 | - MLSModuleCenter/Tools (= 1.0.0) 7 | - MLSModuleCenter/Header (1.0.0) 8 | - MLSModuleCenter/Moudle (1.0.0): 9 | - MLSModuleCenter/Route 10 | - MLSModuleCenter/Route (1.0.0): 11 | - MLSModuleCenter/Header 12 | - MLSModuleCenter/Tools (1.0.0): 13 | - MLSModuleCenter/Moudle 14 | 15 | DEPENDENCIES: 16 | - MLSModuleCenter (from `../`) 17 | 18 | EXTERNAL SOURCES: 19 | MLSModuleCenter: 20 | :path: "../" 21 | 22 | SPEC CHECKSUMS: 23 | MLSModuleCenter: 4fd0d741e06cb785b0180bf74e6ff0181a9b336a 24 | 25 | PODFILE CHECKSUM: 8698d5192c307d0a55fcdb36f47565cb8f524215 26 | 27 | COCOAPODS: 1.7.5 28 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 MLSModuleCenterToolsEnable=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter/MLSModuleCenter.framework/Headers" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter/MLSModuleCenter.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "MLSModuleCenter" 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 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 MLSModuleCenterToolsEnable=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter/MLSModuleCenter.framework/Headers" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter/MLSModuleCenter.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/MLSModuleCenter" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "MLSModuleCenter" 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 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Header/MLSRouteHeader.h: -------------------------------------------------------------------------------- 1 | // MLS Auto Create 2 | // Not Modify 3 | // Date: 2019-12-06 05:35:34 +0000 4 | 5 | #import 6 | 7 | 8 | #ifndef MLSRouteHeader_h 9 | #define MLSRouteHeader_h 10 | 11 | 12 | 13 | @interface NSURL (MLSTestDefaultViewController_Routes) 14 | 15 | // 目标控制器 test 16 | // urlPatten /test/default 17 | // 快速创建url 18 | + (NSURL *)URLForRouteTestDefault; 19 | 20 | @end 21 | 22 | @interface NSURL (MLSTestPathParamsViewController_Routes) 23 | 24 | // 目标控制器 testPath 25 | // urlPatten /testPath/default/:type 26 | // 快速创建url 27 | + (NSURL *)URLForRouteTestPathDefaultType:(NSString *)type; 28 | 29 | @end 30 | 31 | @interface NSURL (MLSTestSchemeViewController_Routes) 32 | 33 | // 目标控制器 testPath 34 | // urlPatten /testPath/scheme 35 | // 快速创建url 36 | + (NSURL *)URLForRouteTestPathScheme; 37 | 38 | @end 39 | 40 | #endif // MLS_h 41 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/Route/MLSTestDefaultViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestDefaultViewController.m 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/3/1. 6 | // Copyright © 2019 MinLison. All rights reserved. 7 | // 8 | 9 | #import "MLSTestDefaultViewController.h" 10 | #import 11 | @interface MLSTestDefaultViewController () 12 | 13 | @end 14 | 15 | @MLSRouteRegisterDefaultScheme(identifier, MLSTestDefaultViewController, "/test/default") 16 | @implementation MLSTestDefaultViewController 17 | + (UIViewController *)targetControllerWithParams:(NSDictionary *)parameters { 18 | MLSTestDefaultViewController *v = [[self alloc] init]; 19 | v.view.backgroundColor = [UIColor blueColor]; 20 | return v; 21 | } 22 | - (void)dealloc 23 | { 24 | NSLog(@"dealloc %@",NSStringFromClass(self.class)); 25 | } 26 | @end 27 | -------------------------------------------------------------------------------- /docs/markdown/Protocols/MLSRouteDefinitionTargetController.md: -------------------------------------------------------------------------------- 1 | # MLSRouteDefinitionTargetController Protocol Reference 2 | 3 |   **Conforms to** NSObject 4 |   **Declared in** MLSRouteDefinition.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [+ targetControllerWithParams:](#//api/name/targetControllerWithParams:) *required method* 11 | 12 | 13 | ## Class Methods 14 | 15 | 16 | ### targetControllerWithParams: 17 | 18 | 创建控制器 19 | 20 | `+ (nullable UIViewController<MLSRouteDefinitionTargetController> *)targetControllerWithParams:(nullable NSDictionary *)*parameters*` 21 | 22 | #### Parameters 23 | 24 | *parameters* 25 |    参数 26 | 27 | #### Return Value 28 | 控制器(如果为空, 则不能 handleUrl) 29 | 30 | #### Declared In 31 | * `MLSRouteDefinition.h` 32 | 33 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHTimeProfiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface BHTimeProfiler : NSObject 12 | 13 | #pragma mark - Open API 14 | 15 | #define kTimeProfilerResultNotificationName @"BHTimeProfilerResult" 16 | #define kNotificationUserInfoKey @"logArray" 17 | 18 | + (BHTimeProfiler *)sharedTimeProfiler; 19 | 20 | - (instancetype)initTimeProfilerWithMainKey:(NSString *)mainKey; 21 | - (void)recordEventTime:(NSString *)eventName; 22 | 23 | - (void)printOutTimeProfileResult; 24 | - (void)saveTimeProfileDataIntoFile:(NSString *)filePath; 25 | - (void)postTimeProfileResultNotification; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHWatchDog.md: -------------------------------------------------------------------------------- 1 | # BHWatchDog Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHWatchDog.h 5 | 6 | ## Overview 7 | 8 | Created by BeeHive. 9 | Copyright © 2016, Alibaba, Inc. All rights reserved. 10 | 11 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 12 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 13 | 14 | ## Tasks 15 | 16 | ### 17 | 18 | [– initWithThreshold:strictMode:](#//api/name/initWithThreshold:strictMode:) 19 | 20 | 21 | ## Instance Methods 22 | 23 | 24 | ### initWithThreshold:strictMode: 25 | 26 | `- (instancetype)initWithThreshold:(double)*threshold* strictMode:(BOOL)*strictMode*` 27 | 28 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/MLSTestMoudle.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestMoudle.m 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/3/1. 6 | // Copyright © 2019 MinLison. All rights reserved. 7 | // 8 | 9 | #import "MLSTestMoudle.h" 10 | 11 | /** 12 | 模块: 13 | 该类的作用,主要是能够接收到 AppDelegate 中的方法,BeeHive中有实现 14 | 如果主工程的AppDelegate没有继承 MLSAppDelegate, 请在 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | 方法中添加下面两句代码 17 | [[BHModuleManager sharedManager] triggerEvent:BHMSetupEvent]; 18 | [[BHModuleManager sharedManager] triggerEvent:BHMInitEvent]; 19 | 这样只执行 modSetUp 和 modInit 两个初试化方法,其余方法不监听 20 | 使用宏定义 MLS_MOUDLE_REGISTER 注册模块 21 | */ 22 | 23 | @MLS_MOUDLE_REGISTER(MLSTestMoudle) 24 | @implementation MLSTestMoudle 25 | - (void)modSetUp:(BHContext *)context { 26 | /// 在此处可做一些模块设置的操作,比如模块网络层配置等 27 | 28 | } 29 | - (void)modInit:(BHContext *)context { 30 | 31 | } 32 | @end 33 | -------------------------------------------------------------------------------- /docs/markdown/Protocols/BHServiceProtocol.md: -------------------------------------------------------------------------------- 1 | # BHServiceProtocol Protocol Reference 2 | 3 |   **Conforms to** NSObject 4 |   **Declared in** BHServiceProtocol.h 5 | 6 | ## Overview 7 | 8 | Created by BeeHive. 9 | Copyright © 2016, Alibaba, Inc. All rights reserved. 10 | 11 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 12 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 13 | 14 | ## Tasks 15 | 16 | ### 17 | 18 | [+ singleton](#//api/name/singleton) 19 | 20 | [+ shareInstance](#//api/name/shareInstance) 21 | 22 | 23 | ## Class Methods 24 | 25 | 26 | ### shareInstance 27 | 28 | `+ (id)shareInstance` 29 | 30 | 31 | ### singleton 32 | 33 | `+ (BOOL)singleton` 34 | 35 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/MLSModuleCenter/MLSModuleCenter-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 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo-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 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/Route/MLSTestPathParamsViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestPathParamsViewController.m 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/3/1. 6 | // Copyright © 2019 MinLison. All rights reserved. 7 | // 8 | 9 | #import "MLSTestPathParamsViewController.h" 10 | #import 11 | @interface MLSTestPathParamsViewController () 12 | 13 | @end 14 | 15 | @MLSRouteRegisterDefaultScheme(identifier, MLSTestPathParamsViewController, "/testPath/default/:type") 16 | @implementation MLSTestPathParamsViewController 17 | 18 | + (UIViewController *)targetControllerWithParams:(NSDictionary *)parameters { 19 | MLSTestPathParamsViewController *v = [[self alloc] init]; 20 | if ([[parameters objectForKey:@"type"] isEqualToString:@"red"]) { 21 | v.view.backgroundColor = [UIColor redColor]; 22 | } 23 | return v; 24 | } 25 | - (void)dealloc 26 | { 27 | NSLog(@"dealloc %@",NSStringFromClass(self.class)); 28 | } 29 | @end 30 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHServiceManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @class BHContext; 12 | 13 | @interface BHServiceManager : NSObject 14 | 15 | @property (nonatomic, assign) BOOL enableException; 16 | 17 | + (instancetype)sharedManager; 18 | 19 | - (void)registerLocalServices; 20 | 21 | - (void)registerService:(Protocol *)service implClass:(Class)implClass; 22 | 23 | - (id)createService:(Protocol *)service; 24 | - (id)createService:(Protocol *)service withServiceName:(NSString *)serviceName; 25 | - (id)createService:(Protocol *)service withServiceName:(NSString *)serviceName shouldCache:(BOOL)shouldCache; 26 | 27 | - (id)getServiceInstanceFromServiceName:(NSString *)serviceName; 28 | - (void)removeServiceWithServiceName:(NSString *)serviceName; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BeeHive.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "BHModuleProtocol.h" 11 | #import "BHContext.h" 12 | #import "BHAppDelegate.h" 13 | #import "BHModuleManager.h" 14 | #import "BHServiceManager.h" 15 | 16 | @interface BeeHive : NSObject 17 | 18 | //save application global context 19 | @property(nonatomic, strong) BHContext *context; 20 | 21 | @property (nonatomic, assign) BOOL enableException; 22 | 23 | + (instancetype)shareInstance; 24 | 25 | + (void)registerDynamicModule:(Class) moduleClass; 26 | 27 | - (id)createService:(Protocol *)proto; 28 | 29 | //Registration is recommended to use a static way 30 | - (void)registerService:(Protocol *)proto service:(Class) serviceClass; 31 | 32 | + (void)triggerCustomEvent:(NSInteger)eventType; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Classes/Moudle/Protocol/MLSServiceProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseServiceProtocol.h 3 | // MinLison 4 | // 5 | // Created by MinLison on 2017/8/31. 6 | // Copyright © 2017年 minlison. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "BHServiceProtocol.h" 11 | /* 12 | // MyProtocol.h 13 | @protocol MyProtocol 14 | @required 15 | - (void)someRequiredMethod; 16 | 17 | @optional 18 | - (void)someOptionalMethod; 19 | 20 | @concrete 21 | - (BOOL)isConcrete; 22 | 23 | @end 24 | 25 | // MyProtocol.m 26 | @concreteprotocol(MyProtocol) 27 | 28 | - (BOOL)isConcrete { 29 | return YES; 30 | } 31 | 32 | // this will not actually get added to conforming classes, since they are 33 | // required to have their own implementation 34 | - (void)someRequiredMethod {} 35 | 36 | @end 37 | 38 | */ 39 | 40 | NS_ASSUME_NONNULL_BEGIN 41 | 42 | @protocol MLSServiceProtocol 43 | 44 | /** 45 | 获取控制器 46 | 47 | @return 控制器 48 | */ 49 | - (nullable __kindof UIViewController *)getController; 50 | @end 51 | 52 | NS_ASSUME_NONNULL_END 53 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHOpenURLItem.md: -------------------------------------------------------------------------------- 1 | # BHOpenURLItem Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHAppDelegate.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [  openURL](#//api/name/openURL) *property* 11 | 12 | [  sourceApplication](#//api/name/sourceApplication) *property* 13 | 14 | [  annotation](#//api/name/annotation) *property* 15 | 16 | [  options](#//api/name/options) *property* 17 | 18 | ## Properties 19 | 20 | 21 | ### annotation 22 | 23 | `@property (nonatomic, strong) id annotation` 24 | 25 | 26 | ### openURL 27 | 28 | `@property (nonatomic, strong) NSURL *openURL` 29 | 30 | 31 | ### options 32 | 33 | `@property (nonatomic, strong) NSDictionary *options` 34 | 35 | 36 | ### sourceApplication 37 | 38 | `@property (nonatomic, copy) NSString *sourceApplication` 39 | 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Minlison 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Classes/Route/Core/MLSRoutes/MLSRouteResponse.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSRouteResponse.m 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | #import "MLSRouteResponse.h" 10 | 11 | 12 | @interface MLSRouteResponse () 13 | 14 | @property (nonatomic, assign, getter=isMatch) BOOL match; 15 | @property (nonatomic, strong) NSDictionary *parameters; 16 | 17 | @end 18 | 19 | 20 | @implementation MLSRouteResponse 21 | 22 | + (instancetype)invalidMatchResponse 23 | { 24 | MLSRouteResponse *response = [[[self class] alloc] init]; 25 | response.match = NO; 26 | return response; 27 | } 28 | 29 | + (instancetype)validMatchResponseWithParameters:(NSDictionary *)parameters 30 | { 31 | MLSRouteResponse *response = [[[self class] alloc] init]; 32 | response.match = YES; 33 | response.parameters = parameters; 34 | return response; 35 | } 36 | 37 | - (NSString *)description 38 | { 39 | return [NSString stringWithFormat:@"<%@ %p> - match: %@, params: %@", NSStringFromClass([self class]), self, (self.match ? @"YES" : @"NO"), self.parameters]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHConfig.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | @interface BHConfig : NSObject 12 | 13 | + (instancetype)shareInstance; 14 | 15 | + (id)get:(NSString *)key; 16 | 17 | + (BOOL)has:(NSString *)key; 18 | 19 | + (void)add:(NSDictionary *)parameters; 20 | 21 | + (NSMutableDictionary *)getAll; 22 | 23 | + (NSString *)stringValue:(NSString *)key; 24 | 25 | + (NSDictionary *)dictionaryValue:(NSString *)key; 26 | 27 | + (NSInteger)integerValue:(NSString *)key; 28 | 29 | + (float)floatValue:(NSString *)key; 30 | 31 | + (BOOL)boolValue:(NSString *)key; 32 | 33 | + (NSArray *)arrayValue:(NSString *)key; 34 | 35 | + (void)set:(NSString *)key value:(id)value; 36 | 37 | + (void)set:(NSString *)key boolValue:(BOOL)value; 38 | 39 | + (void)set:(NSString *)key integerValue:(NSInteger)value; 40 | 41 | + (void)clear; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHUserActivityItem.md: -------------------------------------------------------------------------------- 1 | # BHUserActivityItem Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHAppDelegate.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [  userActivityType](#//api/name/userActivityType) *property* 11 | 12 | [  userActivity](#//api/name/userActivity) *property* 13 | 14 | [  userActivityError](#//api/name/userActivityError) *property* 15 | 16 | [  restorationHandler](#//api/name/restorationHandler) *property* 17 | 18 | ## Properties 19 | 20 | 21 | ### restorationHandler 22 | 23 | `@property (nonatomic, copy) BHUserActivityRestorationHandler restorationHandler` 24 | 25 | 26 | ### userActivity 27 | 28 | `@property (nonatomic, strong) NSUserActivity *userActivity` 29 | 30 | 31 | ### userActivityError 32 | 33 | `@property (nonatomic, strong) NSError *userActivityError` 34 | 35 | 36 | ### userActivityType 37 | 38 | `@property (nonatomic, copy) NSString *userActivityType` 39 | 40 | -------------------------------------------------------------------------------- /docs/markdown/Constants/BHModuleLevel.md: -------------------------------------------------------------------------------- 1 | # BHModuleLevel Constants Reference 2 | 3 |   **Declared in** BHModuleManager.h 4 | 5 | ### BHModuleLevel 6 | 7 | Created by BeeHive. 8 | Copyright © 2016, Alibaba, Inc. All rights reserved. 9 | 10 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 11 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 12 | 13 | #### Definition 14 | typedef NS_ENUM(NSUInteger, BHModuleLevel ) { 15 | 16 | BHModuleBasic = 0, 17 | 18 | BHModuleNormal = 1, 19 | 20 | }; 21 | 22 | #### Constants 23 | 24 | BHModuleBasic 25 | 26 | Created by BeeHive. 27 | Copyright © 2016, Alibaba, Inc. All rights reserved. 28 | 29 |    Declared In `BHModuleManager.h`. 30 | 31 | BHModuleNormal 32 | 33 | Created by BeeHive. 34 | Copyright © 2016, Alibaba, Inc. All rights reserved. 35 | 36 |    Declared In `BHModuleManager.h`. 37 | 38 | #### Declared In 39 | `BHModuleManager.h` 40 | 41 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Moudles/Route/MLSTestSchemeViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSTestSchemeViewController.m 3 | // MLSModuleCenterDemo 4 | // 5 | // Created by yuanhang on 2019/10/9. 6 | // Copyright © 2019 minlison. All rights reserved. 7 | // 8 | 9 | #import "MLSTestSchemeViewController.h" 10 | #import 11 | @interface MLSTestSchemeViewController () 12 | 13 | @end 14 | #define mls_custom_scheme 15 | @MLSRouteRegister(tt_b, MLSTestSchemeViewController, mls_custom_scheme, 1, "/testPath/scheme", "routeParams") 16 | @implementation MLSTestSchemeViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | } 22 | 23 | + (void)routeParams:(NSDictionary *)routeParams { 24 | 25 | } 26 | /* 27 | #pragma mark - Navigation 28 | 29 | // In a storyboard-based application, you will often want to do a little preparation before navigation 30 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 31 | // Get the new view controller using [segue destinationViewController]. 32 | // Pass the selected object to the new view controller. 33 | } 34 | */ 35 | - (void)dealloc 36 | { 37 | NSLog(@"dealloc %@",NSStringFromClass(self.class)); 38 | } 39 | @end 40 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/MLSModuleCenter/MLSModuleCenter-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 | #import "MLSModuleCenter.h" 14 | #import "BeeHive.h" 15 | #import "BHAnnotation.h" 16 | #import "BHAppDelegate.h" 17 | #import "BHCommon.h" 18 | #import "BHConfig.h" 19 | #import "BHContext.h" 20 | #import "BHDefines.h" 21 | #import "BHModuleManager.h" 22 | #import "BHModuleProtocol.h" 23 | #import "BHRouter.h" 24 | #import "BHServiceManager.h" 25 | #import "BHServiceProtocol.h" 26 | #import "BHTimeProfiler.h" 27 | #import "BHWatchDog.h" 28 | #import "MLSAppDelegate.h" 29 | #import "MLSBaseModule.h" 30 | #import "MLSServiceProtocol.h" 31 | #import "NSDictionary+MLSRouter.h" 32 | #import "NSObject+MLSRouter.h" 33 | #import "UIViewController+MLSRouter.h" 34 | #import "MLSParsingUtilities.h" 35 | #import "MLSRouteDefinition.h" 36 | #import "MLSRouteRequest.h" 37 | #import "MLSRouteResponse.h" 38 | #import "MLSRoutes.h" 39 | #import "MLSRouteControlProtocol.h" 40 | #import "MLSGenerateRouteHeaderTool.h" 41 | 42 | FOUNDATION_EXPORT double MLSModuleCenterVersionNumber; 43 | FOUNDATION_EXPORT const unsigned char MLSModuleCenterVersionString[]; 44 | 45 | -------------------------------------------------------------------------------- /docs/markdown/Classes/MLSGenerateRouteHeaderTool.md: -------------------------------------------------------------------------------- 1 | # MLSGenerateRouteHeaderTool Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** MLSGenerateRouteHeaderTool.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [+ generateRoutesHeaderToDir:](#//api/name/generateRoutesHeaderToDir:) 11 | 12 | [+ generateRoutesHeaderToDir:moudleName:](#//api/name/generateRoutesHeaderToDir:moudleName:) 13 | 14 | 15 | ## Class Methods 16 | 17 | 18 | ### generateRoutesHeaderToDir: 19 | 20 | 生成路由参数列表文件 21 | 默认某块名为 bundleID 的最后一部分大写 22 | 23 | `+ (void)generateRoutesHeaderToDir:(NSString *)*dir*` 24 | 25 | #### Parameters 26 | 27 | *dir* 28 |    输出路径 29 | 30 | #### Declared In 31 | * `MLSGenerateRouteHeaderTool.h` 32 | 33 | 34 | ### generateRoutesHeaderToDir:moudleName: 35 | 36 | 生成路由参数头文件 37 | 38 | `+ (void)generateRoutesHeaderToDir:(NSString *)*dir* moudleName:(NSString *)*moudleName*` 39 | 40 | #### Parameters 41 | 42 | *dir* 43 |    路径 44 | 45 | *moudleName* 46 |    模块名 47 | 48 | #### Declared In 49 | * `MLSGenerateRouteHeaderTool.h` 50 | 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MLSModuleCenter 模块化中心 2 | --- 3 | 4 | ![License MIT](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000) 5 | 6 | ## MLSModuleCenter 是什么 7 | 8 | MLSModuleCenter 是 App 模块化一体式解决方案中心,基于阿里巴巴 [BeeHive](https://github.com/alibaba/BeeHive) 模块加载, [JLRoutes](https://github.com/joeldev/JLRoutes) 路由跳转达到模块解耦。 9 | 10 | ## MLSModuleCenter 提供了哪些功能 11 | * 基于 BeeHive 二次修改,集成 JLRoutes 路由系统 12 | * 使用 MLSGenerateRouteHeaderTool 自动生成 NSURL 分类路由头文件。 13 | 14 | ## 哪些项目适合使用 MLSModuleCenter 15 | * MLSModuleCenter 适用于大型项目,使用 Cocoapods 进行模块集成更为优雅 16 | * 小型项目不建议使用,会造成过多资源浪费。 17 | 18 | ## MLSModuleCenter 基本思想 19 | * 封装业务模块,业务系统依赖基础Kit,独立业务系统,各业务系统之间的调用只暴露URL参数,提高业务系统的复用性。 20 | * 独立研发开发,单个业务模块可独立测试。 21 | 22 | ## MLSModuleCenter 安装 23 | 你可以在 Podfile 最上方增加source源, 24 | 25 | source 'https://github.com/Minlison/Specs.git' 26 | 27 | 加入下面一行代码来使用 MLSModuleCenter 28 | 29 | pod 'MLSModuleCenter' 30 | 31 | 或者直接使用源码依赖 32 | 33 | ## 安装要求 34 | 35 | | MLSModuleCenter 版本 | 最低 iOS Target | 注意 | 36 | |:----------------:|:----------------:|:-----| 37 | | 1.x | iOS 8 | 要求 Xcode 8 以上 | 38 | 39 | 40 | ## 相关的使用教程和 Demo 41 | 可参考项目中的Demo项目 42 | 43 | ## 作者 44 | MLSNetwork 属于个人研发 45 | 46 | ## 感谢 47 | 48 | MLSModuleCenter 基于 [BeeHive](https://github.com/alibaba/BeeHive) [JLRoutes](https://github.com/joeldev/JLRoutes) 进行开发,感谢他们对开源社区做出的贡献。 49 | 50 | ## 协议 51 | 52 | MLSModuleCenter 被许可在 MIT 协议下使用。查阅 LICENSE 文件来获得更多信息。 -------------------------------------------------------------------------------- /docs/markdown/Classes/MLSParsingUtilities.md: -------------------------------------------------------------------------------- 1 | # MLSParsingUtilities Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** MLSParsingUtilities.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [+ variableValueFrom:decodePlusSymbols:](#//api/name/variableValueFrom:decodePlusSymbols:) 11 | 12 | [+ queryParams:decodePlusSymbols:](#//api/name/queryParams:decodePlusSymbols:) 13 | 14 | [+ expandOptionalRoutePatternsForPattern:](#//api/name/expandOptionalRoutePatternsForPattern:) 15 | 16 | 17 | ## Class Methods 18 | 19 | 20 | ### expandOptionalRoutePatternsForPattern: 21 | 22 | `+ (NSArray<NSString*> *)expandOptionalRoutePatternsForPattern:(NSString *)*routePattern*` 23 | 24 | 25 | ### queryParams:decodePlusSymbols: 26 | 27 | `+ (NSDictionary *)queryParams:(NSDictionary *)*queryParams* decodePlusSymbols:(BOOL)*decodePlusSymbols*` 28 | 29 | 30 | ### variableValueFrom:decodePlusSymbols: 31 | 32 | `+ (NSString *)variableValueFrom:(NSString *)*value* decodePlusSymbols:(BOOL)*decodePlusSymbols*` 33 | 34 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## MLSModuleCenter 5 | 6 | MIT License 7 | 8 | Copyright (c) 2019 Minlison 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Classes/Route/Core/MLSRoutes/MLSRouteResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSRouteResponse.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | 14 | /** 15 | MLSRouteResponse is the response from attempting to route a MLSRouteRequest. 16 | */ 17 | 18 | @interface MLSRouteResponse : NSObject 19 | 20 | /// Indicates if the response is a match or not. 21 | @property (nonatomic, assign, readonly, getter=isMatch) BOOL match; 22 | 23 | /// The match parameters (or nil for an invalid response). 24 | @property (nonatomic, strong, readonly, nullable) NSDictionary *parameters; 25 | 26 | 27 | ///------------------------------- 28 | /// @name Creating Responses 29 | ///------------------------------- 30 | 31 | 32 | /// Creates an invalid match response. 33 | + (instancetype)invalidMatchResponse; 34 | 35 | /// Creates a valid match response with the given parameters. 36 | + (instancetype)validMatchResponseWithParameters:(NSDictionary *)parameters; 37 | 38 | /// Unavailable, please use +invalidMatchResponse or +validMatchResponseWithParameters: instead. 39 | - (instancetype)init NS_UNAVAILABLE; 40 | 41 | /// Unavailable, please use +invalidMatchResponse or +validMatchResponseWithParameters: instead. 42 | + (instancetype)new NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Header/MLSRouteHeader.m: -------------------------------------------------------------------------------- 1 | // MLS Auto Create 2 | // Not Modify 3 | // Date: 2019-12-06 05:35:34 +0000 4 | 5 | #import "MLSRouteHeader.h" 6 | 7 | 8 | 9 | @implementation NSURL (MLSTestDefaultViewController_Routes) 10 | 11 | + (NSURL *)URLForRouteTestDefault { 12 | NSString *routeString = [NSString stringWithFormat:@"com.minlison.module://test/default"]; 13 | routeString = [routeString stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; 14 | return [NSURL URLWithString:routeString]; 15 | } 16 | @end 17 | 18 | @implementation NSURL (MLSTestPathParamsViewController_Routes) 19 | 20 | + (NSURL *)URLForRouteTestPathDefaultType:(NSString *)type { 21 | NSString *routeString = [NSString stringWithFormat:@"com.minlison.module://testPath/default/%@",type]; 22 | routeString = [routeString stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; 23 | return [NSURL URLWithString:routeString]; 24 | } 25 | @end 26 | 27 | @implementation NSURL (MLSTestSchemeViewController_Routes) 28 | 29 | + (NSURL *)URLForRouteTestPathScheme { 30 | NSString *routeString = [NSString stringWithFormat:@"mls_custom_scheme://testPath/scheme"]; 31 | routeString = [routeString stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]; 32 | return [NSURL URLWithString:routeString]; 33 | } 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /MLSModuleCenter.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = "MLSModuleCenter" 4 | s.version = "1.0.2" 5 | s.summary = "模块化中心" 6 | s.description = <<-DESC 7 | 模块化中心,分离各个模块,注册,管理各个模块 route 调用 8 | DESC 9 | 10 | s.homepage = "https://www.minlison.cn" 11 | s.license = "MIT" 12 | s.author = { "Minlison" => "yuanhang.1991@163.com" } 13 | s.platform = :ios, "8.0" 14 | s.source = { :git => "https://github.com/Minlison/MLSModuleCenter.git", :tag => "v#{s.version}" } 15 | s.documentation_url = "https://minlison.cn/article/mlsmodulecenter" 16 | s.static_framework = true 17 | # s.default_subspecs = 'Moudle' 18 | s.subspec 'Header' do |ss| 19 | ss.source_files = "Classes/*.h" 20 | ss.public_header_files = "Classes/*.h" 21 | end 22 | 23 | s.subspec 'Route' do |ss| 24 | ss.source_files = "Classes/Route/Core/**/*.{h,m}" 25 | ss.public_header_files = "Classes/Route/Core/**/*.h" 26 | ss.dependency 'MLSModuleCenter/Header' 27 | end 28 | 29 | s.subspec 'Moudle' do |ss| 30 | ss.source_files = "Classes/Moudle/**/*.{h,m}" 31 | ss.public_header_files = "Classes/Moudle/**/*.h" 32 | ss.dependency 'MLSModuleCenter/Route' 33 | end 34 | 35 | s.subspec 'Tools' do |ss| 36 | ss.source_files = "Classes/Tools/**/*.{h,m}" 37 | ss.public_header_files = "Classes/Tools/**/*.h" 38 | ss.dependency 'MLSModuleCenter/Moudle' 39 | ss.xcconfig = { 40 | 'GCC_PREPROCESSOR_DEFINITIONS' => 'MLSModuleCenterToolsEnable=1' 41 | } 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 52 | 53 | fastlane/report.xml 54 | fastlane/Preview.html 55 | fastlane/screenshots/**/*.png 56 | fastlane/test_output 57 | 58 | # Code Injection 59 | # 60 | # After new code Injection tools there's a generated folder /iOSInjectionProject 61 | # https://github.com/johnno1962/injectionforxcode 62 | 63 | iOSInjectionProject/ 64 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Local Podspecs/MLSModuleCenter.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MLSModuleCenter", 3 | "version": "1.0.0", 4 | "summary": "模块化中心", 5 | "description": "模块化中心,分离各个模块,注册,管理各个模块 route 调用", 6 | "homepage": "https://www.minlison.cn", 7 | "license": "MIT", 8 | "authors": { 9 | "Minlison": "yuanhang.1991@163.com" 10 | }, 11 | "platforms": { 12 | "ios": "8.0" 13 | }, 14 | "source": { 15 | "git": "https://github.com/Minlison/MLSModuleCenter.git", 16 | "tag": "1.0.0" 17 | }, 18 | "documentation_url": "https://minlison.cn/article/mlsmodulecenter", 19 | "static_framework": true, 20 | "subspecs": [ 21 | { 22 | "name": "Header", 23 | "source_files": "Classes/*.h", 24 | "public_header_files": "Classes/*.h" 25 | }, 26 | { 27 | "name": "Route", 28 | "source_files": "Classes/Route/Core/**/*.{h,m}", 29 | "public_header_files": "Classes/Route/Core/**/*.h", 30 | "dependencies": { 31 | "MLSModuleCenter/Header": [ 32 | 33 | ] 34 | } 35 | }, 36 | { 37 | "name": "Moudle", 38 | "source_files": "Classes/Moudle/**/*.{h,m}", 39 | "public_header_files": "Classes/Moudle/**/*.h", 40 | "dependencies": { 41 | "MLSModuleCenter/Route": [ 42 | 43 | ] 44 | } 45 | }, 46 | { 47 | "name": "Tools", 48 | "source_files": "Classes/Tools/**/*.{h,m}", 49 | "public_header_files": "Classes/Tools/**/*.h", 50 | "dependencies": { 51 | "MLSModuleCenter/Moudle": [ 52 | 53 | ] 54 | }, 55 | "xcconfig": { 56 | "GCC_PREPROCESSOR_DEFINITIONS": "MLSModuleCenterToolsEnable=1" 57 | } 58 | } 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHNotificationsItem.md: -------------------------------------------------------------------------------- 1 | # BHNotificationsItem Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHAppDelegate.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [  notificationsError](#//api/name/notificationsError) *property* 11 | 12 | [  deviceToken](#//api/name/deviceToken) *property* 13 | 14 | [  userInfo](#//api/name/userInfo) *property* 15 | 16 | [  notificationResultHander](#//api/name/notificationResultHander) *property* 17 | 18 | [  localNotification](#//api/name/localNotification) *property* 19 | 20 | [  )](#//api/name/)) *property* 21 | 22 | ## Properties 23 | 24 | 25 | ### ) 26 | 27 | `@property (nonatomic, strong) UNNotification *NS_AVAILABLE_IOS ( 10.0 )` 28 | 29 | 30 | ### deviceToken 31 | 32 | `@property (nonatomic, strong) NSData *deviceToken` 33 | 34 | 35 | ### localNotification 36 | 37 | `@property (nonatomic, strong) UILocalNotification *localNotification` 38 | 39 | 40 | ### notificationResultHander 41 | 42 | `@property (nonatomic, copy) BHNotificationResultHandler notificationResultHander` 43 | 44 | 45 | ### notificationsError 46 | 47 | `@property (nonatomic, strong) NSError *notificationsError` 48 | 49 | 50 | ### userInfo 51 | 52 | `@property (nonatomic, strong) NSDictionary *userInfo` 53 | 54 | -------------------------------------------------------------------------------- /Classes/Route/Core/MLSRoutes/MLSRouteRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSRouteRequest.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | 14 | /** 15 | MLSRouteRequest is a model representing a request to route a URL. 16 | It gets parsed into path components and query parameters, which are then used by MLSRouteDefinition to attempt a match. 17 | */ 18 | 19 | @interface MLSRouteRequest : NSObject 20 | 21 | /// The URL being routed. 22 | @property (nonatomic, strong, readonly) NSURL *URL; 23 | 24 | /// The URL's path components. 25 | @property (nonatomic, strong, readonly) NSArray *pathComponents; 26 | 27 | /// The URL's query parameters. 28 | @property (nonatomic, strong, readonly) NSDictionary *queryParams; 29 | 30 | 31 | ///------------------------------- 32 | /// @name Creating Route Requests 33 | ///------------------------------- 34 | 35 | 36 | /** 37 | Creates a new route request. 38 | 39 | @param URL The URL to route. 40 | @param alwaysTreatsHostAsPathComponent The global option for if to treat the URL host as a path component or not. 41 | 42 | @returns The newly initialized route request. 43 | */ 44 | - (instancetype)initWithURL:(NSURL *)URL alwaysTreatsHostAsPathComponent:(BOOL)alwaysTreatsHostAsPathComponent NS_DESIGNATED_INITIALIZER; 45 | 46 | /// Unavailable, use initWithURL:alwaysTreatsHostAsPathComponent: instead. 47 | - (instancetype)init NS_UNAVAILABLE; 48 | 49 | /// Unavailable, use initWithURL:alwaysTreatsHostAsPathComponent: instead. 50 | + (instancetype)new NS_UNAVAILABLE; 51 | 52 | @end 53 | 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/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 | -------------------------------------------------------------------------------- /docs/html/js/script.js: -------------------------------------------------------------------------------- 1 | function $() { 2 | return document.querySelector.apply(document, arguments); 3 | } 4 | 5 | if (navigator.userAgent.indexOf("Xcode") != -1) { 6 | document.documentElement.classList.add("xcode"); 7 | } 8 | 9 | var jumpTo = $("#jump-to"); 10 | 11 | if (jumpTo) { 12 | jumpTo.addEventListener("change", function(e) { 13 | location.hash = this.options[this.selectedIndex].value; 14 | }); 15 | } 16 | 17 | function hashChanged() { 18 | if (/^#\/\/api\//.test(location.hash)) { 19 | var element = document.querySelector("a[name='" + location.hash.substring(1) + "']"); 20 | 21 | if (!element) { 22 | return; 23 | } 24 | 25 | element = element.parentNode; 26 | 27 | element.classList.remove("hide"); 28 | fixScrollPosition(element); 29 | } 30 | } 31 | 32 | function fixScrollPosition(element) { 33 | var scrollTop = element.offsetTop - 150; 34 | document.documentElement.scrollTop = scrollTop; 35 | document.body.scrollTop = scrollTop; 36 | } 37 | 38 | [].forEach.call(document.querySelectorAll(".section-method"), function(element) { 39 | element.classList.add("hide"); 40 | 41 | element.querySelector(".method-title a").addEventListener("click", function(e) { 42 | var info = element.querySelector(".method-info"), 43 | infoContainer = element.querySelector(".method-info-container"); 44 | 45 | element.classList.add("animating"); 46 | info.style.height = (infoContainer.clientHeight + 40) + "px"; 47 | fixScrollPosition(element); 48 | element.classList.toggle("hide"); 49 | 50 | setTimeout(function() { 51 | element.classList.remove("animating"); 52 | info.style.height = "auto"; 53 | }, 300); 54 | }); 55 | }); 56 | 57 | window.addEventListener("hashchange", hashChanged); 58 | hashChanged(); 59 | -------------------------------------------------------------------------------- /docs/html/css/scss/_object.scss: -------------------------------------------------------------------------------- 1 | .section-specification { 2 | table { 3 | width: auto; 4 | 5 | th { 6 | text-align: left; 7 | } 8 | } 9 | } 10 | 11 | .method-title { 12 | margin-left: -15px; 13 | margin-bottom: 8px; 14 | transition: margin-left .3s ease-out; 15 | 16 | .section-method.hide & { 17 | margin-left: 0; 18 | } 19 | 20 | code { 21 | font-weight: 400; 22 | font-size: .85em; 23 | } 24 | } 25 | 26 | .method-info { 27 | background: $object-background; 28 | border-bottom: 1px solid $object-border; 29 | margin: 0 -25px; 30 | padding: 20px 25px 0 25px; 31 | transition: height .3s ease-out; 32 | 33 | position: relative; 34 | 35 | .pointy-thing { 36 | background: $content-background; 37 | height: 10px; 38 | border-bottom: 1px solid $object-border; 39 | margin: -20px -25px 16px -25px; 40 | 41 | &:before { 42 | display: inline-block; 43 | content: ""; 44 | 45 | background: $object-background; 46 | border: 1px solid $object-border; 47 | border-bottom: 0; 48 | border-right: 0; 49 | 50 | position: absolute; 51 | left: 21px; 52 | top: 3px; 53 | width: 12px; 54 | height: 12px; 55 | transform: rotate(45deg); 56 | } 57 | } 58 | 59 | .method-subsection { 60 | margin-bottom: 15px; 61 | 62 | .argument-name { 63 | width: 1px; 64 | text-align: right; 65 | 66 | code { 67 | color: #808080; 68 | font-style: italic; 69 | font-weight: 400; 70 | } 71 | } 72 | } 73 | } 74 | 75 | .section-method { 76 | &.hide .method-info { 77 | height: 0 !important; 78 | overflow: hidden; 79 | display: none; 80 | } 81 | 82 | &.hide.animating .method-info { 83 | display: block; 84 | } 85 | 86 | &.animating .method-info { 87 | overflow: hidden; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/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 | -------------------------------------------------------------------------------- /Classes/Moudle/MLSBaseModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLSModule.m 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2018/5/7. 6 | // Copyright © 2018年 MinLison. All rights reserved. 7 | // 8 | 9 | #import "MLSBaseModule.h" 10 | 11 | @implementation MLSModule 12 | 13 | - (void)modSetUp:(BHContext *)context{} 14 | 15 | - (void)modInit:(BHContext *)context{} 16 | 17 | - (void)modSplash:(BHContext *)context{} 18 | 19 | - (void)modQuickAction:(BHContext *)context{} 20 | 21 | - (void)modTearDown:(BHContext *)context{} 22 | 23 | - (void)modWillResignActive:(BHContext *)context{} 24 | 25 | - (void)modDidEnterBackground:(BHContext *)context{} 26 | 27 | - (void)modWillEnterForeground:(BHContext *)context{} 28 | 29 | - (void)modDidBecomeActive:(BHContext *)context{} 30 | 31 | - (void)modWillTerminate:(BHContext *)context{} 32 | 33 | - (void)modUnmount:(BHContext *)context{} 34 | 35 | - (void)modOpenURL:(BHContext *)context{} 36 | 37 | - (void)modDidReceiveMemoryWaring:(BHContext *)context{} 38 | 39 | - (void)modDidFailToRegisterForRemoteNotifications:(BHContext *)context{} 40 | 41 | - (void)modDidRegisterForRemoteNotifications:(BHContext *)context{} 42 | 43 | - (void)modDidReceiveRemoteNotification:(BHContext *)context{} 44 | 45 | - (void)modDidReceiveLocalNotification:(BHContext *)context{} 46 | 47 | - (void)modWillPresentNotification:(BHContext *)context{} 48 | 49 | - (void)modDidReceiveNotificationResponse:(BHContext *)context{} 50 | 51 | - (void)modWillContinueUserActivity:(BHContext *)context{} 52 | 53 | - (void)modContinueUserActivity:(BHContext *)context{} 54 | 55 | - (void)modDidFailToContinueUserActivity:(BHContext *)context{} 56 | 57 | - (void)modDidUpdateContinueUserActivity:(BHContext *)context{} 58 | 59 | - (void)modDidHandleBackSectionTask:(BHContext *)context {} 60 | 61 | - (void)modDidCustomEvent:(BHContext *)context{} 62 | 63 | - (void)modHandleBackgroundSession:(BHContext *)context {} 64 | @end 65 | 66 | @implementation MLSBaseModule 67 | @end 68 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BeeHive.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "BeeHive.h" 10 | 11 | @implementation BeeHive 12 | 13 | #pragma mark - public 14 | 15 | + (instancetype)shareInstance 16 | { 17 | static dispatch_once_t p; 18 | static id BHInstance = nil; 19 | 20 | dispatch_once(&p, ^{ 21 | BHInstance = [[self alloc] init]; 22 | }); 23 | 24 | return BHInstance; 25 | } 26 | 27 | + (void)registerDynamicModule:(Class)moduleClass 28 | { 29 | [[BHModuleManager sharedManager] registerDynamicModule:moduleClass]; 30 | } 31 | 32 | - (id)createService:(Protocol *)proto; 33 | { 34 | return [[BHServiceManager sharedManager] createService:proto]; 35 | } 36 | 37 | - (void)registerService:(Protocol *)proto service:(Class) serviceClass 38 | { 39 | [[BHServiceManager sharedManager] registerService:proto implClass:serviceClass]; 40 | } 41 | 42 | + (void)triggerCustomEvent:(NSInteger)eventType 43 | { 44 | if(eventType < 1000) { 45 | return; 46 | } 47 | 48 | [[BHModuleManager sharedManager] triggerEvent:eventType]; 49 | } 50 | 51 | #pragma mark - Private 52 | 53 | -(void)setContext:(BHContext *)context 54 | { 55 | _context = context; 56 | 57 | static dispatch_once_t onceToken; 58 | dispatch_once(&onceToken, ^{ 59 | [self loadStaticServices]; 60 | [self loadStaticModules]; 61 | }); 62 | } 63 | 64 | 65 | - (void)loadStaticModules 66 | { 67 | 68 | [[BHModuleManager sharedManager] loadLocalModules]; 69 | 70 | [[BHModuleManager sharedManager] registedAllModules]; 71 | 72 | } 73 | 74 | -(void)loadStaticServices 75 | { 76 | [BHServiceManager sharedManager].enableException = self.enableException; 77 | 78 | [[BHServiceManager sharedManager] registerLocalServices]; 79 | 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/Assets.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 | } -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MLSModuleCenterDemo 4 | // 5 | // Created by yuanhang on 2019/10/9. 6 | // Copyright © 2019 minlison. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | #import "MLSRouteHeader.h" 12 | #import 13 | 14 | @interface ViewController () 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | self.view.backgroundColor = UIColor.darkGrayColor; 23 | UIButton *testDefaultBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, 200, 200, 50)]; 24 | [testDefaultBtn setTitle:@"测试默认路由" forState:(UIControlStateNormal)]; 25 | [testDefaultBtn addTarget:self action:@selector(testDefault) forControlEvents:(UIControlEventTouchUpInside)]; 26 | [self.view addSubview:testDefaultBtn]; 27 | 28 | UIButton *testDefaultPath = [[UIButton alloc] initWithFrame:CGRectMake(20, 300, 200, 50)]; 29 | [testDefaultPath setTitle:@"测试默认路由带参数" forState:(UIControlStateNormal)]; 30 | [testDefaultPath addTarget:self action:@selector(testDefaultPath) forControlEvents:(UIControlEventTouchUpInside)]; 31 | [self.view addSubview:testDefaultPath]; 32 | 33 | } 34 | 35 | - (void)testDefault { 36 | id obj = [self routeObjForURL:[NSURL URLForRouteTestDefault] withParameters:nil]; 37 | [self.navigationController pushViewController:obj animated:YES]; 38 | 39 | // [self routeURL:[NSURL URLForRouteTestDefault] withParameters:nil handler:^BOOL(NSMutableDictionary * _Nullable parameters, id targetObj) { 40 | // [self.navigationController pushViewController:targetObj animated:YES]; 41 | // return YES; 42 | // }]; 43 | } 44 | - (void)testDefaultPath { 45 | [MLSRoutes.globalRoutes routeURL:[NSURL URLForRouteTestPathDefaultType:@"red"] withParameters:nil handler:^BOOL(NSMutableDictionary * _Nullable parameters, id targetObj) { 46 | [self.navigationController pushViewController:targetObj animated:YES]; 47 | return YES; 48 | }]; 49 | } 50 | 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /AppledocSettings.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | --company-id 6 | cn.minlison 7 | --ignore 8 | 9 | ./MLSModuleCenterDemo 10 | ./docs 11 | *.m 12 | ./Classes/MLSModuleCenter.h 13 | 14 | --logformat 15 | 1 16 | --print-settings 17 | 18 | --project-company 19 | MinLison 20 | --project-name 21 | MLSModuleCenter 22 | --repeat-first-par 23 | 24 | --templates 25 | ./Templates 26 | --verbose 27 | 6 28 | --publish-docset 29 | 30 | --create-docset 31 | 32 | --install-docset 33 | 34 | --docset-install-path 35 | ./docs/docset 36 | --create-html 37 | 38 | --create-markdown 39 | 40 | --output 41 | ./docs 42 | --keep-undocumented-objects 43 | 44 | --keep-undocumented-members 45 | 46 | --search-undocumented-doc 47 | 48 | --keep-intermediate-files 49 | 50 | --preprocess-headerdoc 51 | 52 | --print-information-block-titles 53 | 54 | --merge-categories 55 | 56 | --merge-category-comment 57 | 58 | --use-code-order 59 | 60 | --clean-output 61 | 62 | --warn-undocumented-object 63 | 64 | --warn-undocumented-member 65 | 66 | --warn-missing-arg 67 | 68 | --warn-invalid-crossref 69 | 70 | --warn-unknown-directive 71 | 72 | --warn-empty-description 73 | 74 | --warn-unsupported-typedef-enum 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHContext.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "BHServiceProtocol.h" 11 | #import "BHConfig.h" 12 | #import "BHAppDelegate.h" 13 | 14 | typedef enum 15 | { 16 | BHEnvironmentDev = 0, 17 | BHEnvironmentTest, 18 | BHEnvironmentStage, 19 | BHEnvironmentProd 20 | }BHEnvironmentType; 21 | 22 | 23 | @interface BHContext : NSObject 24 | 25 | //global env 26 | @property(nonatomic, assign) BHEnvironmentType env; 27 | 28 | //global config 29 | @property(nonatomic, strong) BHConfig *config; 30 | 31 | //application appkey 32 | @property(nonatomic, strong) NSString *appkey; 33 | //customEvent>=1000 34 | @property(nonatomic, assign) NSInteger customEvent; 35 | 36 | @property(nonatomic, strong) UIApplication *application; 37 | 38 | @property(nonatomic, strong) NSDictionary *launchOptions; 39 | 40 | @property(nonatomic, strong) NSString *moduleConfigName; 41 | 42 | @property(nonatomic, strong) NSString *serviceConfigName; 43 | 44 | //3D-Touch model 45 | #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_8_4 46 | @property (nonatomic, strong) BHShortcutItem *touchShortcutItem; 47 | #endif 48 | 49 | //OpenURL model 50 | @property (nonatomic, strong) BHOpenURLItem *openURLItem; 51 | 52 | //Notifications Remote or Local 53 | @property (nonatomic, strong) BHNotificationsItem *notificationsItem; 54 | 55 | //user Activity Model 56 | @property (nonatomic, strong) BHUserActivityItem *userActivityItem; 57 | 58 | //watch Model 59 | @property (nonatomic, strong) BHWatchItem *watchItem; 60 | 61 | //background model 62 | @property(nonatomic, strong) BHBackgroundItem *backgroundItem; 63 | 64 | //custom param 65 | @property (nonatomic, copy) NSDictionary *customParam; 66 | 67 | + (instancetype)shareInstance; 68 | 69 | - (void)addServiceWithImplInstance:(id)implInstance serviceName:(NSString *)serviceName; 70 | 71 | - (void)removeServiceWithServiceName:(NSString *)serviceName; 72 | 73 | - (id)getServiceInstanceFromServiceName:(NSString *)serviceName; 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/MLSModuleCenterDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MLSModuleCenterDemo 4 | // 5 | // Created by yuanhang on 2019/10/9. 6 | // Copyright © 2019 minlison. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | 22 | [BHContext shareInstance].application = application; 23 | [BHContext shareInstance].launchOptions = launchOptions; 24 | BHContext.shareInstance.env = BHEnvironmentDev; 25 | #if DEBUG 26 | [BeeHive shareInstance].enableException = YES; 27 | #endif 28 | /// 配置 BeeHive 上下文 29 | [[BeeHive shareInstance] setContext:[BHContext shareInstance]]; 30 | 31 | /// 手动调用moudle 32 | [[BHModuleManager sharedManager] triggerEvent:BHMSetupEvent]; 33 | [[BHModuleManager sharedManager] triggerEvent:BHMInitEvent]; 34 | 35 | 36 | #if MLSModuleCenterToolsEnable 37 | /// 此处必须是模拟器调用,用来生成所有路由头文件 38 | NSString *rootPath = [NSString stringWithFormat:@"%s", __FILE__]; 39 | rootPath = [rootPath stringByReplacingOccurrencesOfString:[rootPath lastPathComponent] withString:@"Header"]; 40 | BOOL isDir = NO; 41 | if (![NSFileManager.defaultManager fileExistsAtPath:rootPath isDirectory:&isDir] || !isDir) { 42 | [NSFileManager.defaultManager createDirectoryAtPath:rootPath withIntermediateDirectories:YES attributes:nil error:nil]; 43 | } 44 | NSLog(@"%@",rootPath); 45 | [MLSGenerateRouteHeaderTool generateRoutesHeaderToDir:rootPath headerName:nil]; 46 | #endif 47 | 48 | [super application:application didFinishLaunchingWithOptions:launchOptions]; 49 | 50 | ViewController *homeVc = [[ViewController alloc] init]; 51 | UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:(UIViewController*)homeVc]; 52 | // 53 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 54 | self.window.rootViewController = navCtrl; 55 | 56 | [self.window makeKeyAndVisible]; 57 | return YES; 58 | return YES; 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BeeHive.md: -------------------------------------------------------------------------------- 1 | # BeeHive Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BeeHive.h 5 | 6 | ## Overview 7 | 8 | Created by BeeHive. 9 | Copyright © 2016, Alibaba, Inc. All rights reserved. 10 | 11 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 12 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 13 | 14 | ## Tasks 15 | 16 | ### 17 | 18 | [  context](#//api/name/context) *property* 19 | 20 | [  enableException](#//api/name/enableException) *property* 21 | 22 | [+ shareInstance](#//api/name/shareInstance) 23 | 24 | [+ registerDynamicModule:](#//api/name/registerDynamicModule:) 25 | 26 | [– createService:](#//api/name/createService:) 27 | 28 | [– registerService:service:](#//api/name/registerService:service:) 29 | 30 | [+ triggerCustomEvent:](#//api/name/triggerCustomEvent:) 31 | 32 | ## Properties 33 | 34 | 35 | ### context 36 | 37 | `@property (nonatomic, strong) BHContext *context` 38 | 39 | 40 | ### enableException 41 | 42 | `@property (nonatomic, assign) BOOL enableException` 43 | 44 | 45 | ## Class Methods 46 | 47 | 48 | ### registerDynamicModule: 49 | 50 | `+ (void)registerDynamicModule:(Class)*moduleClass*` 51 | 52 | 53 | ### shareInstance 54 | 55 | `+ (instancetype)shareInstance` 56 | 57 | 58 | ### triggerCustomEvent: 59 | 60 | `+ (void)triggerCustomEvent:(NSInteger)*eventType*` 61 | 62 | 63 | ## Instance Methods 64 | 65 | 66 | ### createService: 67 | 68 | `- (id)createService:(Protocol *)*proto*` 69 | 70 | 71 | ### registerService:service: 72 | 73 | `- (void)registerService:(Protocol *)*proto* service:(Class)*serviceClass*` 74 | 75 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHTimeProfiler.md: -------------------------------------------------------------------------------- 1 | # BHTimeProfiler Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHTimeProfiler.h 5 | 6 | ## Overview 7 | 8 | Created by BeeHive. 9 | Copyright © 2016, Alibaba, Inc. All rights reserved. 10 | 11 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 12 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 13 | 14 | ## Tasks 15 | 16 | ### 17 | 18 | [+ sharedTimeProfiler](#//api/name/sharedTimeProfiler) 19 | 20 | [– initTimeProfilerWithMainKey:](#//api/name/initTimeProfilerWithMainKey:) 21 | 22 | [– recordEventTime:](#//api/name/recordEventTime:) 23 | 24 | [– printOutTimeProfileResult](#//api/name/printOutTimeProfileResult) 25 | 26 | [– saveTimeProfileDataIntoFile:](#//api/name/saveTimeProfileDataIntoFile:) 27 | 28 | [– postTimeProfileResultNotification](#//api/name/postTimeProfileResultNotification) 29 | 30 | 31 | ## Class Methods 32 | 33 | 34 | ### sharedTimeProfiler 35 | 36 | `+ (BHTimeProfiler *)sharedTimeProfiler` 37 | 38 | 39 | ## Instance Methods 40 | 41 | 42 | ### initTimeProfilerWithMainKey: 43 | 44 | `- (instancetype)initTimeProfilerWithMainKey:(NSString *)*mainKey*` 45 | 46 | 47 | ### postTimeProfileResultNotification 48 | 49 | `- (void)postTimeProfileResultNotification` 50 | 51 | 52 | ### printOutTimeProfileResult 53 | 54 | `- (void)printOutTimeProfileResult` 55 | 56 | 57 | ### recordEventTime: 58 | 59 | `- (void)recordEventTime:(NSString *)*eventName*` 60 | 61 | 62 | ### saveTimeProfileDataIntoFile: 63 | 64 | `- (void)saveTimeProfileDataIntoFile:(NSString *)*filePath*` 65 | 66 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHBackgroundHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHBackgroundHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHBackgroundHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHAppDelegate.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHWatchReplyHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHWatchReplyHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHWatchReplyHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHAppDelegate.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHModuleManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger, BHModuleLevel) 12 | { 13 | BHModuleBasic = 0, 14 | BHModuleNormal = 1 15 | }; 16 | 17 | typedef NS_ENUM(NSInteger, BHModuleEventType) 18 | { 19 | BHMSetupEvent = 0, 20 | BHMInitEvent, 21 | BHMTearDownEvent, 22 | BHMSplashEvent, 23 | BHMQuickActionEvent, 24 | BHMWillResignActiveEvent, 25 | BHMDidEnterBackgroundEvent, 26 | BHMWillEnterForegroundEvent, 27 | BHMDidBecomeActiveEvent, 28 | BHMWillTerminateEvent, 29 | BHMUnmountEvent, 30 | BHMOpenURLEvent, 31 | BHMDidReceiveMemoryWarningEvent, 32 | BHMDidFailToRegisterForRemoteNotificationsEvent, 33 | BHMDidRegisterForRemoteNotificationsEvent, 34 | BHMDidReceiveRemoteNotificationEvent, 35 | BHMDidReceiveLocalNotificationEvent, 36 | BHMWillPresentNotificationEvent, 37 | BHMDidReceiveNotificationResponseEvent, 38 | BHMWillContinueUserActivityEvent, 39 | BHMContinueUserActivityEvent, 40 | BHMDidFailToContinueUserActivityEvent, 41 | BHMDidUpdateUserActivityEvent, 42 | BHMHandleWatchKitExtensionRequestEvent, 43 | BHMHandleBackgroundSessionEvent, 44 | BHMDidCustomEvent = 1000 45 | 46 | }; 47 | 48 | 49 | @class BHModule; 50 | 51 | @interface BHModuleManager : NSObject 52 | 53 | + (instancetype)sharedManager; 54 | 55 | // If you do not comply with set Level protocol, the default Normal 56 | - (void)registerDynamicModule:(Class)moduleClass; 57 | 58 | - (void)registerDynamicModule:(Class)moduleClass 59 | shouldTriggerInitEvent:(BOOL)shouldTriggerInitEvent; 60 | 61 | - (void)unRegisterDynamicModule:(Class)moduleClass; 62 | 63 | - (void)loadLocalModules; 64 | 65 | - (void)registedAllModules; 66 | 67 | - (void)registerCustomEvent:(NSInteger)eventType 68 | withModuleInstance:(id)moduleInstance 69 | andSelectorStr:(NSString *)selectorStr; 70 | 71 | - (void)triggerEvent:(NSInteger)eventType; 72 | 73 | - (void)triggerEvent:(NSInteger)eventType 74 | withCustomParam:(NSDictionary *)customParam; 75 | 76 | 77 | 78 | @end 79 | 80 | -------------------------------------------------------------------------------- /MLSModuleCenterDemo/Pods/Target Support Files/Pods-MLSModuleCenterDemo/Pods-MLSModuleCenterDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2019 Minlison 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | MLSModuleCenter 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHNotificationResultHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHNotificationResultHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHNotificationResultHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHAppDelegate.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHRPathComponentCustomHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHRPathComponentCustomHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHRPathComponentCustomHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHRouter.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHShortcutCompletionHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHShortcutCompletionHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHShortcutCompletionHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHAppDelegate.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHNotificationCompletionHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHNotificationCompletionHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHNotificationCompletionHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHAppDelegate.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/MLSRouteHandleTargetCallBackBlock.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MLSRouteHandleTargetCallBackBlock Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

MLSRouteHandleTargetCallBackBlock Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inMLSRoutes.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/MLSRouteUnMatchedURLHandlerBlock.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MLSRouteUnMatchedURLHandlerBlock Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

MLSRouteUnMatchedURLHandlerBlock Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inMLSRoutes.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHUserActivityRestorationHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHUserActivityRestorationHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHUserActivityRestorationHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHAppDelegate.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/MLSRouteHandlerParamsCallBackBlock.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MLSRouteHandlerParamsCallBackBlock Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

MLSRouteHandlerParamsCallBackBlock Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inMLSRoutes.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/html/Blocks/BHNotificationPresentationOptionsHandler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHNotificationPresentationOptionsHandler Block Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

BHNotificationPresentationOptionsHandler Block Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inBHAppDelegate.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 |
81 | 89 |
90 |
91 |
92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // BHRouter.h 3 | // BeeHive 4 | // 5 | // Created by 张旻可 on 2017/7/17. 6 | // Copyright © 2017年 Taobao lnc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static NSString *const BHRURLSchemeGlobalKey = @"URLGlobalScheme"; 12 | static NSString *const BHRURLHostCallService = @"call.service.beehive"; 13 | static NSString *const BHRURLHostRegister = @"register.beehive"; 14 | static NSString *const BHRURLHostJumpViewController = @"jump.vc.beehive"; 15 | static NSString *const BHRURLSubPathSplitPattern = @"."; 16 | static NSString *const BHRURLQueryParamsKey = @"params"; 17 | static NSString *const BHRURLFragmentViewControlerEnterModePush = @"push"; 18 | static NSString *const BHRURLFragmentViewControlerEnterModeModal = @"modal"; 19 | 20 | 21 | 22 | typedef void(^BHRPathComponentCustomHandler)(NSDictionary *params); 23 | 24 | @interface BHRouter : NSObject 25 | 26 | 27 | - (instancetype)init NS_UNAVAILABLE; 28 | + (instancetype)new NS_UNAVAILABLE; 29 | 30 | + (instancetype)globalRouter; 31 | + (instancetype)routerForScheme:(NSString *)scheme; 32 | 33 | + (void)unRegisterRouterForScheme:(NSString *)scheme; 34 | + (void)unRegisterAllRouters; 35 | 36 | //handler is a custom module or service solve function 37 | - (void)addPathComponent:(NSString *)pathComponentKey 38 | forClass:(Class)mClass; 39 | - (void)addPathComponent:(NSString *)pathComponentKey 40 | forClass:(Class)mClass 41 | handler:(BHRPathComponentCustomHandler)handler; 42 | - (void)removePathComponent:(NSString *)pathComponentKey; 43 | 44 | //url - > com.alibaba.beehive://call.service.beehive/pathComponentKey.protocolName.selector/...?params={}(value url encode) 45 | //url - > com.alibaba.beehive://register.beehive/pathComponentKey.protocolName/...?params={}(value url encode) 46 | //url - > com.alibaba.beehive://jump.vc.beehive/pathComponentKey.protocolName.push(modal)/...?params={}(value url encode)#push 47 | //params -> {pathComponentKey:{paramName:paramValue,...},...} 48 | //when call service, paramName = @1,@2,...(order of paramValue) 49 | + (BOOL)canOpenURL:(NSURL *)URL; 50 | + (BOOL)openURL:(NSURL *)URL; 51 | + (BOOL)openURL:(NSURL *)URL 52 | withParams:(NSDictionary *> *)params; 53 | + (BOOL)openURL:(NSURL *)URL 54 | withParams:(NSDictionary *> *)params 55 | andThen:(void(^)(NSString *pathComponentKey, id obj, id returnValue))then; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHModuleProtocol.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import "BHAnnotation.h" 11 | 12 | @class BHContext; 13 | @class BeeHive; 14 | 15 | #define BH_EXPORT_MODULE(isAsync) \ 16 | + (void)load { [BeeHive registerDynamicModule:[self class]]; } \ 17 | -(BOOL)async { return [[NSString stringWithUTF8String:#isAsync] boolValue];} 18 | 19 | 20 | @protocol BHModuleProtocol 21 | 22 | 23 | @optional 24 | 25 | //如果不去设置Level默认是Normal 26 | //basicModuleLevel不去实现默认Normal 27 | - (void)basicModuleLevel; 28 | //越大越优先 29 | - (NSInteger)modulePriority; 30 | 31 | - (BOOL)async; 32 | 33 | - (void)modSetUp:(BHContext *)context; 34 | 35 | - (void)modInit:(BHContext *)context; 36 | 37 | - (void)modSplash:(BHContext *)context; 38 | 39 | - (void)modQuickAction:(BHContext *)context; 40 | 41 | - (void)modTearDown:(BHContext *)context; 42 | 43 | - (void)modWillResignActive:(BHContext *)context; 44 | 45 | - (void)modDidEnterBackground:(BHContext *)context; 46 | 47 | - (void)modWillEnterForeground:(BHContext *)context; 48 | 49 | - (void)modDidBecomeActive:(BHContext *)context; 50 | 51 | - (void)modWillTerminate:(BHContext *)context; 52 | 53 | - (void)modUnmount:(BHContext *)context; 54 | 55 | - (void)modOpenURL:(BHContext *)context; 56 | 57 | - (void)modDidReceiveMemoryWaring:(BHContext *)context; 58 | 59 | - (void)modDidFailToRegisterForRemoteNotifications:(BHContext *)context; 60 | 61 | - (void)modDidRegisterForRemoteNotifications:(BHContext *)context; 62 | 63 | - (void)modDidReceiveRemoteNotification:(BHContext *)context; 64 | 65 | - (void)modDidReceiveLocalNotification:(BHContext *)context; 66 | 67 | - (void)modWillPresentNotification:(BHContext *)context; 68 | 69 | - (void)modDidReceiveNotificationResponse:(BHContext *)context; 70 | 71 | - (void)modWillContinueUserActivity:(BHContext *)context; 72 | 73 | - (void)modContinueUserActivity:(BHContext *)context; 74 | 75 | - (void)modDidFailToContinueUserActivity:(BHContext *)context; 76 | 77 | - (void)modDidUpdateContinueUserActivity:(BHContext *)context; 78 | 79 | - (void)modHandleWatchKitExtensionRequest:(BHContext *)context; 80 | 81 | - (void)modDidCustomEvent:(BHContext *)context; 82 | 83 | - (void)modHandleBackgroundSession:(BHContext *)context; 84 | @end 85 | -------------------------------------------------------------------------------- /docs/html/Classes/MLSBaseModule.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MLSBaseModule Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 65 | 66 |
67 |
68 |
69 |
70 |

MLSBaseModule Class Reference

71 | 72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
Inherits fromMLSModule : NSObject
Declared inMLSBaseModule.h
82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
92 | 93 |
94 | 102 |
103 |
104 |
105 |
106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /docs/html/Classes/MLSAppDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MLSAppDelegate Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 65 | 66 |
67 |
68 |
69 |
70 |

MLSAppDelegate Class Reference

71 | 72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
Inherits fromBHAppDelegate : UIResponder
Declared inMLSAppDelegate.h
82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
92 | 93 |
94 | 102 |
103 |
104 |
105 |
106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /docs/html/Categories/NSObject+MLSRouter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | NSObject(MLSRouter) Category Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 65 | 66 |
67 |
68 |
69 |
70 |

NSObject(MLSRouter) Category Reference

71 | 72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
Conforms toMLSRouteControlProtocol
Declared inNSObject+MLSRouter.h
82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
92 | 93 |
94 | 102 |
103 |
104 |
105 |
106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /docs/html/Categories/UIViewController+MLSRouter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | UIViewController(MLSRouter) Category Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 65 | 66 |
67 |
68 |
69 |
70 |

UIViewController(MLSRouter) Category Reference

71 | 72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
Conforms toMLSRouteDefinitionTargetController
Declared inUIViewController+MLSRouter.h
82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
92 | 93 |
94 | 102 |
103 |
104 |
105 |
106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHAnnotation.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | 10 | #import 11 | #import "BeeHive.h" 12 | 13 | #ifndef BeehiveModSectName 14 | 15 | #define BeehiveModSectName "BeehiveMods" 16 | 17 | #endif 18 | 19 | #ifndef BeehiveServiceSectName 20 | 21 | #define BeehiveServiceSectName "BeehiveServices" 22 | 23 | #endif 24 | 25 | #ifndef MLSRouteRegisterName 26 | 27 | #define MLSRouteRegisterName "MLSRouteRegistes" 28 | 29 | #endif 30 | 31 | #ifndef MLSRouteDefaultScheme 32 | 33 | #define MLSRouteDefaultScheme "MLSRouteDefaultScheme" 34 | 35 | #endif 36 | 37 | #ifndef MLSRouteRegisterNoHandler 38 | 39 | #define MLSRouteRegisterNoHandler "MLSRouteRegisterNoHandler" 40 | 41 | #endif 42 | 43 | #define BeeHiveDATA(sectname) __attribute((used, section("__DATA,"#sectname" "))) 44 | 45 | #define BeeHiveMod(name) \ 46 | class BeeHive; char * k##name##_mod BeeHiveDATA(BeehiveMods) = ""#name""; 47 | 48 | #define BeeHiveService(servicename,impl) \ 49 | class BeeHive; char * k##servicename##_service BeeHiveDATA(BeehiveServices) = "{ \""#servicename"\" : \""#impl"\"}"; 50 | 51 | // 使用宏定义注解形式注册路由 52 | 53 | // identifier 唯一标识符号,在同一个类里面,不可重复,可以使用数字,字母,下划线 54 | // target 类对象 55 | // scheme 路由scheme协议, 只允许大小写字母和下划线 56 | // priority 优先级,默认为 0 ,必须是大于等于0 57 | // routePattern 路由 path 58 | // handler 必须是类方法,target 必须实现, 接收一个参数,是路由所传入参数 59 | // 举例方法 + (void)routeParams:(NSMutableDictionary *)params; params 可增加参数,用户 route 回调 60 | // 如果没有指定 handler 方法,会调用 MLSRRouteDefinitionTargetController 协议方法,获取 targetController 如果不是UIViewController 对象,不会回传 61 | #define MLSRouteRegister(identifier, target, scheme, priority, routePattern, handler) \ 62 | class BeeHive; char * k##identifier##_##target##_##scheme##_##priority##_route BeeHiveDATA(MLSRouteRegistes) = "{ \"target\" : \""#target"\", \"scheme\" : \""#scheme"\", \"priority\" : \""#priority"\", \"routePattern\" : "#routePattern", \"handler\" : "#handler"}"; 63 | 64 | #define MLSRouteRegisterPriorityHandlerDefaultScheme(identifier, target, priority, routePattern, handler) MLSRouteRegister(identifier, target, MLSRouteDefaultScheme, priority, routePattern, handler) 65 | #define MLSRouteRegisterHandlerDefaultScheme(identifier, target, routePattern, handler) MLSRouteRegisterPriorityHandlerDefaultScheme(identifier, target, 0, routePattern, handler) 66 | #define MLSRouteRegisterDefaultScheme(identifier, target, routePattern) MLSRouteRegisterHandlerDefaultScheme(identifier, target, routePattern, "MLSRouteRegisterNoHandler") 67 | @interface BHAnnotation : NSObject 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /docs/markdown/Classes/MLSRouteResponse.md: -------------------------------------------------------------------------------- 1 | # MLSRouteResponse Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** MLSRouteResponse.h 5 | 6 | ## Overview 7 | 8 | MLSRouteResponse is the response from attempting to route a MLSRouteRequest. 9 | 10 | ## Tasks 11 | 12 | ### Other Methods 13 | 14 | [  match](#//api/name/match) *property* 15 | 16 | [  parameters](#//api/name/parameters) *property* 17 | 18 | ### Creating Responses 19 | 20 | [+ invalidMatchResponse](#//api/name/invalidMatchResponse) 21 | 22 | [+ validMatchResponseWithParameters:](#//api/name/validMatchResponseWithParameters:) 23 | 24 | [– init](#//api/name/init) 25 | 26 | [+ new](#//api/name/new) 27 | 28 | ## Properties 29 | 30 | 31 | ### match 32 | 33 | Indicates if the response is a match or not. 34 | 35 | `@property (nonatomic, assign, readonly, getter=isMatch) BOOL match` 36 | 37 | #### Declared In 38 | * `MLSRouteResponse.h` 39 | 40 | 41 | ### parameters 42 | 43 | The match parameters (or nil for an invalid response). 44 | 45 | `@property (nonatomic, strong, readonly, nullable) NSDictionary *parameters` 46 | 47 | #### Declared In 48 | * `MLSRouteResponse.h` 49 | 50 | 51 | ## Class Methods 52 | 53 | 54 | ### invalidMatchResponse 55 | 56 | Creates an invalid match response. 57 | 58 | `+ (instancetype)invalidMatchResponse` 59 | 60 | #### Declared In 61 | * `MLSRouteResponse.h` 62 | 63 | 64 | ### new 65 | 66 | Unavailable, please use invalidMatchResponse or validMatchResponseWithParameters: instead. 67 | 68 | `+ (instancetype)new` 69 | 70 | #### Declared In 71 | * `MLSRouteResponse.h` 72 | 73 | 74 | ### validMatchResponseWithParameters: 75 | 76 | Creates a valid match response with the given parameters. 77 | 78 | `+ (instancetype)validMatchResponseWithParameters:(NSDictionary *)*parameters*` 79 | 80 | #### Declared In 81 | * `MLSRouteResponse.h` 82 | 83 | 84 | ## Instance Methods 85 | 86 | 87 | ### init 88 | 89 | Unavailable, please use invalidMatchResponse or validMatchResponseWithParameters: instead. 90 | 91 | `- (instancetype)init` 92 | 93 | #### Declared In 94 | * `MLSRouteResponse.h` 95 | 96 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHModuleManager.md: -------------------------------------------------------------------------------- 1 | # BHModuleManager Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHModuleManager.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [+ sharedManager](#//api/name/sharedManager) 11 | 12 | [– registerDynamicModule:](#//api/name/registerDynamicModule:) 13 | 14 | [– registerDynamicModule:shouldTriggerInitEvent:](#//api/name/registerDynamicModule:shouldTriggerInitEvent:) 15 | 16 | [– unRegisterDynamicModule:](#//api/name/unRegisterDynamicModule:) 17 | 18 | [– loadLocalModules](#//api/name/loadLocalModules) 19 | 20 | [– registedAllModules](#//api/name/registedAllModules) 21 | 22 | [– registerCustomEvent:withModuleInstance:andSelectorStr:](#//api/name/registerCustomEvent:withModuleInstance:andSelectorStr:) 23 | 24 | [– triggerEvent:](#//api/name/triggerEvent:) 25 | 26 | [– triggerEvent:withCustomParam:](#//api/name/triggerEvent:withCustomParam:) 27 | 28 | 29 | ## Class Methods 30 | 31 | 32 | ### sharedManager 33 | 34 | `+ (instancetype)sharedManager` 35 | 36 | 37 | ## Instance Methods 38 | 39 | 40 | ### loadLocalModules 41 | 42 | `- (void)loadLocalModules` 43 | 44 | 45 | ### registedAllModules 46 | 47 | `- (void)registedAllModules` 48 | 49 | 50 | ### registerCustomEvent:withModuleInstance:andSelectorStr: 51 | 52 | `- (void)registerCustomEvent:(NSInteger)*eventType* withModuleInstance:(id)*moduleInstance* andSelectorStr:(NSString *)*selectorStr*` 53 | 54 | 55 | ### registerDynamicModule: 56 | 57 | `- (void)registerDynamicModule:(Class)*moduleClass*` 58 | 59 | 60 | ### registerDynamicModule:shouldTriggerInitEvent: 61 | 62 | `- (void)registerDynamicModule:(Class)*moduleClass* shouldTriggerInitEvent:(BOOL)*shouldTriggerInitEvent*` 63 | 64 | 65 | ### triggerEvent: 66 | 67 | `- (void)triggerEvent:(NSInteger)*eventType*` 68 | 69 | 70 | ### triggerEvent:withCustomParam: 71 | 72 | `- (void)triggerEvent:(NSInteger)*eventType* withCustomParam:(NSDictionary *)*customParam*` 73 | 74 | 75 | ### unRegisterDynamicModule: 76 | 77 | `- (void)unRegisterDynamicModule:(Class)*moduleClass*` 78 | 79 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHWatchDog.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "BHWatchDog.h" 10 | #import "BHCommon.h" 11 | #import 12 | 13 | typedef void (^handler)(void); 14 | typedef void (^watchdogFiredCallBack)(void); 15 | 16 | 17 | @interface PingThread : NSThread 18 | 19 | @property (nonatomic, assign) double threshold; 20 | @property (nonatomic, assign) BOOL pingTaskIsRunning; 21 | @property (nonatomic, copy) handler handler; 22 | 23 | @end 24 | 25 | @implementation PingThread 26 | 27 | - (instancetype)initWithThreshold:(double)threshold handler:(handler)handler 28 | { 29 | if (self = [super init]) { 30 | self.pingTaskIsRunning = NO; 31 | self.threshold = threshold; 32 | self.handler = handler; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | - (void)main 39 | { 40 | dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); 41 | 42 | while (!self.cancelled) { 43 | self.pingTaskIsRunning = YES; 44 | dispatch_async(dispatch_get_main_queue(), ^{ 45 | self.pingTaskIsRunning = NO; 46 | dispatch_semaphore_signal(semaphore); 47 | }); 48 | 49 | [NSThread sleepForTimeInterval:self.threshold]; 50 | if (self.pingTaskIsRunning) { 51 | self.handler(); 52 | } 53 | 54 | dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); 55 | } 56 | } 57 | 58 | @end 59 | 60 | @interface BHWatchDog() 61 | 62 | 63 | @property (nonatomic, assign) double threshold; 64 | @property (nonatomic, strong) PingThread *pingThread; 65 | 66 | @end 67 | 68 | @implementation BHWatchDog 69 | 70 | - (instancetype)initWithThreshold:(double)threshold strictMode:(BOOL)strictMode 71 | { 72 | self = [self initWIthThreshold:threshold callBack:^() { 73 | NSString *message = [NSString stringWithFormat:@"👮 Main thread was blocked 👮"]; 74 | if (strictMode) { 75 | //避免后台切换导致进入断言 76 | NSAssert([UIApplication sharedApplication].applicationState == UIApplicationStateBackground, message); 77 | } else { 78 | BHLog(@"%@", message); 79 | } 80 | }]; 81 | 82 | return self; 83 | } 84 | 85 | 86 | - (instancetype)initWIthThreshold:(double)threshold callBack:(watchdogFiredCallBack)callBack 87 | { 88 | if (self = [self init]) { 89 | self.threshold = 0.4;//默认间隔 90 | self.threshold = threshold; 91 | self.pingThread = [[PingThread alloc] initWithThreshold:threshold handler:callBack]; 92 | [self.pingThread start]; 93 | } 94 | 95 | return self; 96 | } 97 | 98 | 99 | - (void)dealloc 100 | { 101 | [self.pingThread cancel]; 102 | } 103 | 104 | @end 105 | 106 | 107 | -------------------------------------------------------------------------------- /Classes/MLSModuleCenter.h: -------------------------------------------------------------------------------- 1 | /// Automatically created by script in Build Phases 2 | 3 | #import 4 | 5 | #ifndef MLSModuleCenter_h 6 | #define MLSModuleCenter_h 7 | 8 | #if __has_include("MLSModuleCenter.h") 9 | #if __has_include("MLSAppDelegate.h") 10 | #import "BHAnnotation.h" 11 | #import "BHAppDelegate.h" 12 | #import "BHCommon.h" 13 | #import "BHConfig.h" 14 | #import "BHContext.h" 15 | #import "BHDefines.h" 16 | #import "BHModuleManager.h" 17 | #import "BHModuleProtocol.h" 18 | #import "BHRouter.h" 19 | #import "BHServiceManager.h" 20 | #import "BHServiceProtocol.h" 21 | #import "BHTimeProfiler.h" 22 | #import "BHWatchDog.h" 23 | #import "BeeHive.h" 24 | #import "MLSAppDelegate.h" 25 | #import "MLSBaseModule.h" 26 | #import "MLSServiceProtocol.h" 27 | #endif 28 | 29 | #if __has_include("MLSRoutes.h") 30 | #import "MLSParsingUtilities.h" 31 | #import "MLSRouteDefinition.h" 32 | #import "MLSRouteRequest.h" 33 | #import "MLSRouteResponse.h" 34 | #import "MLSRouteControlProtocol.h" 35 | #import "MLSRoutes.h" 36 | #import "NSDictionary+MLSRouter.h" 37 | #import "NSObject+MLSRouter.h" 38 | #import "UIViewController+MLSRouter.h" 39 | #endif 40 | 41 | #if __has_include("MLSGenerateRouteHeaderTool.h") 42 | #import "MLSGenerateRouteHeaderTool.h" 43 | #endif 44 | 45 | #else 46 | 47 | #if __has_include("MLSAppDelegate.h") 48 | #import 49 | #import 50 | #import 51 | #import 52 | #import 53 | #import 54 | #import 55 | #import 56 | #import 57 | #import 58 | #import 59 | #import 60 | #import 61 | #import 62 | #import 63 | #import 64 | #import 65 | #endif 66 | 67 | #if __has_include("MLSRoutes.h") 68 | #import 69 | #import 70 | #import 71 | #import 72 | #import 73 | #import 74 | #import 75 | #import 76 | #import 77 | #endif 78 | 79 | #if __has_include("MLSGenerateRouteHeaderTool.h") 80 | #import "MLSGenerateRouteHeaderTool.h" 81 | #endif 82 | #endif 83 | 84 | 85 | #endif /* MLSModuleCenter_h */ 86 | -------------------------------------------------------------------------------- /docs/html/Classes/BHAnnotation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHAnnotation Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 67 | 68 |
69 |
70 |
71 |
72 |

BHAnnotation Class Reference

73 | 74 | 75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
Inherits fromNSObject
Declared inBHAnnotation.h
84 | 85 | 86 | 87 | 88 |
89 | 90 |

Overview

91 |

Created by BeeHive. 92 | Copyright © 2016, Alibaba, Inc. All rights reserved.

93 | 94 |

This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 95 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.

96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 |
106 | 107 |
108 | 116 |
117 |
118 |
119 |
120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /docs/html/Classes/MLSModule.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | MLSModule Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 67 | 68 |
69 |
70 |
71 |
72 |

MLSModule Class Reference

73 | 74 | 75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
Inherits fromNSObject
Conforms toBHModuleProtocol
Declared inMLSBaseModule.h
87 | 88 | 89 | 90 | 91 |
92 | 93 |

Overview

94 |

基类 Module 95 | 每创建一个模块时, 需要继承该类, 并在Module 头文件中, 引入该模块的所有暴露的头文件 96 | 可以使用 MOUDLE_EXPORT(NO) 是否异步加载 Module (该方法是在 +load 方法内调用, 需要写到 @implementation 和 @end 之间) 97 | 也可以使用 @BeeHiveMod(BaseModule) 来注册 Moudlle (该方法是在应用启动前, 加载符号文件时候调用)

98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
108 | 109 |
110 | 118 |
119 |
120 |
121 |
122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHContext.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import "BHContext.h" 10 | 11 | @interface BHContext() 12 | 13 | @property(nonatomic, strong) NSMutableDictionary *modulesByName; 14 | 15 | @property(nonatomic, strong) NSMutableDictionary *servicesByName; 16 | 17 | @end 18 | 19 | @implementation BHContext 20 | 21 | + (instancetype)shareInstance 22 | { 23 | static dispatch_once_t p; 24 | static id BHInstance = nil; 25 | 26 | dispatch_once(&p, ^{ 27 | BHInstance = [[[self class] alloc] init]; 28 | if ([BHInstance isKindOfClass:[BHContext class]]) { 29 | ((BHContext *) BHInstance).config = [BHConfig shareInstance]; 30 | } 31 | }); 32 | 33 | return BHInstance; 34 | } 35 | 36 | - (void)addServiceWithImplInstance:(id)implInstance serviceName:(NSString *)serviceName 37 | { 38 | [[BHContext shareInstance].servicesByName setObject:implInstance forKey:serviceName]; 39 | } 40 | 41 | - (void)removeServiceWithServiceName:(NSString *)serviceName 42 | { 43 | [[BHContext shareInstance].servicesByName removeObjectForKey:serviceName]; 44 | } 45 | 46 | - (id)getServiceInstanceFromServiceName:(NSString *)serviceName 47 | { 48 | return [[BHContext shareInstance].servicesByName objectForKey:serviceName]; 49 | } 50 | 51 | - (instancetype)init 52 | { 53 | self = [super init]; 54 | if (self) { 55 | self.modulesByName = [[NSMutableDictionary alloc] initWithCapacity:1]; 56 | self.servicesByName = [[NSMutableDictionary alloc] initWithCapacity:1]; 57 | self.moduleConfigName = @"BeeHive.bundle/BeeHive"; 58 | self.serviceConfigName = @"BeeHive.bundle/BHService"; 59 | 60 | #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_8_4 61 | self.touchShortcutItem = [[BHShortcutItem alloc] init]; 62 | #endif 63 | 64 | self.openURLItem = [[BHOpenURLItem alloc] init]; 65 | self.notificationsItem = [[BHNotificationsItem alloc] init]; 66 | self.userActivityItem = [[BHUserActivityItem alloc] init]; 67 | self.backgroundItem = [[BHBackgroundItem alloc] init]; 68 | } 69 | 70 | return self; 71 | } 72 | 73 | - (instancetype)copyWithZone:(NSZone *)zone { 74 | BHContext *context = [[self.class allocWithZone:zone] init]; 75 | 76 | context.env = self.env; 77 | context.config = self.config; 78 | context.appkey = self.appkey; 79 | context.customEvent = self.customEvent; 80 | context.application = self.application; 81 | context.launchOptions = self.launchOptions; 82 | context.moduleConfigName = self.moduleConfigName; 83 | context.serviceConfigName = self.serviceConfigName; 84 | #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_8_4 85 | context.touchShortcutItem = self.touchShortcutItem; 86 | #endif 87 | context.openURLItem = self.openURLItem; 88 | context.notificationsItem = self.notificationsItem; 89 | context.userActivityItem = self.userActivityItem; 90 | context.customParam = self.customParam; 91 | 92 | return context; 93 | } 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /docs/html/Classes/BHAppDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHAppDelegate Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 67 | 68 |
69 |
70 |
71 |
72 |

BHAppDelegate Class Reference

73 | 74 | 75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
Inherits fromUIResponder
Conforms toUIApplicationDelegate
Declared inBHAppDelegate.h
87 | 88 | 89 | 90 | 91 |
92 | 93 |

Overview

94 |

Created by BeeHive. 95 | Copyright © 2016, Alibaba, Inc. All rights reserved.

96 | 97 |

This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 98 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.

99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
109 | 110 |
111 | 119 |
120 |
121 |
122 |
123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHServiceManager.md: -------------------------------------------------------------------------------- 1 | # BHServiceManager Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHServiceManager.h 5 | 6 | ## Overview 7 | 8 | Created by BeeHive. 9 | Copyright © 2016, Alibaba, Inc. All rights reserved. 10 | 11 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 12 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 13 | 14 | ## Tasks 15 | 16 | ### 17 | 18 | [  enableException](#//api/name/enableException) *property* 19 | 20 | [+ sharedManager](#//api/name/sharedManager) 21 | 22 | [– registerLocalServices](#//api/name/registerLocalServices) 23 | 24 | [– registerService:implClass:](#//api/name/registerService:implClass:) 25 | 26 | [– createService:](#//api/name/createService:) 27 | 28 | [– createService:withServiceName:](#//api/name/createService:withServiceName:) 29 | 30 | [– createService:withServiceName:shouldCache:](#//api/name/createService:withServiceName:shouldCache:) 31 | 32 | [– getServiceInstanceFromServiceName:](#//api/name/getServiceInstanceFromServiceName:) 33 | 34 | [– removeServiceWithServiceName:](#//api/name/removeServiceWithServiceName:) 35 | 36 | ## Properties 37 | 38 | 39 | ### enableException 40 | 41 | `@property (nonatomic, assign) BOOL enableException` 42 | 43 | 44 | ## Class Methods 45 | 46 | 47 | ### sharedManager 48 | 49 | `+ (instancetype)sharedManager` 50 | 51 | 52 | ## Instance Methods 53 | 54 | 55 | ### createService: 56 | 57 | `- (id)createService:(Protocol *)*service*` 58 | 59 | 60 | ### createService:withServiceName: 61 | 62 | `- (id)createService:(Protocol *)*service* withServiceName:(NSString *)*serviceName*` 63 | 64 | 65 | ### createService:withServiceName:shouldCache: 66 | 67 | `- (id)createService:(Protocol *)*service* withServiceName:(NSString *)*serviceName* shouldCache:(BOOL)*shouldCache*` 68 | 69 | 70 | ### getServiceInstanceFromServiceName: 71 | 72 | `- (id)getServiceInstanceFromServiceName:(NSString *)*serviceName*` 73 | 74 | 75 | ### registerLocalServices 76 | 77 | `- (void)registerLocalServices` 78 | 79 | 80 | ### registerService:implClass: 81 | 82 | `- (void)registerService:(Protocol *)*service* implClass:(Class)*implClass*` 83 | 84 | 85 | ### removeServiceWithServiceName: 86 | 87 | `- (void)removeServiceWithServiceName:(NSString *)*serviceName*` 88 | 89 | -------------------------------------------------------------------------------- /docs/markdown/Classes/MLSRouteRequest.md: -------------------------------------------------------------------------------- 1 | # MLSRouteRequest Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** MLSRouteRequest.h 5 | 6 | ## Overview 7 | 8 | MLSRouteRequest is a model representing a request to route a URL. 9 | It gets parsed into path components and query parameters, which are then used by MLSRouteDefinition to attempt a match. 10 | 11 | ## Tasks 12 | 13 | ### Other Methods 14 | 15 | [  URL](#//api/name/URL) *property* 16 | 17 | [  pathComponents](#//api/name/pathComponents) *property* 18 | 19 | [  queryParams](#//api/name/queryParams) *property* 20 | 21 | ### Creating Route Requests 22 | 23 | [– initWithURL:alwaysTreatsHostAsPathComponent:](#//api/name/initWithURL:alwaysTreatsHostAsPathComponent:) 24 | 25 | [– init](#//api/name/init) 26 | 27 | [+ new](#//api/name/new) 28 | 29 | ## Properties 30 | 31 | 32 | ### URL 33 | 34 | The URL being routed. 35 | 36 | `@property (nonatomic, strong, readonly) NSURL *URL` 37 | 38 | #### Declared In 39 | * `MLSRouteRequest.h` 40 | 41 | 42 | ### pathComponents 43 | 44 | The URL’s path components. 45 | 46 | `@property (nonatomic, strong, readonly) NSArray *pathComponents` 47 | 48 | #### Declared In 49 | * `MLSRouteRequest.h` 50 | 51 | 52 | ### queryParams 53 | 54 | The URL’s query parameters. 55 | 56 | `@property (nonatomic, strong, readonly) NSDictionary *queryParams` 57 | 58 | #### Declared In 59 | * `MLSRouteRequest.h` 60 | 61 | 62 | ## Class Methods 63 | 64 | 65 | ### new 66 | 67 | Unavailable, use initWithURL:alwaysTreatsHostAsPathComponent: instead. 68 | 69 | `+ (instancetype)new` 70 | 71 | #### Declared In 72 | * `MLSRouteRequest.h` 73 | 74 | 75 | ## Instance Methods 76 | 77 | 78 | ### init 79 | 80 | Unavailable, use initWithURL:alwaysTreatsHostAsPathComponent: instead. 81 | 82 | `- (instancetype)init` 83 | 84 | #### Declared In 85 | * `MLSRouteRequest.h` 86 | 87 | 88 | ### initWithURL:alwaysTreatsHostAsPathComponent: 89 | 90 | Creates a new route request. 91 | 92 | `- (instancetype)initWithURL:(NSURL *)*URL* alwaysTreatsHostAsPathComponent:(BOOL)*alwaysTreatsHostAsPathComponent*` 93 | 94 | #### Parameters 95 | 96 | *URL* 97 |    The URL to route. 98 | 99 | *alwaysTreatsHostAsPathComponent* 100 |    The global option for if to treat the URL host as a path component or not. 101 | 102 | #### Return Value 103 | The newly initialized route request. 104 | 105 | #### Declared In 106 | * `MLSRouteRequest.h` 107 | 108 | -------------------------------------------------------------------------------- /Classes/Moudle/BeeHive/BHAppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by BeeHive. 3 | * Copyright (c) 2016, Alibaba, Inc. All rights reserved. 4 | * 5 | * This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 6 | * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #import 10 | #import 11 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 12 | #import 13 | #endif 14 | 15 | 16 | @interface BHAppDelegate : UIResponder 17 | 18 | @end 19 | 20 | typedef void (^BHNotificationResultHandler)(UIBackgroundFetchResult); 21 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 22 | typedef void (^BHNotificationPresentationOptionsHandler)(UNNotificationPresentationOptions options) NS_AVAILABLE_IOS(10.0); 23 | typedef void (^BHNotificationCompletionHandler)(void); 24 | #endif 25 | 26 | @interface BHNotificationsItem : NSObject 27 | 28 | @property (nonatomic, strong) NSError *notificationsError; 29 | @property (nonatomic, strong) NSData *deviceToken; 30 | @property (nonatomic, strong) NSDictionary *userInfo; 31 | @property (nonatomic, copy) BHNotificationResultHandler notificationResultHander; 32 | @property (nonatomic, strong) UILocalNotification *localNotification; 33 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 34 | @property (nonatomic, strong) UNNotification *notification NS_AVAILABLE_IOS(10.0); 35 | @property (nonatomic, strong) UNNotificationResponse *notificationResponse NS_AVAILABLE_IOS(10.0); 36 | @property (nonatomic, copy) BHNotificationPresentationOptionsHandler notificationPresentationOptionsHandler NS_AVAILABLE_IOS(10.0); 37 | @property (nonatomic, copy) BHNotificationCompletionHandler notificationCompletionHandler NS_AVAILABLE_IOS(10.0); 38 | @property (nonatomic, strong) UNUserNotificationCenter *center NS_AVAILABLE_IOS(10.0); 39 | #endif 40 | 41 | @end 42 | 43 | @interface BHOpenURLItem : NSObject 44 | 45 | @property (nonatomic, strong) NSURL *openURL; 46 | @property (nonatomic, copy) NSString *sourceApplication; 47 | @property (nonatomic, strong) id annotation; 48 | @property (nonatomic, strong) NSDictionary *options; 49 | 50 | @end 51 | 52 | typedef void (^BHShortcutCompletionHandler)(BOOL); 53 | 54 | @interface BHShortcutItem : NSObject 55 | 56 | #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_8_4 57 | @property(nonatomic, strong) UIApplicationShortcutItem *shortcutItem NS_AVAILABLE_IOS(9.0); 58 | @property(nonatomic, copy) BHShortcutCompletionHandler scompletionHandler; 59 | #endif 60 | 61 | @end 62 | 63 | 64 | typedef void (^BHUserActivityRestorationHandler)(NSArray *); 65 | 66 | @interface BHUserActivityItem : NSObject 67 | 68 | @property (nonatomic, copy) NSString *userActivityType; 69 | @property (nonatomic, strong) NSUserActivity *userActivity; 70 | @property (nonatomic, strong) NSError *userActivityError; 71 | @property (nonatomic, copy) BHUserActivityRestorationHandler restorationHandler; 72 | 73 | @end 74 | 75 | typedef void (^BHWatchReplyHandler)(NSDictionary *replyInfo); 76 | 77 | @interface BHWatchItem : NSObject 78 | 79 | @property (nonatomic, strong) NSDictionary *userInfo; 80 | @property (nonatomic, copy) BHWatchReplyHandler replyHandler; 81 | 82 | @end 83 | 84 | typedef void (^BHBackgroundHandler)(void); 85 | @interface BHBackgroundItem : NSObject 86 | @property(nonatomic, copy) BHBackgroundHandler handler; 87 | @property(nonatomic, copy) NSString *sessionIdentifier; 88 | @end 89 | 90 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHConfig.md: -------------------------------------------------------------------------------- 1 | # BHConfig Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHConfig.h 5 | 6 | ## Overview 7 | 8 | Created by BeeHive. 9 | Copyright © 2016, Alibaba, Inc. All rights reserved. 10 | 11 | This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 12 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. 13 | 14 | ## Tasks 15 | 16 | ### 17 | 18 | [+ shareInstance](#//api/name/shareInstance) 19 | 20 | [+ get:](#//api/name/get:) 21 | 22 | [+ has:](#//api/name/has:) 23 | 24 | [+ add:](#//api/name/add:) 25 | 26 | [+ getAll](#//api/name/getAll) 27 | 28 | [+ stringValue:](#//api/name/stringValue:) 29 | 30 | [+ dictionaryValue:](#//api/name/dictionaryValue:) 31 | 32 | [+ integerValue:](#//api/name/integerValue:) 33 | 34 | [+ floatValue:](#//api/name/floatValue:) 35 | 36 | [+ boolValue:](#//api/name/boolValue:) 37 | 38 | [+ arrayValue:](#//api/name/arrayValue:) 39 | 40 | [+ set:value:](#//api/name/set:value:) 41 | 42 | [+ set:boolValue:](#//api/name/set:boolValue:) 43 | 44 | [+ set:integerValue:](#//api/name/set:integerValue:) 45 | 46 | [+ clear](#//api/name/clear) 47 | 48 | 49 | ## Class Methods 50 | 51 | 52 | ### add: 53 | 54 | `+ (void)add:(NSDictionary *)*parameters*` 55 | 56 | 57 | ### arrayValue: 58 | 59 | `+ (NSArray *)arrayValue:(NSString *)*key*` 60 | 61 | 62 | ### boolValue: 63 | 64 | `+ (BOOL)boolValue:(NSString *)*key*` 65 | 66 | 67 | ### clear 68 | 69 | `+ (void)clear` 70 | 71 | 72 | ### dictionaryValue: 73 | 74 | `+ (NSDictionary *)dictionaryValue:(NSString *)*key*` 75 | 76 | 77 | ### floatValue: 78 | 79 | `+ (float)floatValue:(NSString *)*key*` 80 | 81 | 82 | ### get: 83 | 84 | `+ (id)get:(NSString *)*key*` 85 | 86 | 87 | ### getAll 88 | 89 | `+ (NSMutableDictionary *)getAll` 90 | 91 | 92 | ### has: 93 | 94 | `+ (BOOL)has:(NSString *)*key*` 95 | 96 | 97 | ### integerValue: 98 | 99 | `+ (NSInteger)integerValue:(NSString *)*key*` 100 | 101 | 102 | ### set:boolValue: 103 | 104 | `+ (void)set:(NSString *)*key* boolValue:(BOOL)*value*` 105 | 106 | 107 | ### set:integerValue: 108 | 109 | `+ (void)set:(NSString *)*key* integerValue:(NSInteger)*value*` 110 | 111 | 112 | ### set:value: 113 | 114 | `+ (void)set:(NSString *)*key* value:(id)*value*` 115 | 116 | 117 | ### shareInstance 118 | 119 | `+ (instancetype)shareInstance` 120 | 121 | 122 | ### stringValue: 123 | 124 | `+ (NSString *)stringValue:(NSString *)*key*` 125 | 126 | -------------------------------------------------------------------------------- /docs/markdown/Classes/BHRouter.md: -------------------------------------------------------------------------------- 1 | # BHRouter Class Reference 2 | 3 |   **Inherits from** NSObject 4 |   **Declared in** BHRouter.h 5 | 6 | ## Tasks 7 | 8 | ### 9 | 10 | [– init](#//api/name/init) 11 | 12 | [+ new](#//api/name/new) 13 | 14 | [+ globalRouter](#//api/name/globalRouter) 15 | 16 | [+ routerForScheme:](#//api/name/routerForScheme:) 17 | 18 | [+ unRegisterRouterForScheme:](#//api/name/unRegisterRouterForScheme:) 19 | 20 | [+ unRegisterAllRouters](#//api/name/unRegisterAllRouters) 21 | 22 | [– addPathComponent:forClass:](#//api/name/addPathComponent:forClass:) 23 | 24 | [– addPathComponent:forClass:handler:](#//api/name/addPathComponent:forClass:handler:) 25 | 26 | [– removePathComponent:](#//api/name/removePathComponent:) 27 | 28 | [+ canOpenURL:](#//api/name/canOpenURL:) 29 | 30 | [+ openURL:](#//api/name/openURL:) 31 | 32 | [+ openURL:withParams:](#//api/name/openURL:withParams:) 33 | 34 | [+ openURL:withParams:andThen:](#//api/name/openURL:withParams:andThen:) 35 | 36 | 37 | ## Class Methods 38 | 39 | 40 | ### canOpenURL: 41 | 42 | `+ (BOOL)canOpenURL:(NSURL *)*URL*` 43 | 44 | 45 | ### globalRouter 46 | 47 | `+ (instancetype)globalRouter` 48 | 49 | 50 | ### new 51 | 52 | `+ (instancetype)new` 53 | 54 | 55 | ### openURL: 56 | 57 | `+ (BOOL)openURL:(NSURL *)*URL*` 58 | 59 | 60 | ### openURL:withParams: 61 | 62 | `+ (BOOL)openURL:(NSURL *)*URL* withParams:(NSDictionary<NSString*,NSDictionary<NSString*,id> *> *)*params*` 63 | 64 | 65 | ### openURL:withParams:andThen: 66 | 67 | `+ (BOOL)openURL:(NSURL *)*URL* withParams:(NSDictionary<NSString*,NSDictionary<NSString*,id> *> *)*params* andThen:(void ( ^ ) ( NSString *pathComponentKey , id obj , id returnValue ))*then*` 68 | 69 | 70 | ### routerForScheme: 71 | 72 | `+ (instancetype)routerForScheme:(NSString *)*scheme*` 73 | 74 | 75 | ### unRegisterAllRouters 76 | 77 | `+ (void)unRegisterAllRouters` 78 | 79 | 80 | ### unRegisterRouterForScheme: 81 | 82 | `+ (void)unRegisterRouterForScheme:(NSString *)*scheme*` 83 | 84 | 85 | ## Instance Methods 86 | 87 | 88 | ### addPathComponent:forClass: 89 | 90 | `- (void)addPathComponent:(NSString *)*pathComponentKey* forClass:(Class)*mClass*` 91 | 92 | 93 | ### addPathComponent:forClass:handler: 94 | 95 | `- (void)addPathComponent:(NSString *)*pathComponentKey* forClass:(Class)*mClass* handler:(BHRPathComponentCustomHandler)*handler*` 96 | 97 | 98 | ### init 99 | 100 | `- (instancetype)init` 101 | 102 | 103 | ### removePathComponent: 104 | 105 | `- (void)removePathComponent:(NSString *)*pathComponentKey*` 106 | 107 | -------------------------------------------------------------------------------- /Classes/Route/Core/Protocol/MLSRouteControlProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLSRouteControlProtocol.h 3 | // MLSModuleCenter 4 | // 5 | // Created by MinLison on 2019/2/26. 6 | // 7 | 8 | #ifndef MLSRouteControlProtocol_h 9 | #define MLSRouteControlProtocol_h 10 | #import "MLSRoutes.h" 11 | NS_ASSUME_NONNULL_BEGIN 12 | @protocol MLSRouteControlProtocol 13 | 14 | /** 15 | 配置路由协议, 可自定义配置, 默认 bundleID 16 | */ 17 | @property (nonatomic, copy) NSString *routeScheme; 18 | 19 | /** 20 | 注册控制器 21 | 22 | @param routePattern 路由地址 23 | @param scheme urlScheme, 默认是 innerApp 24 | @param handlerClass 接收路由的 Class 25 | */ 26 | - (void)addRoute:(NSString *)routePattern scheme:(nullable NSString *)scheme handlerClass:(Class)handlerClass; 27 | - (void)addRoute:(NSString *)routePattern handlerClass:(Class)handlerClass; 28 | 29 | /** 30 | 注册路由 31 | 32 | @param routePattern 路由地址 33 | @param scheme urlScheme, 默认是 innerApp 34 | @param handlerBlock 回调 35 | */ 36 | - (void)addRoute:(NSString *)routePattern scheme:(nullable NSString *)scheme handler:(nullable MLSRouteHandlerParamsCallBackBlock)handlerBlock; 37 | - (void)addRoute:(NSString *)routePattern handler:(nullable MLSRouteHandlerParamsCallBackBlock)handlerBlock; 38 | 39 | /** 40 | 移除注册路由 41 | 42 | @param routePattern 路由正则 43 | */ 44 | - (void)removeRoute:(nullable NSString *)routePattern; 45 | - (void)removeRoute:(nullable NSString *)routePattern forScheme:(nullable NSString *)scheme; 46 | 47 | /** 48 | 打开路由地址 49 | 也可调用 [[UIApplication sharedApplication] openURL:url]; 50 | @param routeURL 路由地址 51 | */ 52 | - (BOOL)routeURL:(NSURL *)routeURL; 53 | 54 | /** 55 | 打开路由地址 56 | 57 | @param routeURL 路由地址 58 | @param paramters 附加参数, 最终会回调给 handleObj 59 | */ 60 | - (BOOL)routeURL:(NSURL *)routeURL withParameters:(nullable NSDictionary *)paramters; 61 | 62 | /** 63 | 打开路由地址 64 | 65 | @param routeURL 路由地址 66 | @param handlerBlock 回调函数 67 | @return 是否打开成功 68 | */ 69 | - (BOOL)routeURL:(NSURL *)routeURL handler:(nullable MLSRouteHandleTargetCallBackBlock)handlerBlock; 70 | 71 | /** 72 | 打开路由地址 73 | 74 | @param routeURL 路由地址 75 | @param parameters 回调函数 76 | @param handlerBlock 是否打开成功 77 | */ 78 | - (BOOL)routeURL:(NSURL *)routeURL withParameters:(nullable NSDictionary *)parameters handler:(nullable MLSRouteHandleTargetCallBackBlock)handlerBlock; 79 | 80 | /// 获取路由结果对象 81 | /// @param routeURL 路由地址 82 | /// @param parameters 路由参数 83 | - (id)routeObjForURL:(NSURL *)routeURL withParameters:(nullable NSDictionary *)parameters; 84 | 85 | /** 86 | 是否可以打开该地址 87 | 88 | @param routeUrl 路由地址 89 | @return YES/NO 90 | */ 91 | - (BOOL)canHandleUrl:(NSURL *)routeUrl; 92 | 93 | /** 94 | * 调用此方法来拼接 urlpattern 和 parameters 95 | * 96 | * 97 | * @param scheme UrlScheme 默认 routeScheme 98 | * @param pattern url pattern 比如 @"beauty/:id" 99 | * @param patternParamters 一个数组,数量要跟 pattern 里的变量一致 100 | * @param queryParameters 一个字典,query取值 101 | * 102 | * @return 返回生成的URL String 103 | */ 104 | - (NSURL *)generateURLWithScheme:(nullable NSString *)scheme pattern:(nullable NSString *)pattern patternParamters:(nullable NSArray *)patternParamters queryParameters:(nullable NSDictionary *)queryParameters; 105 | - (NSURL *)generateURLWithScheme:(nullable NSString *)scheme pattern:(nullable NSString *)pattern patternParamters:(nullable NSArray *)patternParamters; 106 | - (NSURL *)generateURLWithScheme:(nullable NSString *)scheme queryParameters:(nullable NSDictionary *)queryParameters; 107 | 108 | - (NSURL *)generateURLWithPattern:(nullable NSString *)pattern patternParamters:(nullable NSArray *)patternParamters queryParameters:(nullable NSDictionary *)queryParameters; 109 | - (NSURL *)generateURLWithPattern:(nullable NSString *)pattern patternParamters:(nullable NSArray *)patternParamters; 110 | - (NSURL *)generateURLWithQueryParameters:(nullable NSDictionary *)queryParameters; 111 | @end 112 | 113 | #endif /* MLSRouteControlProtocol_h */ 114 | NS_ASSUME_NONNULL_END 115 | -------------------------------------------------------------------------------- /docs/html/Classes/BHWatchItem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHWatchItem Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 75 | 76 |
77 |
78 |
79 |
80 |

BHWatchItem Class Reference

81 | 82 | 83 |
84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
Inherits fromNSObject
Declared inBHAppDelegate.h
92 | 93 | 94 | 95 | 96 | 97 | 98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 |
106 |
107 | 108 |

  userInfo 109 |

110 | 111 |
112 |
113 | 114 |
115 | 116 | 117 |
@property (nonatomic, strong) NSDictionary *userInfo
118 | 119 | 120 |
121 |
122 |
123 | 124 |

  replyHandler 125 |

126 | 127 |
128 |
129 | 130 |
131 | 132 | 133 |
@property (nonatomic, copy) BHWatchReplyHandler replyHandler
134 | 135 | 136 |
137 |
138 |
139 |
140 | 141 |
142 | 143 | 144 | 145 | 146 |
147 | 148 |
149 | 157 |
158 |
159 |
160 |
161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /docs/html/Classes/BHBackgroundItem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHBackgroundItem Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 75 | 76 |
77 |
78 |
79 |
80 |

BHBackgroundItem Class Reference

81 | 82 | 83 |
84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
Inherits fromNSObject
Declared inBHAppDelegate.h
92 | 93 | 94 | 95 | 96 | 97 | 98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 |
106 |
107 | 108 |

  handler 109 |

110 | 111 |
112 |
113 | 114 |
115 | 116 | 117 |
@property (nonatomic, copy) BHBackgroundHandler handler
118 | 119 | 120 |
121 |
122 |
123 | 124 |

  sessionIdentifier 125 |

126 | 127 |
128 |
129 | 130 |
131 | 132 | 133 |
@property (nonatomic, copy) NSString *sessionIdentifier
134 | 135 | 136 |
137 |
138 |
139 |
140 | 141 |
142 | 143 | 144 | 145 | 146 |
147 | 148 |
149 | 157 |
158 |
159 |
160 |
161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /docs/html/Classes/BHShortcutItem.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHShortcutItem Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 75 | 76 |
77 |
78 |
79 |
80 |

BHShortcutItem Class Reference

81 | 82 | 83 |
84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
Inherits fromNSObject
Declared inBHAppDelegate.h
92 | 93 | 94 | 95 | 96 | 97 | 98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 |
106 |
107 | 108 |

  ) 109 |

110 | 111 |
112 |
113 | 114 |
115 | 116 | 117 |
@property (nonatomic, strong) UIApplicationShortcutItem *NS_AVAILABLE_IOS ( 9.0 )
118 | 119 | 120 |
121 |
122 |
123 | 124 |

  scompletionHandler 125 |

126 | 127 |
128 |
129 | 130 |
131 | 132 | 133 |
@property (nonatomic, copy) BHShortcutCompletionHandler scompletionHandler
134 | 135 | 136 |
137 |
138 |
139 |
140 | 141 |
142 | 143 | 144 | 145 | 146 |
147 | 148 |
149 | 157 |
158 |
159 |
160 |
161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /docs/html/Classes/BHWatchDog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BHWatchDog Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | MLSModuleCenter 18 |

19 | 20 |

21 | MinLison 22 |

23 | 24 |
25 |
26 | 27 | 75 | 76 |
77 |
78 |
79 |
80 |

BHWatchDog Class Reference

81 | 82 | 83 |
84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
Inherits fromNSObject
Declared inBHWatchDog.h
92 | 93 | 94 | 95 | 96 |
97 | 98 |

Overview

99 |

Created by BeeHive. 100 | Copyright © 2016, Alibaba, Inc. All rights reserved.

101 | 102 |

This source code is licensed under the GNU GENERAL PUBLIC LICENSE. 103 | For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.

104 |
105 | 106 | 107 | 108 | 109 | 110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 |
118 |
119 | 120 |

– initWithThreshold:strictMode: 121 |

122 | 123 |
124 |
125 | 126 |
127 | 128 | 129 |
- (instancetype)initWithThreshold:(double)threshold strictMode:(BOOL)strictMode
130 | 131 | 132 |
133 |
134 |
135 |
136 | 137 |
138 | 139 | 140 | 141 | 142 |
143 | 144 |
145 | 153 |
154 |
155 |
156 |
157 | 158 | 159 | 160 | --------------------------------------------------------------------------------