├── .gitignore ├── ACRouter.podspec ├── ACRouter ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── ACCommonExtension.swift │ ├── ACRouter+Convenience.swift │ ├── ACRouter+Jump.swift │ ├── ACRouter.swift │ ├── ACRouterInterceptor.swift │ ├── ACRouterParser.swift │ ├── ACRouterPattern.swift │ ├── ACRouterRequest.swift │ └── ACRouterable.swift ├── Example ├── ACRouter.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── ACRouter-Example.xcscheme ├── ACRouter.xcworkspace │ └── contents.xcworkspacedata ├── ACRouter │ ├── AppDelegate.swift │ ├── AuthorizationCenter.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── DemoTableView.swift │ ├── ErrorPageViewController.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── avatar.imageset │ │ │ ├── 30726168_1390202384007_800x800.jpg │ │ │ └── Contents.json │ │ └── error.imageset │ │ │ ├── Contents.json │ │ │ ├── illustration_error_none_default@2x.png │ │ │ └── illustration_error_none_default@3x.png │ ├── Info.plist │ ├── LoginViewController.swift │ ├── ProfileViewController.swift │ ├── RouterManger.swift │ └── ViewController.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── ACRouter.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── ACRouter │ │ ├── ACRouter-dummy.m │ │ ├── ACRouter-prefix.pch │ │ ├── ACRouter-umbrella.h │ │ ├── ACRouter.modulemap │ │ ├── ACRouter.xcconfig │ │ └── Info.plist │ │ ├── Pods-ACRouter_Example │ │ ├── Info.plist │ │ ├── Pods-ACRouter_Example-acknowledgements.markdown │ │ ├── Pods-ACRouter_Example-acknowledgements.plist │ │ ├── Pods-ACRouter_Example-dummy.m │ │ ├── Pods-ACRouter_Example-frameworks.sh │ │ ├── Pods-ACRouter_Example-resources.sh │ │ ├── Pods-ACRouter_Example-umbrella.h │ │ ├── Pods-ACRouter_Example.debug.xcconfig │ │ ├── Pods-ACRouter_Example.modulemap │ │ └── Pods-ACRouter_Example.release.xcconfig │ │ └── Pods-ACRouter_Tests │ │ ├── Info.plist │ │ ├── Pods-ACRouter_Tests-acknowledgements.markdown │ │ ├── Pods-ACRouter_Tests-acknowledgements.plist │ │ ├── Pods-ACRouter_Tests-dummy.m │ │ ├── Pods-ACRouter_Tests-frameworks.sh │ │ ├── Pods-ACRouter_Tests-resources.sh │ │ ├── Pods-ACRouter_Tests-umbrella.h │ │ ├── Pods-ACRouter_Tests.debug.xcconfig │ │ ├── Pods-ACRouter_Tests.modulemap │ │ └── Pods-ACRouter_Tests.release.xcconfig └── Tests │ ├── Info.plist │ └── Tests.swift ├── Images └── process.jpg ├── LICENSE ├── Notes.md ├── README.md ├── README_CN.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | settings.json 67 | -------------------------------------------------------------------------------- /ACRouter.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint ACRouter.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'ACRouter' 11 | s.version = '0.1.0' 12 | s.summary = 'A simple router for swift' 13 | s.homepage = 'https://github.com/Archerlly/ACRouter' 14 | s.license = { :type => 'MIT', :file => 'LICENSE' } 15 | s.author = { 'Archerlly' => '2302693080@qq.com' } 16 | s.source = { :git => 'https://github.com/Archerlly/ACRouter.git', :tag => s.version.to_s } 17 | 18 | s.ios.deployment_target = '8.0' 19 | s.source_files = 'ACRouter/Classes/**/*' 20 | s.requires_arc = true 21 | 22 | end 23 | -------------------------------------------------------------------------------- /ACRouter/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Archerlly/ACRouter/687103c4c85c12eca2e2f4fb5c1efef45cc57dc8/ACRouter/Assets/.gitkeep -------------------------------------------------------------------------------- /ACRouter/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Archerlly/ACRouter/687103c4c85c12eca2e2f4fb5c1efef45cc57dc8/ACRouter/Classes/.gitkeep -------------------------------------------------------------------------------- /ACRouter/Classes/ACCommonExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ACCommonExtension.swift 3 | // Pods 4 | // 5 | // Created by SnowCheng on 14/03/2017. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | extension String { 12 | public func ac_dropFirst(_ count: Int) -> String { 13 | // String.init(describing: utf8.dropFirst(count)) 14 | return substring(from: index(startIndex, offsetBy: count)) 15 | } 16 | 17 | public func ac_dropLast(_ count: Int) -> String { 18 | return substring(to: index(endIndex, offsetBy: -count)) 19 | } 20 | 21 | public func ac_matchClass() -> AnyClass?{ 22 | 23 | if var appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String { 24 | 25 | if appName == "" { 26 | appName = ((Bundle.main.bundleIdentifier!).characters.split{$0 == "."}.map { String($0) }).last ?? "" 27 | } 28 | 29 | var clsStr = self 30 | 31 | if !clsStr.contains("\(appName)."){ 32 | clsStr = appName + "." + clsStr 33 | } 34 | 35 | let strArr = clsStr.components(separatedBy: ".") 36 | 37 | var className = "" 38 | 39 | let num = strArr.count 40 | 41 | if num > 2 || strArr.contains(appName) { 42 | var nameStringM = "_TtC" + String(repeating: "C", count: num - 2) 43 | 44 | for (_, s): (Int, String) in strArr.enumerated(){ 45 | 46 | nameStringM += "\(s.characters.count)\(s)" 47 | } 48 | 49 | className = nameStringM 50 | 51 | } else { 52 | 53 | className = clsStr 54 | } 55 | 56 | return NSClassFromString(className) 57 | } 58 | 59 | return nil; 60 | } 61 | } 62 | 63 | extension Dictionary { 64 | mutating func ac_combine(_ dict: Dictionary) { 65 | var tem = self 66 | dict.forEach({ (key, value) in 67 | if let existValue = tem[key] { 68 | //combine same name query 69 | if let arrValue = existValue as? [Value] { 70 | tem[key] = (arrValue + [value]) as? Value 71 | } else { 72 | tem[key] = ([existValue, value]) as? Value 73 | } 74 | } else { 75 | tem[key] = value 76 | } 77 | }) 78 | self = tem 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /ACRouter/Classes/ACRouter+Convenience.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ACRouter+Convenience.swift 3 | // Pods 4 | // 5 | // Created by SnowCheng on 13/03/2017. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | public extension ACRouter { 12 | 13 | /// addRouter with parasing the dictionary, the class which match the className need inherit the protocol of ACRouterable 14 | /// 15 | /// - Parameter dictionary: [patternString: className] 16 | public class func addRouter(_ dictionary: [String: String]) { 17 | dictionary.forEach { (key: String, value: String) in 18 | addRouter(key, classString: value) 19 | } 20 | } 21 | 22 | 23 | /// convienience addrouter with className 24 | /// 25 | /// - Parameters: 26 | /// - patternString: register urlstring 27 | /// - classString: the class which match the className need inherit the protocol of ACRouterable 28 | public class func addRouter(_ patternString: String, classString: String) { 29 | let clz: AnyClass? = classString.ac_matchClass() 30 | if let routerable = clz as? ACRouterable.Type { 31 | self.addRouter(patternString, handle: routerable.registerAction) 32 | } else { 33 | print("register router error: \(patternString)") 34 | } 35 | } 36 | 37 | 38 | /// addRouter 39 | /// 40 | /// - Parameters: 41 | /// - patternString: register urlstring 42 | /// - priority: match priority, sort by inverse order 43 | /// - handle: block of refister URL 44 | public class func addRouter(_ patternString: String, priority: uint = 0, handle: @escaping ACRouterPattern.HandleBlock) { 45 | shareInstance.addRouter(patternString, priority: priority, handle: handle) 46 | } 47 | 48 | 49 | /// addRouter 50 | /// 51 | /// - Parameters: 52 | /// - whiteList: whiteList for intercept 53 | /// - priority: match priority, sort by inverse order 54 | /// - handle: block of interception 55 | public class func addInterceptor(_ whiteList: [String] = [String](), priority: uint = 0, handle: @escaping ACRouterInterceptor.InterceptorHandleBlock) { 56 | shareInstance.addInterceptor(whiteList, priority: priority, handle: handle) 57 | } 58 | 59 | 60 | /// addFailedHandel 61 | public class func addGlobalMatchFailedHandel(_ handel: @escaping FailedHandleBlock) { 62 | shareInstance.addGlobalMatchFailedHandel(handel) 63 | } 64 | 65 | 66 | /// addRelocation 67 | public class func addRelocationHandle(_ handel: @escaping RelocationHandleBlock) { 68 | shareInstance.addRelocationHandle(handel) 69 | } 70 | 71 | 72 | /// removeRouter by register urlstring 73 | /// 74 | /// - Parameter patternString: register urlstring 75 | public class func removeRouter(_ patternString: String) { 76 | shareInstance.removeRouter(patternString) 77 | } 78 | 79 | 80 | /// Check whether register for url 81 | /// 82 | /// - Parameter urlString: real request urlstring 83 | /// - Returns: whether register 84 | public class func canOpenURL(_ urlString: String) -> Bool { 85 | return shareInstance.canOpenURL(urlString) 86 | } 87 | 88 | 89 | /// request for url 90 | /// 91 | /// - Parameters: 92 | /// - urlString: real request urlstring 93 | /// - userInfo: custom userInfo, could contain Object 94 | /// - Returns: response for request, contain pattern and queries 95 | public class func requestURL(_ urlString: String, userInfo: [String: AnyObject] = [String: AnyObject]()) -> RouteResponse { 96 | return shareInstance.requestURL(urlString, userInfo: userInfo) 97 | } 98 | 99 | } 100 | 101 | 102 | // constants 103 | public extension ACRouter { 104 | static let patternKey = "ac_patternKey" 105 | static let requestURLKey = "ac_requestURLKey" 106 | static let matchFailedKey = "ac_matchFailedKey" 107 | } 108 | -------------------------------------------------------------------------------- /ACRouter/Classes/ACRouter+Jump.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ACRouter+Jump.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 12/03/2017. 6 | // Copyright © 2017 Archerlly. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | 12 | //extension of viewcontroller jump for ACRouter 13 | extension ACRouter { 14 | 15 | // MARK: - Constants 16 | static let ACJumpTypeKey = "ACJumpTypeKey" 17 | public enum ACJumpType: String { 18 | case modal = "ACJumpTypeModal" 19 | case represent = "ACJumpTypeRepresent" 20 | } 21 | 22 | // MARK: - Convenience method 23 | public class func generate(_ patternString: String, params: [String: String] = [String: String](), jumpType: ACJumpType) -> String { 24 | 25 | var urlString = patternString 26 | var queries = params 27 | 28 | let paths = ACRouter.parserPaths(patternString) 29 | paths 30 | .filter{$0.contains(":")} 31 | .forEach { conponent in 32 | let key = conponent.ac_dropFirst(1) 33 | if let value = queries[key] , 34 | let range = urlString.range(of: conponent) { 35 | urlString.replaceSubrange(range, with: value) 36 | queries.removeValue(forKey: key) 37 | } 38 | } 39 | queries[ACJumpTypeKey] = jumpType.rawValue 40 | 41 | let queryString = queries.map{ "\($0.key)=\($0.value)" }.joined(separator: "&") 42 | return urlString + "?" + queryString 43 | } 44 | 45 | // MARK: - Public method 46 | public class func openURL(_ urlString: String, userInfo: [String: AnyObject] = [String: AnyObject]()) { 47 | 48 | let response = ACRouter.requestURL(urlString, userInfo: userInfo) 49 | let instance = response.pattern?.handle(response.queries) 50 | let queries = response.queries 51 | 52 | guard 53 | let typeString = queries[ACJumpTypeKey] as? String, 54 | let jumpType = ACJumpType.init(rawValue: typeString), 55 | let vc = instance as? UIViewController else { 56 | return 57 | } 58 | 59 | switch jumpType { 60 | case .modal: 61 | modal(vc) 62 | case .represent: 63 | push(vc) 64 | } 65 | 66 | } 67 | 68 | class func push(_ vc: UIViewController) { 69 | ac_getTopViewController(nil)?.navigationController?.pushViewController(vc, animated: true) 70 | } 71 | 72 | class func modal(_ vc: UIViewController) { 73 | ac_getTopViewController(nil)?.present(vc, animated: true, completion: nil) 74 | } 75 | 76 | // MARK: - Private method 77 | private class func ac_getTopViewController(_ currentVC: UIViewController?) -> UIViewController? { 78 | 79 | guard let rootVC = UIApplication.shared.keyWindow?.rootViewController else { 80 | print("rootViewController is nil") 81 | return nil 82 | } 83 | let topVC = currentVC ?? rootVC 84 | 85 | switch topVC { 86 | case is UITabBarController: 87 | if let top = (topVC as! UITabBarController).selectedViewController { 88 | return ac_getTopViewController(top) 89 | } else { 90 | return nil 91 | } 92 | 93 | case is UINavigationController: 94 | if let top = (topVC as! UINavigationController).topViewController { 95 | return ac_getTopViewController(top) 96 | } else { 97 | return nil 98 | } 99 | 100 | default: 101 | return topVC.presentedViewController ?? topVC 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /ACRouter/Classes/ACRouter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ACRouter.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 11/03/2017. 6 | // Copyright © 2017 Archerlly. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class ACRouter: ACRouterParser { 12 | // MARK: - Constants 13 | public typealias FailedHandleBlock = ([String: AnyObject]) -> Void 14 | public typealias RelocationHandleBlock = (String) -> String? 15 | public typealias RouteResponse = (pattern: ACRouterPattern?, queries: [String: AnyObject]) 16 | public typealias MatchResult = (matched: Bool, queries: [String: AnyObject]) 17 | 18 | // MARK: - Private property 19 | private var patterns = [ACRouterPattern]() 20 | 21 | private var interceptors = [ACRouterInterceptor]() 22 | 23 | private var relocationHandle: RelocationHandleBlock? 24 | 25 | private var matchFailedHandle: FailedHandleBlock? 26 | 27 | // MARK: - Public property 28 | static let shareInstance = ACRouter() 29 | 30 | // MARK: - Public method 31 | func addRouter(_ patternString: String, 32 | priority: uint = 0, 33 | handle: @escaping ACRouterPattern.HandleBlock) { 34 | let pattern = ACRouterPattern.init(patternString, priority: priority, handle: handle) 35 | patterns.append(pattern) 36 | patterns.sort { $0.priority > $1.priority } 37 | } 38 | 39 | func addInterceptor(_ whiteList: [String] = [String](), 40 | priority: uint = 0, 41 | handle: @escaping ACRouterInterceptor.InterceptorHandleBlock) { 42 | let interceptor = ACRouterInterceptor.init(whiteList, priority: priority, handle: handle) 43 | interceptors.append(interceptor) 44 | interceptors.sort { $0.priority > $1.priority } 45 | } 46 | 47 | func addGlobalMatchFailedHandel(_ handel: @escaping FailedHandleBlock) { 48 | matchFailedHandle = handel 49 | } 50 | 51 | func addRelocationHandle(_ handel: @escaping RelocationHandleBlock) { 52 | relocationHandle = handel 53 | } 54 | 55 | func removeRouter(_ patternString: String) { 56 | patterns = patterns.filter{ $0.patternString != patternString } 57 | } 58 | 59 | func canOpenURL(_ urlString: String) -> Bool { 60 | return ac_matchURL(urlString).pattern != nil 61 | } 62 | 63 | func requestURL(_ urlString: String, userInfo: [String: AnyObject] = [String: AnyObject]()) -> RouteResponse { 64 | return ac_matchURL(urlString, userInfo: userInfo) 65 | } 66 | 67 | // MARK: - Private method 68 | private func ac_matchURL(_ urlString: String, userInfo: [String: AnyObject] = [String: AnyObject]()) -> RouteResponse { 69 | let request = ACRouterRequest.init(urlString) 70 | var queries = request.queries 71 | var matched: ACRouterPattern? 72 | 73 | if let patternString = relocationHandle?(urlString), 74 | let firstMatched = patterns.filter({ $0.patternString == patternString }).first { 75 | 76 | //relocation 77 | matched = firstMatched 78 | 79 | } else { 80 | 81 | //filter the scheme and the count of paths not matched 82 | let matchedPatterns = patterns.filter{ $0.sheme == request.sheme && $0.patternPaths.count == request.paths.count } 83 | for pattern in matchedPatterns { 84 | 85 | let result = ac_matchPattern(request, pattern: pattern) 86 | if result.matched { 87 | matched = pattern 88 | queries.ac_combine(result.queries) 89 | break 90 | } 91 | 92 | } 93 | } 94 | 95 | guard let currentPattern = matched else { 96 | //not matched 97 | var info = [ACRouter.matchFailedKey : urlString as AnyObject] 98 | info.ac_combine(userInfo) 99 | matchFailedHandle?(info) 100 | 101 | print("not matched: \(urlString)") 102 | return (nil, [String: AnyObject]()) 103 | } 104 | 105 | guard ac_intercept(currentPattern.patternString, queries: queries) else { 106 | print("interceped: \(urlString)") 107 | return (nil, [String: AnyObject]()) 108 | } 109 | 110 | queries.ac_combine([ACRouter.requestURLKey : urlString as AnyObject]) 111 | queries.ac_combine(userInfo) 112 | 113 | return (currentPattern, queries) 114 | } 115 | 116 | private func ac_matchPattern(_ request: ACRouterRequest, pattern: ACRouterPattern) -> MatchResult { 117 | 118 | var requestPaths = request.paths 119 | var pathQuery = [String: AnyObject]() 120 | //replace params 121 | pattern.paramsMatchDict.forEach({ (name, index) in 122 | let requestPathQueryValue = requestPaths[index] as AnyObject 123 | pathQuery[name] = requestPathQueryValue 124 | requestPaths[index] = ACRouterPattern.PatternPlaceHolder 125 | }) 126 | 127 | let matchString = requestPaths.joined(separator: "/") 128 | if matchString == pattern.matchString { 129 | return (true, pathQuery) 130 | } else { 131 | return (false, [String: AnyObject]()) 132 | } 133 | 134 | } 135 | 136 | //Intercep the request and return whether should continue 137 | private func ac_intercept(_ matchedPatternString: String, queries: [String: AnyObject]) -> Bool { 138 | 139 | for interceptor in self.interceptors where !interceptor.whiteList.contains(matchedPatternString) { 140 | if !interceptor.handle(queries) { 141 | //interceptor handle return true will continue interceptor 142 | return false 143 | } 144 | } 145 | 146 | return true 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /ACRouter/Classes/ACRouterInterceptor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ACRouterInterceptor.swift 3 | // Pods 4 | // 5 | // Created by SnowCheng on 18/03/2017. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | public class ACRouterInterceptor: NSObject { 12 | 13 | public typealias InterceptorHandleBlock = ([String: AnyObject]) -> Bool 14 | 15 | var priority: uint 16 | var whiteList: [String] 17 | var handle: InterceptorHandleBlock 18 | 19 | init(_ whiteList: [String], 20 | priority: uint, 21 | handle: @escaping InterceptorHandleBlock) { 22 | 23 | self.whiteList = whiteList 24 | self.priority = priority 25 | self.handle = handle 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /ACRouter/Classes/ACRouterParser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ACRouterParser.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 10/03/2017. 6 | // Copyright © 2017 Archerlly. All rights reserved. 7 | 8 | import Foundation 9 | 10 | protocol ACRouterParser { 11 | 12 | typealias ParserResult = (paths: [String], queries: [String: AnyObject]) 13 | //不做百分号转义 14 | static func parser(_ url: URL) -> ParserResult 15 | static func parserSheme(_ url: URL) -> String 16 | static func parserPaths(_ url: URL) -> [String] 17 | static func parserQuerys(_ url: URL) -> [String: AnyObject] 18 | //做百分号转义 19 | static func parser(_ urlString: String) -> ParserResult 20 | static func parserSheme(_ urlString: String) -> String 21 | static func parserPaths(_ urlString: String) -> [String] 22 | static func parserQuerys(_ urlString: String) -> [String: AnyObject] 23 | } 24 | 25 | extension ACRouterParser { 26 | 27 | static func parser(_ url: URL) -> ParserResult { 28 | let paths = parserPaths(url) 29 | let query = parserQuerys(url) 30 | return (paths, query) 31 | } 32 | 33 | static func parserSheme(_ url: URL) -> String { 34 | return url.scheme ?? "" 35 | } 36 | 37 | static func parserPaths(_ url: URL) -> [String] { 38 | guard let components = URLComponents(url: url, resolvingAgainstBaseURL: true) else { 39 | print("url parser paths error") 40 | return [String]() 41 | } 42 | let paths = ac_parserPath(components) 43 | return paths 44 | } 45 | 46 | static func parserQuerys(_ url: URL) -> [String: AnyObject] { 47 | guard let components = URLComponents(url: url, resolvingAgainstBaseURL: true) else { 48 | print("url parser queries error") 49 | return [String: AnyObject]() 50 | } 51 | let query = ac_parserQuery(components) 52 | return (query as [String : AnyObject]) 53 | } 54 | 55 | static func parser(_ urlString: String) -> ParserResult { 56 | let paths = parserPaths(urlString) 57 | let queries = parserQuerys(urlString) 58 | return (paths, queries) 59 | } 60 | 61 | static func parserSheme(_ urlString: String) -> String { 62 | if let url = ac_checkInvaild(urlString) { 63 | return url.scheme ?? "" 64 | } 65 | return "" 66 | } 67 | 68 | static func parserPaths(_ urlString: String) -> [String] { 69 | var paths = [String]() 70 | 71 | urlString.components(separatedBy: "#").forEach { componentString in 72 | if let url = ac_checkInvaild(componentString) { 73 | let result = parserPaths(url) 74 | paths += result 75 | } 76 | } 77 | return paths 78 | } 79 | 80 | static func parserQuerys(_ urlString: String) -> [String: AnyObject] { 81 | var queries = [String: AnyObject]() 82 | 83 | urlString.components(separatedBy: "#").forEach { componentString in 84 | if let url = ac_checkInvaild(componentString) { 85 | let result = parserQuerys(url) 86 | queries.ac_combine(result) 87 | } 88 | } 89 | return queries 90 | } 91 | 92 | ///解析Path (paths include the host) 93 | private static func ac_parserPath(_ components: URLComponents) -> [String] { 94 | 95 | var paths = [String]() 96 | 97 | //check host 98 | if let host = components.host, host.characters.count > 0 { 99 | paths.append(host) 100 | } 101 | 102 | //check path 103 | var path = components.path 104 | if path.characters.count > 0 { 105 | let pathComponents = path.components(separatedBy: "/").filter{ $0.characters.count > 0} 106 | paths += pathComponents 107 | } 108 | 109 | return paths 110 | } 111 | 112 | /// 解析Query 113 | private static func ac_parserQuery(_ components: URLComponents) -> [String: String] { 114 | 115 | guard let items = components.queryItems, 116 | items.count > 0 else { 117 | print("query item count equal to zero: \(components.string ?? "")") 118 | return [String: String]() 119 | } 120 | 121 | var queries = [String: String]() 122 | items.forEach { (item) in 123 | if let value = item.value { 124 | queries[item.name] = value 125 | } else { 126 | print("\(components.string ?? ""): query name = \(item.name)") 127 | } 128 | } 129 | 130 | return queries 131 | } 132 | 133 | /// 检查URL 134 | private static func ac_checkInvaild(_ urlString: String) -> URL? { 135 | 136 | let urlString = urlString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed) 137 | guard let encodeString = urlString, encodeString.characters.count > 0 else { 138 | print("urlString is null") 139 | return nil 140 | } 141 | 142 | guard let url = URL.init(string: encodeString) else { 143 | print("invaild urlString to parser -> \(urlString)") 144 | return nil 145 | } 146 | 147 | return url 148 | } 149 | } 150 | 151 | -------------------------------------------------------------------------------- /ACRouter/Classes/ACRouterPattern.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ACRouterPattern.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 11/03/2017. 6 | // Copyright © 2017 Archerlly. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class ACRouterPattern: ACRouterParser { 12 | 13 | public typealias HandleBlock = ([String: AnyObject]) -> AnyObject? 14 | static let PatternPlaceHolder = "~AC~" 15 | 16 | var patternString: String 17 | var sheme: String 18 | var patternPaths: [String] 19 | var priority: uint 20 | var handle: HandleBlock 21 | var matchString: String 22 | var paramsMatchDict: [String: Int] 23 | 24 | init(_ string: String, 25 | priority: uint = 0, 26 | handle: @escaping HandleBlock) { 27 | 28 | self.patternString = string 29 | self.priority = priority 30 | self.handle = handle 31 | self.sheme = ACRouterPattern.parserSheme(string) 32 | self.patternPaths = ACRouterPattern.parserPaths(string) 33 | self.paramsMatchDict = [String: Int]() 34 | 35 | var matchPaths = [String]() 36 | for i in 0.. AnyObject 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Example/ACRouter.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 15D4DCCD81C993FB86E929E7 /* Pods_ACRouter_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF84F8EF5FB921DCCA88AA21 /* Pods_ACRouter_Tests.framework */; }; 11 | 592C584EFE0B36523E566985 /* Pods_ACRouter_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4AD91AD1E6E8D153026EBD9E /* Pods_ACRouter_Example.framework */; }; 12 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 13 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 14 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 15 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 16 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 17 | C17463A31E8154E800CD2F77 /* DemoTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17463A21E8154E800CD2F77 /* DemoTableView.swift */; }; 18 | C1B02BFB1E813A8100DE7182 /* AuthorizationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B02BFA1E813A8100DE7182 /* AuthorizationCenter.swift */; }; 19 | C180619A1E7543FF0048691A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18061981E7543FF0048691A /* ViewController.swift */; }; 20 | C1935DA51E87883D0026878B /* ErrorPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1935DA41E87883D0026878B /* ErrorPageViewController.swift */; }; 21 | C1D276211E7685B200CAEDF3 /* RouterManger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D276201E7685B200CAEDF3 /* RouterManger.swift */; }; 22 | C1D276231E76995300CAEDF3 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D276221E76995300CAEDF3 /* LoginViewController.swift */; }; 23 | C1D276251E76996400CAEDF3 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D276241E76996400CAEDF3 /* ProfileViewController.swift */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 32 | remoteInfo = ACRouter; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 35654A59F991514F9A0A770A /* ACRouter.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ACRouter.podspec; path = ../ACRouter.podspec; sourceTree = ""; }; 38 | 4AD91AD1E6E8D153026EBD9E /* Pods_ACRouter_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ACRouter_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 607FACD01AFB9204008FA782 /* ACRouter_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ACRouter_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 42 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 43 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 44 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 45 | 607FACE51AFB9204008FA782 /* ACRouter_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ACRouter_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 48 | 8795094CF90480BF58BE4B9E /* Pods-ACRouter_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ACRouter_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests.release.xcconfig"; sourceTree = ""; }; 49 | 945152B461F9515D15DCF28D /* Pods-ACRouter_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ACRouter_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests.debug.xcconfig"; sourceTree = ""; }; 50 | AF84F8EF5FB921DCCA88AA21 /* Pods_ACRouter_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ACRouter_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | B684A8AF5CF4C1838AD0D57B /* Pods-ACRouter_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ACRouter_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example.release.xcconfig"; sourceTree = ""; }; 52 | 53 | C17463A21E8154E800CD2F77 /* DemoTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoTableView.swift; sourceTree = ""; }; 54 | C1B02BFA1E813A8100DE7182 /* AuthorizationCenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthorizationCenter.swift; sourceTree = ""; }; 55 | C18061981E7543FF0048691A /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 56 | C1935DA41E87883D0026878B /* ErrorPageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorPageViewController.swift; sourceTree = ""; }; 57 | 58 | C1D276201E7685B200CAEDF3 /* RouterManger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouterManger.swift; sourceTree = ""; }; 59 | C1D276221E76995300CAEDF3 /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; 60 | C1D276241E76996400CAEDF3 /* ProfileViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = ""; }; 61 | D2C9C6338E7B5AC3B9AF9F5C /* Pods-ACRouter_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ACRouter_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example.debug.xcconfig"; sourceTree = ""; }; 62 | DF785E93804875892231F216 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 63 | E1369B2FB4AFBF6D6C8D9F57 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 64 | /* End PBXFileReference section */ 65 | 66 | /* Begin PBXFrameworksBuildPhase section */ 67 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | 592C584EFE0B36523E566985 /* Pods_ACRouter_Example.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | 15D4DCCD81C993FB86E929E7 /* Pods_ACRouter_Tests.framework in Frameworks */, 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | 607FACC71AFB9204008FA782 = { 87 | isa = PBXGroup; 88 | children = ( 89 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 90 | 607FACD21AFB9204008FA782 /* Example for ACRouter */, 91 | 607FACE81AFB9204008FA782 /* Tests */, 92 | 607FACD11AFB9204008FA782 /* Products */, 93 | CE0B36FF24AD1631ACE04DE6 /* Pods */, 94 | CC292BD46836D1C378DE2122 /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 607FACD11AFB9204008FA782 /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 607FACD01AFB9204008FA782 /* ACRouter_Example.app */, 102 | 607FACE51AFB9204008FA782 /* ACRouter_Tests.xctest */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 607FACD21AFB9204008FA782 /* Example for ACRouter */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 111 | C17463A21E8154E800CD2F77 /* DemoTableView.swift */, 112 | C18061981E7543FF0048691A /* ViewController.swift */, 113 | C1D276201E7685B200CAEDF3 /* RouterManger.swift */, 114 | C1B02BFA1E813A8100DE7182 /* AuthorizationCenter.swift */, 115 | C1D276221E76995300CAEDF3 /* LoginViewController.swift */, 116 | C1D276241E76996400CAEDF3 /* ProfileViewController.swift */, 117 | C1935DA41E87883D0026878B /* ErrorPageViewController.swift */, 118 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 119 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 120 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 121 | 607FACD31AFB9204008FA782 /* Supporting Files */, 122 | ); 123 | name = "Example for ACRouter"; 124 | path = ACRouter; 125 | sourceTree = ""; 126 | }; 127 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 607FACD41AFB9204008FA782 /* Info.plist */, 131 | ); 132 | name = "Supporting Files"; 133 | sourceTree = ""; 134 | }; 135 | 607FACE81AFB9204008FA782 /* Tests */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 139 | 607FACE91AFB9204008FA782 /* Supporting Files */, 140 | ); 141 | path = Tests; 142 | sourceTree = ""; 143 | }; 144 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 607FACEA1AFB9204008FA782 /* Info.plist */, 148 | ); 149 | name = "Supporting Files"; 150 | sourceTree = ""; 151 | }; 152 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 35654A59F991514F9A0A770A /* ACRouter.podspec */, 156 | E1369B2FB4AFBF6D6C8D9F57 /* README.md */, 157 | DF785E93804875892231F216 /* LICENSE */, 158 | ); 159 | name = "Podspec Metadata"; 160 | sourceTree = ""; 161 | }; 162 | CC292BD46836D1C378DE2122 /* Frameworks */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 4AD91AD1E6E8D153026EBD9E /* Pods_ACRouter_Example.framework */, 166 | AF84F8EF5FB921DCCA88AA21 /* Pods_ACRouter_Tests.framework */, 167 | ); 168 | name = Frameworks; 169 | sourceTree = ""; 170 | }; 171 | CE0B36FF24AD1631ACE04DE6 /* Pods */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | D2C9C6338E7B5AC3B9AF9F5C /* Pods-ACRouter_Example.debug.xcconfig */, 175 | B684A8AF5CF4C1838AD0D57B /* Pods-ACRouter_Example.release.xcconfig */, 176 | 945152B461F9515D15DCF28D /* Pods-ACRouter_Tests.debug.xcconfig */, 177 | 8795094CF90480BF58BE4B9E /* Pods-ACRouter_Tests.release.xcconfig */, 178 | ); 179 | name = Pods; 180 | sourceTree = ""; 181 | }; 182 | /* End PBXGroup section */ 183 | 184 | /* Begin PBXNativeTarget section */ 185 | 607FACCF1AFB9204008FA782 /* ACRouter_Example */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ACRouter_Example" */; 188 | buildPhases = ( 189 | 3F7E7C05F087B1F403323E29 /* [CP] Check Pods Manifest.lock */, 190 | 607FACCC1AFB9204008FA782 /* Sources */, 191 | 607FACCD1AFB9204008FA782 /* Frameworks */, 192 | 607FACCE1AFB9204008FA782 /* Resources */, 193 | D201639EC8744E8B5070063B /* [CP] Embed Pods Frameworks */, 194 | CE51A1530EF54DA195D06664 /* [CP] Copy Pods Resources */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | ); 200 | name = ACRouter_Example; 201 | productName = ACRouter; 202 | productReference = 607FACD01AFB9204008FA782 /* ACRouter_Example.app */; 203 | productType = "com.apple.product-type.application"; 204 | }; 205 | 607FACE41AFB9204008FA782 /* ACRouter_Tests */ = { 206 | isa = PBXNativeTarget; 207 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ACRouter_Tests" */; 208 | buildPhases = ( 209 | 33C6BCE6498C0981D80F4998 /* [CP] Check Pods Manifest.lock */, 210 | 607FACE11AFB9204008FA782 /* Sources */, 211 | 607FACE21AFB9204008FA782 /* Frameworks */, 212 | 607FACE31AFB9204008FA782 /* Resources */, 213 | 2C785E8AA5E787A67D8CF307 /* [CP] Embed Pods Frameworks */, 214 | A1C28FB6B4BBC03F04B0A0B1 /* [CP] Copy Pods Resources */, 215 | ); 216 | buildRules = ( 217 | ); 218 | dependencies = ( 219 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 220 | ); 221 | name = ACRouter_Tests; 222 | productName = Tests; 223 | productReference = 607FACE51AFB9204008FA782 /* ACRouter_Tests.xctest */; 224 | productType = "com.apple.product-type.bundle.unit-test"; 225 | }; 226 | /* End PBXNativeTarget section */ 227 | 228 | /* Begin PBXProject section */ 229 | 607FACC81AFB9204008FA782 /* Project object */ = { 230 | isa = PBXProject; 231 | attributes = { 232 | LastSwiftUpdateCheck = 0720; 233 | LastUpgradeCheck = 0820; 234 | ORGANIZATIONNAME = CocoaPods; 235 | TargetAttributes = { 236 | 607FACCF1AFB9204008FA782 = { 237 | CreatedOnToolsVersion = 6.3.1; 238 | LastSwiftMigration = 0820; 239 | }; 240 | 607FACE41AFB9204008FA782 = { 241 | CreatedOnToolsVersion = 6.3.1; 242 | LastSwiftMigration = 0820; 243 | TestTargetID = 607FACCF1AFB9204008FA782; 244 | }; 245 | }; 246 | }; 247 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "ACRouter" */; 248 | compatibilityVersion = "Xcode 3.2"; 249 | developmentRegion = English; 250 | hasScannedForEncodings = 0; 251 | knownRegions = ( 252 | en, 253 | Base, 254 | ); 255 | mainGroup = 607FACC71AFB9204008FA782; 256 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 257 | projectDirPath = ""; 258 | projectRoot = ""; 259 | targets = ( 260 | 607FACCF1AFB9204008FA782 /* ACRouter_Example */, 261 | 607FACE41AFB9204008FA782 /* ACRouter_Tests */, 262 | ); 263 | }; 264 | /* End PBXProject section */ 265 | 266 | /* Begin PBXResourcesBuildPhase section */ 267 | 607FACCE1AFB9204008FA782 /* Resources */ = { 268 | isa = PBXResourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 272 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 273 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | 607FACE31AFB9204008FA782 /* Resources */ = { 278 | isa = PBXResourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | /* End PBXResourcesBuildPhase section */ 285 | 286 | /* Begin PBXShellScriptBuildPhase section */ 287 | 2C785E8AA5E787A67D8CF307 /* [CP] Embed Pods Frameworks */ = { 288 | isa = PBXShellScriptBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | ); 292 | inputPaths = ( 293 | ); 294 | name = "[CP] Embed Pods Frameworks"; 295 | outputPaths = ( 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | shellPath = /bin/sh; 299 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-frameworks.sh\"\n"; 300 | showEnvVarsInLog = 0; 301 | }; 302 | 33C6BCE6498C0981D80F4998 /* [CP] Check Pods Manifest.lock */ = { 303 | isa = PBXShellScriptBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | ); 307 | inputPaths = ( 308 | ); 309 | name = "[CP] Check Pods Manifest.lock"; 310 | outputPaths = ( 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | shellPath = /bin/sh; 314 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 315 | showEnvVarsInLog = 0; 316 | }; 317 | 3F7E7C05F087B1F403323E29 /* [CP] Check Pods Manifest.lock */ = { 318 | isa = PBXShellScriptBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | ); 322 | inputPaths = ( 323 | ); 324 | name = "[CP] Check Pods Manifest.lock"; 325 | outputPaths = ( 326 | ); 327 | runOnlyForDeploymentPostprocessing = 0; 328 | shellPath = /bin/sh; 329 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 330 | showEnvVarsInLog = 0; 331 | }; 332 | A1C28FB6B4BBC03F04B0A0B1 /* [CP] Copy Pods Resources */ = { 333 | isa = PBXShellScriptBuildPhase; 334 | buildActionMask = 2147483647; 335 | files = ( 336 | ); 337 | inputPaths = ( 338 | ); 339 | name = "[CP] Copy Pods Resources"; 340 | outputPaths = ( 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | shellPath = /bin/sh; 344 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-resources.sh\"\n"; 345 | showEnvVarsInLog = 0; 346 | }; 347 | CE51A1530EF54DA195D06664 /* [CP] Copy Pods Resources */ = { 348 | isa = PBXShellScriptBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | ); 352 | inputPaths = ( 353 | ); 354 | name = "[CP] Copy Pods Resources"; 355 | outputPaths = ( 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | shellPath = /bin/sh; 359 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-resources.sh\"\n"; 360 | showEnvVarsInLog = 0; 361 | }; 362 | D201639EC8744E8B5070063B /* [CP] Embed Pods Frameworks */ = { 363 | isa = PBXShellScriptBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | ); 367 | inputPaths = ( 368 | ); 369 | name = "[CP] Embed Pods Frameworks"; 370 | outputPaths = ( 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | shellPath = /bin/sh; 374 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-frameworks.sh\"\n"; 375 | showEnvVarsInLog = 0; 376 | }; 377 | /* End PBXShellScriptBuildPhase section */ 378 | 379 | /* Begin PBXSourcesBuildPhase section */ 380 | 607FACCC1AFB9204008FA782 /* Sources */ = { 381 | isa = PBXSourcesBuildPhase; 382 | buildActionMask = 2147483647; 383 | files = ( 384 | C1D276251E76996400CAEDF3 /* ProfileViewController.swift in Sources */, 385 | C1D276211E7685B200CAEDF3 /* RouterManger.swift in Sources */, 386 | C180619A1E7543FF0048691A /* ViewController.swift in Sources */, 387 | C1B02BFB1E813A8100DE7182 /* AuthorizationCenter.swift in Sources */, 388 | C18061991E7543FF0048691A /* testViewController.swift in Sources */, 389 | C1D276231E76995300CAEDF3 /* LoginViewController.swift in Sources */, 390 | C17463A31E8154E800CD2F77 /* DemoTableView.swift in Sources */, 391 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 392 | C1935DA51E87883D0026878B /* ErrorPageViewController.swift in Sources */, 393 | ); 394 | runOnlyForDeploymentPostprocessing = 0; 395 | }; 396 | 607FACE11AFB9204008FA782 /* Sources */ = { 397 | isa = PBXSourcesBuildPhase; 398 | buildActionMask = 2147483647; 399 | files = ( 400 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 401 | ); 402 | runOnlyForDeploymentPostprocessing = 0; 403 | }; 404 | /* End PBXSourcesBuildPhase section */ 405 | 406 | /* Begin PBXTargetDependency section */ 407 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 408 | isa = PBXTargetDependency; 409 | target = 607FACCF1AFB9204008FA782 /* ACRouter_Example */; 410 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 411 | }; 412 | /* End PBXTargetDependency section */ 413 | 414 | /* Begin PBXVariantGroup section */ 415 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 416 | isa = PBXVariantGroup; 417 | children = ( 418 | 607FACDA1AFB9204008FA782 /* Base */, 419 | ); 420 | name = Main.storyboard; 421 | sourceTree = ""; 422 | }; 423 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 424 | isa = PBXVariantGroup; 425 | children = ( 426 | 607FACDF1AFB9204008FA782 /* Base */, 427 | ); 428 | name = LaunchScreen.xib; 429 | sourceTree = ""; 430 | }; 431 | /* End PBXVariantGroup section */ 432 | 433 | /* Begin XCBuildConfiguration section */ 434 | 607FACED1AFB9204008FA782 /* Debug */ = { 435 | isa = XCBuildConfiguration; 436 | buildSettings = { 437 | ALWAYS_SEARCH_USER_PATHS = NO; 438 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 439 | CLANG_CXX_LIBRARY = "libc++"; 440 | CLANG_ENABLE_MODULES = YES; 441 | CLANG_ENABLE_OBJC_ARC = YES; 442 | CLANG_WARN_BOOL_CONVERSION = YES; 443 | CLANG_WARN_CONSTANT_CONVERSION = YES; 444 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 445 | CLANG_WARN_EMPTY_BODY = YES; 446 | CLANG_WARN_ENUM_CONVERSION = YES; 447 | CLANG_WARN_INFINITE_RECURSION = YES; 448 | CLANG_WARN_INT_CONVERSION = YES; 449 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 450 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 451 | CLANG_WARN_UNREACHABLE_CODE = YES; 452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 453 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 454 | COPY_PHASE_STRIP = NO; 455 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 456 | ENABLE_STRICT_OBJC_MSGSEND = YES; 457 | ENABLE_TESTABILITY = YES; 458 | GCC_C_LANGUAGE_STANDARD = gnu99; 459 | GCC_DYNAMIC_NO_PIC = NO; 460 | GCC_NO_COMMON_BLOCKS = YES; 461 | GCC_OPTIMIZATION_LEVEL = 0; 462 | GCC_PREPROCESSOR_DEFINITIONS = ( 463 | "DEBUG=1", 464 | "$(inherited)", 465 | ); 466 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 467 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 468 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 469 | GCC_WARN_UNDECLARED_SELECTOR = YES; 470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 471 | GCC_WARN_UNUSED_FUNCTION = YES; 472 | GCC_WARN_UNUSED_VARIABLE = YES; 473 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 474 | MTL_ENABLE_DEBUG_INFO = YES; 475 | ONLY_ACTIVE_ARCH = YES; 476 | SDKROOT = iphoneos; 477 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 478 | }; 479 | name = Debug; 480 | }; 481 | 607FACEE1AFB9204008FA782 /* Release */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | ALWAYS_SEARCH_USER_PATHS = NO; 485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 486 | CLANG_CXX_LIBRARY = "libc++"; 487 | CLANG_ENABLE_MODULES = YES; 488 | CLANG_ENABLE_OBJC_ARC = YES; 489 | CLANG_WARN_BOOL_CONVERSION = YES; 490 | CLANG_WARN_CONSTANT_CONVERSION = YES; 491 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 492 | CLANG_WARN_EMPTY_BODY = YES; 493 | CLANG_WARN_ENUM_CONVERSION = YES; 494 | CLANG_WARN_INFINITE_RECURSION = YES; 495 | CLANG_WARN_INT_CONVERSION = YES; 496 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 497 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 498 | CLANG_WARN_UNREACHABLE_CODE = YES; 499 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 500 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 501 | COPY_PHASE_STRIP = NO; 502 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 503 | ENABLE_NS_ASSERTIONS = NO; 504 | ENABLE_STRICT_OBJC_MSGSEND = YES; 505 | GCC_C_LANGUAGE_STANDARD = gnu99; 506 | GCC_NO_COMMON_BLOCKS = YES; 507 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 508 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 509 | GCC_WARN_UNDECLARED_SELECTOR = YES; 510 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 511 | GCC_WARN_UNUSED_FUNCTION = YES; 512 | GCC_WARN_UNUSED_VARIABLE = YES; 513 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 514 | MTL_ENABLE_DEBUG_INFO = NO; 515 | SDKROOT = iphoneos; 516 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 517 | VALIDATE_PRODUCT = YES; 518 | }; 519 | name = Release; 520 | }; 521 | 607FACF01AFB9204008FA782 /* Debug */ = { 522 | isa = XCBuildConfiguration; 523 | baseConfigurationReference = D2C9C6338E7B5AC3B9AF9F5C /* Pods-ACRouter_Example.debug.xcconfig */; 524 | buildSettings = { 525 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 526 | INFOPLIST_FILE = ACRouter/Info.plist; 527 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 528 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 529 | MODULE_NAME = ExampleApp; 530 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 531 | PRODUCT_NAME = "$(TARGET_NAME)"; 532 | SWIFT_VERSION = 3.0; 533 | }; 534 | name = Debug; 535 | }; 536 | 607FACF11AFB9204008FA782 /* Release */ = { 537 | isa = XCBuildConfiguration; 538 | baseConfigurationReference = B684A8AF5CF4C1838AD0D57B /* Pods-ACRouter_Example.release.xcconfig */; 539 | buildSettings = { 540 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 541 | INFOPLIST_FILE = ACRouter/Info.plist; 542 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 543 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 544 | MODULE_NAME = ExampleApp; 545 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 546 | PRODUCT_NAME = "$(TARGET_NAME)"; 547 | SWIFT_VERSION = 3.0; 548 | }; 549 | name = Release; 550 | }; 551 | 607FACF31AFB9204008FA782 /* Debug */ = { 552 | isa = XCBuildConfiguration; 553 | baseConfigurationReference = 945152B461F9515D15DCF28D /* Pods-ACRouter_Tests.debug.xcconfig */; 554 | buildSettings = { 555 | FRAMEWORK_SEARCH_PATHS = ( 556 | "$(SDKROOT)/Developer/Library/Frameworks", 557 | "$(inherited)", 558 | ); 559 | GCC_PREPROCESSOR_DEFINITIONS = ( 560 | "DEBUG=1", 561 | "$(inherited)", 562 | ); 563 | INFOPLIST_FILE = Tests/Info.plist; 564 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 565 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 566 | PRODUCT_NAME = "$(TARGET_NAME)"; 567 | SWIFT_VERSION = 3.0; 568 | }; 569 | name = Debug; 570 | }; 571 | 607FACF41AFB9204008FA782 /* Release */ = { 572 | isa = XCBuildConfiguration; 573 | baseConfigurationReference = 8795094CF90480BF58BE4B9E /* Pods-ACRouter_Tests.release.xcconfig */; 574 | buildSettings = { 575 | FRAMEWORK_SEARCH_PATHS = ( 576 | "$(SDKROOT)/Developer/Library/Frameworks", 577 | "$(inherited)", 578 | ); 579 | INFOPLIST_FILE = Tests/Info.plist; 580 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 581 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 582 | PRODUCT_NAME = "$(TARGET_NAME)"; 583 | SWIFT_VERSION = 3.0; 584 | }; 585 | name = Release; 586 | }; 587 | /* End XCBuildConfiguration section */ 588 | 589 | /* Begin XCConfigurationList section */ 590 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "ACRouter" */ = { 591 | isa = XCConfigurationList; 592 | buildConfigurations = ( 593 | 607FACED1AFB9204008FA782 /* Debug */, 594 | 607FACEE1AFB9204008FA782 /* Release */, 595 | ); 596 | defaultConfigurationIsVisible = 0; 597 | defaultConfigurationName = Release; 598 | }; 599 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ACRouter_Example" */ = { 600 | isa = XCConfigurationList; 601 | buildConfigurations = ( 602 | 607FACF01AFB9204008FA782 /* Debug */, 603 | 607FACF11AFB9204008FA782 /* Release */, 604 | ); 605 | defaultConfigurationIsVisible = 0; 606 | defaultConfigurationName = Release; 607 | }; 608 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ACRouter_Tests" */ = { 609 | isa = XCConfigurationList; 610 | buildConfigurations = ( 611 | 607FACF31AFB9204008FA782 /* Debug */, 612 | 607FACF41AFB9204008FA782 /* Release */, 613 | ); 614 | defaultConfigurationIsVisible = 0; 615 | defaultConfigurationName = Release; 616 | }; 617 | /* End XCConfigurationList section */ 618 | }; 619 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 620 | } 621 | -------------------------------------------------------------------------------- /Example/ACRouter.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/ACRouter.xcodeproj/xcshareddata/xcschemes/ACRouter-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/ACRouter.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/ACRouter/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ACRouter 4 | // 5 | // Created by 260732891@qq.com on 03/12/2017. 6 | // Copyright (c) 2017 260732891@qq.com. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | 19 | RouterManger.testLoadLocalRegister() 20 | RouterManger.testLoadRomoteRegister() 21 | RouterManger.testAddInterceptor() 22 | RouterManger.testAddFailedAction() 23 | 24 | return true 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /Example/ACRouter/AuthorizationCenter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AuthorizationCenter.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 21/03/2017. 6 | // Copyright © 2017 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class AuthorizationCenter: NSObject { 12 | 13 | static let `default` = { 14 | AuthorizationCenter() 15 | }() 16 | 17 | var isLogin = false 18 | } 19 | -------------------------------------------------------------------------------- /Example/ACRouter/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/ACRouter/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Example/ACRouter/DemoTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DemoTableView.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 21/03/2017. 6 | // Copyright © 2017 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ACRouter 11 | 12 | class DemoTableView: UITableView, UITableViewDataSource, UITableViewDelegate { 13 | 14 | //页面跳转不需要再通过delegate与Block抛出到控制器去完成, view自身管理简化代码 15 | 16 | let dataArr = ["test login", 17 | "test profile with login", 18 | "test profile without login", 19 | "test normalRouter", 20 | "test error jump"] 21 | 22 | override init(frame: CGRect, style: UITableViewStyle) { 23 | super.init(frame: frame, style: style) 24 | 25 | dataSource = self 26 | delegate = self 27 | register(UITableViewCell.self, forCellReuseIdentifier: "cell") 28 | 29 | } 30 | 31 | required init?(coder aDecoder: NSCoder) { 32 | fatalError("init(coder:) has not been implemented") 33 | } 34 | 35 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 36 | return dataArr.count 37 | } 38 | 39 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 40 | let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) 41 | 42 | cell.textLabel?.text = dataArr[indexPath.row] 43 | 44 | return cell 45 | } 46 | 47 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 48 | 49 | switch indexPath.row { 50 | case 0: 51 | 52 | ACRouter.openURL(LoginAPI("Archerlly", passWord: "hehehe").requiredURL) 53 | 54 | case 1: 55 | AuthorizationCenter.default.isLogin = true 56 | ACRouter.openURL(ProfileAPI("My's home").requiredURL, userInfo: ["avatar": #imageLiteral(resourceName: "avatar")]) 57 | 58 | case 2: 59 | AuthorizationCenter.default.isLogin = false 60 | ACRouter.openURL(ProfileAPI("My's home").requiredURL, userInfo: ["avatar": #imageLiteral(resourceName: "avatar")]) 61 | 62 | case 3: 63 | let params = ["demo": "testInfo", "p1" : "value1"] 64 | let url = ACRouter.generate("AA://bb/cc/:p1", params: params, jumpType: ACRouter.ACJumpType.modal) 65 | ACRouter.openURL(url, userInfo: ["bgColor": UIColor.gray]) 66 | 67 | case 4: 68 | let url = ACRouter.generate("FF://bb/cc", jumpType: ACRouter.ACJumpType.modal) 69 | ACRouter.openURL(url) 70 | 71 | default: break 72 | } 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /Example/ACRouter/ErrorPageViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ErrorPageViewController.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 26/03/2017. 6 | // Copyright © 2017 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ACRouter 11 | 12 | class ErrorPageViewController: UIViewController, ACRouterable { 13 | 14 | static func registerAction(info: [String : AnyObject]) -> AnyObject { 15 | 16 | let newInstance = ErrorPageViewController() 17 | let infoString = info.map { "\($0) : \($1)" }.joined(separator: "\n") 18 | newInstance.infoLabel.text = infoString 19 | newInstance.infoLabel.bounds.size = newInstance.infoLabel.sizeThatFits(newInstance.view.bounds.size) 20 | newInstance.infoLabel.center = newInstance.view.center 21 | 22 | if let bgColor = info["bgColor"] as? UIColor { 23 | newInstance.view.backgroundColor = bgColor 24 | } 25 | 26 | if let faildURL = info[ACRouter.matchFailedKey] as? String { 27 | newInstance.errorPage.isHidden = faildURL.characters.count == 0 28 | } 29 | 30 | return newInstance 31 | } 32 | 33 | override func viewDidLoad() { 34 | super.viewDidLoad() 35 | 36 | view.backgroundColor = UIColor.white 37 | } 38 | 39 | lazy var infoLabel: UILabel = { 40 | let infoLabel = UILabel() 41 | infoLabel.numberOfLines = 0 42 | self.view.addSubview(infoLabel) 43 | return infoLabel 44 | }() 45 | 46 | lazy var errorPage: UIImageView = { 47 | let errorPage = UIImageView.init(image: #imageLiteral(resourceName: "error")) 48 | errorPage.isHidden = true 49 | errorPage.center.x = self.view.center.x 50 | errorPage.center.y = 150 51 | self.view.addSubview(errorPage) 52 | return errorPage 53 | }() 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Example/ACRouter/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Example/ACRouter/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/ACRouter/Images.xcassets/avatar.imageset/30726168_1390202384007_800x800.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Archerlly/ACRouter/687103c4c85c12eca2e2f4fb5c1efef45cc57dc8/Example/ACRouter/Images.xcassets/avatar.imageset/30726168_1390202384007_800x800.jpg -------------------------------------------------------------------------------- /Example/ACRouter/Images.xcassets/avatar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "30726168_1390202384007_800x800.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/ACRouter/Images.xcassets/error.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "illustration_error_none_default@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "illustration_error_none_default@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Example/ACRouter/Images.xcassets/error.imageset/illustration_error_none_default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Archerlly/ACRouter/687103c4c85c12eca2e2f4fb5c1efef45cc57dc8/Example/ACRouter/Images.xcassets/error.imageset/illustration_error_none_default@2x.png -------------------------------------------------------------------------------- /Example/ACRouter/Images.xcassets/error.imageset/illustration_error_none_default@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Archerlly/ACRouter/687103c4c85c12eca2e2f4fb5c1efef45cc57dc8/Example/ACRouter/Images.xcassets/error.imageset/illustration_error_none_default@3x.png -------------------------------------------------------------------------------- /Example/ACRouter/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/ACRouter/LoginViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewController.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 13/03/2017. 6 | // Copyright © 2017 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ACRouter 11 | 12 | class LoginViewController: UIViewController, ACRouterable { 13 | 14 | class func registerAction(info: [String : AnyObject]) -> AnyObject { 15 | 16 | let newInstance = LoginViewController() 17 | 18 | newInstance.usernameTextFieled.text = info["username"] as? String 19 | newInstance.passwordTextFieled.text = info["password"] as? String 20 | 21 | return newInstance 22 | } 23 | 24 | let usernameTextFieled = UITextField() 25 | let passwordTextFieled = UITextField() 26 | let loginButton = UIButton.init(type: UIButtonType.system) 27 | 28 | override func viewDidLoad() { 29 | super.viewDidLoad() 30 | view.backgroundColor = UIColor.white 31 | 32 | view.addSubview(usernameTextFieled) 33 | view.addSubview(passwordTextFieled) 34 | view.addSubview(loginButton) 35 | 36 | usernameTextFieled.placeholder = "username" 37 | usernameTextFieled.borderStyle = .roundedRect 38 | usernameTextFieled.bounds.size = CGSize.init(width: 150, height: 40) 39 | usernameTextFieled.center.x = view.center.x 40 | usernameTextFieled.center.y = 140 41 | 42 | passwordTextFieled.placeholder = "password" 43 | passwordTextFieled.borderStyle = .roundedRect 44 | passwordTextFieled.bounds.size = CGSize.init(width: 150, height: 40) 45 | passwordTextFieled.center.x = view.center.x 46 | passwordTextFieled.center.y = 200 47 | 48 | loginButton.setTitle("Log In", for: .normal) 49 | loginButton.addTarget(self, action: #selector(loginAction), for: .touchUpInside) 50 | loginButton.bounds.size = CGSize.init(width: 100, height: 40) 51 | loginButton.center.x = view.center.x 52 | loginButton.center.y = 260 53 | } 54 | 55 | @objc private func loginAction() { 56 | AuthorizationCenter.default.isLogin = true; 57 | ACRouter.openURL(ProfileAPI("\(usernameTextFieled.text ?? "")'s home").requiredURL, userInfo: ["avatar": #imageLiteral(resourceName: "avatar")]) 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /Example/ACRouter/ProfileViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileViewController.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 13/03/2017. 6 | // Copyright © 2017 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ACRouter 11 | 12 | class ProfileViewController: UIViewController, ACRouterable { 13 | 14 | static func registerAction(info: [String : AnyObject]) -> AnyObject { 15 | 16 | let newInstance = self.init() 17 | 18 | if let image = info["avatar"] as? UIImage { 19 | newInstance.avatarView.image = image 20 | newInstance.avatarView.sizeToFit() 21 | newInstance.avatarView.center = newInstance.view.center 22 | } 23 | 24 | if let content = info["content"] as? String { 25 | newInstance.infoLabel.text = content 26 | newInstance.infoLabel.sizeToFit() 27 | newInstance.infoLabel.center = newInstance.view.center 28 | } 29 | 30 | 31 | return newInstance 32 | } 33 | 34 | override func viewDidLoad() { 35 | super.viewDidLoad() 36 | view.backgroundColor = UIColor.white 37 | 38 | let back = UIButton() 39 | back.setTitle("back", for: .normal) 40 | back.setTitleColor(UIColor.black, for: .normal) 41 | back.addTarget(self, action: #selector(ProfileViewController.backAction), for: .touchUpInside) 42 | back.frame = CGRect.init(x: 20, y: 20, width: 50, height: 50) 43 | view.addSubview(back) 44 | } 45 | 46 | @objc private func backAction() { 47 | dismiss(animated: true, completion: nil) 48 | } 49 | 50 | lazy var avatarView: UIImageView = { 51 | let avatarView = UIImageView() 52 | self.view.addSubview(avatarView) 53 | self.view.sendSubview(toBack: avatarView) 54 | return avatarView 55 | }() 56 | 57 | lazy var infoLabel: UILabel = { 58 | let infoLabel = UILabel() 59 | self.view.addSubview(infoLabel) 60 | return infoLabel 61 | }() 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Example/ACRouter/RouterManger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RouterManger.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 13/03/2017. 6 | // Copyright © 2017 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ACRouter 11 | 12 | // 这并不是最佳实践 13 | 14 | class RouterManger: NSObject { 15 | 16 | //方式一: 网络下发 URL 与 viewcontroller 的映射关系 17 | class func testLoadRomoteRegister() { 18 | let registerDict = ["AA://bb/cc/:p1" : "ErrorPageViewController"] 19 | ACRouter.addRouter(registerDict) 20 | } 21 | 22 | //方式二: 本地固定映射关系 使用枚举便于使用 23 | class func testLoadLocalRegister() { 24 | let login = LoginAPI() 25 | ACRouter.addRouter(login.patternString, classString: login.routerClass) 26 | 27 | let profile = ProfileAPI() 28 | ACRouter.addRouter(profile.patternString, classString: profile.routerClass) 29 | } 30 | 31 | /* 32 | 学习Moya管理API的方式, 通过枚举确实方便了使用, 使各个模块的配置信息, 以及PatternURL统一管理了, 避免了将各个模块的URL散落在业务代码之中. 33 | 但是统一管理带来的弊端就是建立了间接的耦合, Login与Profile这两个模块又与Manger耦合上了, 与Router最初的解耦思想有点背道而驰. 34 | 至于具体是使用Enum还是直接在项目中使用URL, 大家仁者见仁智者见智, 这里只是提供一个简单的demo, 并非最佳实例 35 | */ 36 | 37 | //测试拦截器 38 | class func testAddInterceptor() { 39 | let whitePatternString = LoginAPI().patternString 40 | let normal = "AA://bb/cc/:p1" 41 | ACRouter.addInterceptor([whitePatternString, normal], priority: 0) { (info) -> Bool in 42 | if AuthorizationCenter.default.isLogin { 43 | return true 44 | } else { 45 | ACRouter.openURL(LoginAPI().requiredURL) 46 | return false 47 | } 48 | } 49 | } 50 | 51 | //添加跳转错误回调 52 | class func testAddFailedAction() { 53 | ACRouter.addGlobalMatchFailedHandel { (info) in 54 | let url = ACRouter.generate("AA://bb/cc/error", jumpType: ACRouter.ACJumpType.modal) 55 | ACRouter.openURL(url, userInfo: info) 56 | } 57 | } 58 | } 59 | 60 | 61 | 62 | //统一管理各模块的配置信息 63 | //enum localRouterable: customRouterInfo { 64 | // case login(username: String, password: String) 65 | // case profile(content: String) 66 | //} 67 | // 68 | //extension localRouterable { 69 | // 70 | // var patternString: String { 71 | // switch self { 72 | // case .login: return "ACSheme://login" 73 | // case .profile: return "ACSheme://profile/:content" 74 | // } 75 | // } 76 | // 77 | // var routerClass: String { 78 | // switch self { 79 | // case .login: return "LoginViewController" 80 | // case .profile: return "ProfileViewController" 81 | // } 82 | // } 83 | // 84 | // var params: [String : String] { 85 | // switch self { 86 | // case .login(let u, let p): 87 | // return ["username": u, "password": p] 88 | // case .profile(let c): 89 | // return ["content": c] 90 | // } 91 | // } 92 | // 93 | // var jumpType: ACRouter.ACJumpType { 94 | // switch self { 95 | // case .login: return ACRouter.ACJumpType.modal 96 | // case .profile: return ACRouter.ACJumpType.represent 97 | // } 98 | // } 99 | // 100 | // var requiredURL: String { 101 | // return ACRouter.generate(self.patternString, params: self.params, jumpType: self.jumpType) 102 | // } 103 | //} 104 | 105 | 106 | protocol customRouterInfo { 107 | var patternString: String { get } 108 | var routerClass: String { get } 109 | var requiredURL: String { get } 110 | var params: [String: String] { get } 111 | var jumpType: ACRouter.ACJumpType { get } 112 | } 113 | 114 | extension customRouterInfo { 115 | var requiredURL: String { 116 | return ACRouter.generate(self.patternString, params: self.params, jumpType: self.jumpType) 117 | } 118 | } 119 | 120 | class LoginAPI : customRouterInfo { 121 | 122 | var patternString = "ACSheme://login" 123 | var routerClass = "LoginViewController" 124 | var params: [String : String] { return ["username": name, "password": passWord] } 125 | var jumpType: ACRouter.ACJumpType = .represent 126 | 127 | let name: String 128 | let passWord: String 129 | init(_ name: String = "", passWord: String = "") { 130 | self.name = name 131 | self.passWord = passWord 132 | } 133 | } 134 | 135 | class ProfileAPI : customRouterInfo { 136 | 137 | var patternString = "ACSheme://profile/:content" 138 | var routerClass = "ProfileViewController" 139 | var params: [String : String] { return ["content": content] } 140 | var jumpType: ACRouter.ACJumpType = .modal 141 | 142 | let content: String 143 | init(_ content: String = "") { 144 | self.content = content 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /Example/ACRouter/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ACRouter 4 | // 5 | // Created by SnowCheng on 10/03/2017. 6 | // Copyright © 2017 Archerlly. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ACRouter 11 | 12 | class ViewController: UIViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | let tab = DemoTableView() 18 | tab.frame = view.bounds 19 | view.addSubview(tab) 20 | 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'ACRouter_Example' do 4 | pod 'ACRouter', :path => '../' 5 | 6 | target 'ACRouter_Tests' do 7 | pod 'ACRouter', :path => '../' 8 | inherit! :search_paths 9 | 10 | 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ACRouter (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - ACRouter (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | ACRouter: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | ACRouter: c882040259622425ea1e2433b7a80b5f542b19f3 13 | 14 | PODFILE CHECKSUM: 8acdee600592801aa0314720c8bc1ea452b5d5eb 15 | 16 | COCOAPODS: 1.2.0 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/ACRouter.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ACRouter", 3 | "version": "0.1.0", 4 | "summary": "A simple router for swift", 5 | "homepage": "https://github.com/Archerlly/ACRouter", 6 | "license": { 7 | "type": "MIT", 8 | "file": "LICENSE" 9 | }, 10 | "authors": { 11 | "Archerlly": "2302693080@qq.com" 12 | }, 13 | "source": { 14 | "git": "https://github.com/Archerlly/ACRouter.git", 15 | "tag": "0.1.0" 16 | }, 17 | "platforms": { 18 | "ios": "8.0" 19 | }, 20 | "source_files": "ACRouter/Classes/**/*", 21 | "requires_arc": true 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ACRouter (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - ACRouter (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | ACRouter: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | ACRouter: c882040259622425ea1e2433b7a80b5f542b19f3 13 | 14 | PODFILE CHECKSUM: 8acdee600592801aa0314720c8bc1ea452b5d5eb 15 | 16 | COCOAPODS: 1.2.0 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 010EBB387A3CC7CBB6D05973546E6045 /* ACRouterParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A8620661426111B6E4AF2D6C8F96BE6 /* ACRouterParser.swift */; }; 11 | 1B2A68399513B50380C6E2D1645D33A2 /* ACRouterRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26DDE229B82A346F067D63CB86C6862A /* ACRouterRequest.swift */; }; 12 | 1FAD684B8D1BB6C598A5DF8AA50B4FAE /* ACRouter-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9272EF3D4EB4CF3ABE8C37430FD0C341 /* ACRouter-dummy.m */; }; 13 | 200030A9129B5F5214F62942276762F3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 14 | 2F5962884B9C4CB6A21B15E4D077BDF5 /* ACRouter+Jump.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCEC140C8F52D2C472B5A1AB850C4C72 /* ACRouter+Jump.swift */; }; 15 | 36FF145ADF18D526A447DAD528C3B963 /* ACRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F745BA1B068403B4A9095DF57913DE /* ACRouter.swift */; }; 16 | 3BC95F9ED2CFF6CCC5595689999D02A0 /* ACRouterable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B7B3E02A5C2724D5E0BBBAEC8A55B7B /* ACRouterable.swift */; }; 17 | 452F34B6938D7618D57D3E5F83C00007 /* Pods-ACRouter_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1C58F9F7EA34406E13B459D19D85D1 /* Pods-ACRouter_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | 4B88A58B569ACA1937A9A1547A6983C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 19 | 80E2FB9CF7DBFF7B93D5942FDAC17D77 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 20 | 831BB7200F4C8738F39E90F5FC951C6A /* Pods-ACRouter_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F3A08AF63A35E046A802A9AE14EE9D1 /* Pods-ACRouter_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21 | 8FA6F96A788168C8909303CD4253AB67 /* ACRouter+Convenience.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF4B9D4BAF017FEAA92220512BE5FC68 /* ACRouter+Convenience.swift */; }; 22 | 9236FFCD55C6AC5E9B2A922FC5C9AA10 /* Pods-ACRouter_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5067E876CF012EDF877B34FBD936CA9D /* Pods-ACRouter_Tests-dummy.m */; }; 23 | C1D4257F1E7CFB350024FA88 /* ACRouterInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D4257E1E7CFB350024FA88 /* ACRouterInterceptor.swift */; }; 24 | C75FA69A04322ABE41294DA44348A3CC /* ACCommonExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F894639DEA2E6AB3C36131D213CF4477 /* ACCommonExtension.swift */; }; 25 | DB75712D24E8D3A3666F33CD3E146BEB /* Pods-ACRouter_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DAD79FED54A19013AC4C3FF08C38682 /* Pods-ACRouter_Example-dummy.m */; }; 26 | E123FD7CB1E60123AF00E8F96FD53175 /* ACRouter-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F59AC3D75E7F215F12E09D72044AA911 /* ACRouter-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 27 | F7392E2B6DFF6C675F487B9F3072603E /* ACRouterPattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BECCCE49DDCDB9004122BBC8A5235 /* ACRouterPattern.swift */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 4E706EB199540350109E1487353CC5DF /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 4263C2F335071052429B02A4393C3D10; 36 | remoteInfo = ACRouter; 37 | }; 38 | 74BDCC2760AFEA388A1F77DE93A7980A /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = 4263C2F335071052429B02A4393C3D10; 43 | remoteInfo = ACRouter; 44 | }; 45 | /* End PBXContainerItemProxy section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 045258A81B2E084A0354618473811F47 /* Pods-ACRouter_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ACRouter_Example-frameworks.sh"; sourceTree = ""; }; 49 | 0E3705A540E9DB03AB39ADF24D0B36F3 /* ACRouter.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = ACRouter.modulemap; sourceTree = ""; }; 50 | 1321A56EE262A3534DC96C4726ED90FE /* Pods-ACRouter_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ACRouter_Example.debug.xcconfig"; sourceTree = ""; }; 51 | 1D9771367DB3A7DB083A1E382D3840D2 /* ACRouter-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ACRouter-prefix.pch"; sourceTree = ""; }; 52 | 208590F11764D2AE3ACE17BAAA7E15EC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | 212C62106561F714D775D85811E22FAA /* Pods-ACRouter_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ACRouter_Tests-acknowledgements.markdown"; sourceTree = ""; }; 54 | 26DDE229B82A346F067D63CB86C6862A /* ACRouterRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ACRouterRequest.swift; sourceTree = ""; }; 55 | 2B4BECCCE49DDCDB9004122BBC8A5235 /* ACRouterPattern.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ACRouterPattern.swift; sourceTree = ""; }; 56 | 2B7B3E02A5C2724D5E0BBBAEC8A55B7B /* ACRouterable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ACRouterable.swift; sourceTree = ""; }; 57 | 343A1DD61C6A82C027BE12F332FE222E /* Pods-ACRouter_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ACRouter_Tests.release.xcconfig"; sourceTree = ""; }; 58 | 3A8620661426111B6E4AF2D6C8F96BE6 /* ACRouterParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ACRouterParser.swift; sourceTree = ""; }; 59 | 3E961B5F51C130B70E998FDAC5943C0E /* Pods-ACRouter_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ACRouter_Example-acknowledgements.plist"; sourceTree = ""; }; 60 | 470F2B5E8A8C0C74AE3BEBF610896935 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 479D0787F671D0CB84B4C005F5AA36FF /* Pods-ACRouter_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-ACRouter_Tests.modulemap"; sourceTree = ""; }; 62 | 5067E876CF012EDF877B34FBD936CA9D /* Pods-ACRouter_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ACRouter_Tests-dummy.m"; sourceTree = ""; }; 63 | 510A07C6E55ABC20AB85F394BEBF3924 /* ACRouter.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ACRouter.xcconfig; sourceTree = ""; }; 64 | 53F745BA1B068403B4A9095DF57913DE /* ACRouter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ACRouter.swift; sourceTree = ""; }; 65 | 6006091B99EE822AB2B700ACBBAB3D74 /* Pods-ACRouter_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ACRouter_Tests-resources.sh"; sourceTree = ""; }; 66 | 6FD7E18D52E8B6A1E6D46C99385E68D1 /* Pods-ACRouter_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ACRouter_Tests-frameworks.sh"; sourceTree = ""; }; 67 | 71A1EEBEBBA2DB0DBB7613A1F1EA7A00 /* Pods-ACRouter_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ACRouter_Example-resources.sh"; sourceTree = ""; }; 68 | 730507DDB2D4DD817890CDB67E5C4D64 /* Pods-ACRouter_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ACRouter_Example.release.xcconfig"; sourceTree = ""; }; 69 | 7C1C58F9F7EA34406E13B459D19D85D1 /* Pods-ACRouter_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ACRouter_Tests-umbrella.h"; sourceTree = ""; }; 70 | 8DAD79FED54A19013AC4C3FF08C38682 /* Pods-ACRouter_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ACRouter_Example-dummy.m"; sourceTree = ""; }; 71 | 9272EF3D4EB4CF3ABE8C37430FD0C341 /* ACRouter-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ACRouter-dummy.m"; sourceTree = ""; }; 72 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 73 | 9F3A08AF63A35E046A802A9AE14EE9D1 /* Pods-ACRouter_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ACRouter_Example-umbrella.h"; sourceTree = ""; }; 74 | AA4F7D252E56663F0FE98BCF470A4FDB /* Pods_ACRouter_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ACRouter_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | AF4B9D4BAF017FEAA92220512BE5FC68 /* ACRouter+Convenience.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "ACRouter+Convenience.swift"; sourceTree = ""; }; 76 | BF514A5E8B51D04FE8B4886D2D9E8EBD /* Pods-ACRouter_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ACRouter_Tests-acknowledgements.plist"; sourceTree = ""; }; 77 | C1D4257E1E7CFB350024FA88 /* ACRouterInterceptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ACRouterInterceptor.swift; sourceTree = ""; }; 78 | C4DA4692694D779750E716BAA7BA8EEA /* Pods-ACRouter_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ACRouter_Tests.debug.xcconfig"; sourceTree = ""; }; 79 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 80 | CCEC140C8F52D2C472B5A1AB850C4C72 /* ACRouter+Jump.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "ACRouter+Jump.swift"; sourceTree = ""; }; 81 | D0218E6C342566A2FB0A0196BD197291 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 82 | D11CF261FF9092D933BBCC405C0E4A4B /* Pods_ACRouter_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ACRouter_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | E60B144F05F4568EB8ACE4256CA22FEF /* Pods-ACRouter_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-ACRouter_Example.modulemap"; sourceTree = ""; }; 84 | E83F9D5BBDCD3310DA9DF6E081AB06B0 /* Pods-ACRouter_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ACRouter_Example-acknowledgements.markdown"; sourceTree = ""; }; 85 | F59AC3D75E7F215F12E09D72044AA911 /* ACRouter-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ACRouter-umbrella.h"; sourceTree = ""; }; 86 | F5A9293BBABBF7081A62B2AB39AB9B05 /* ACRouter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ACRouter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 87 | F894639DEA2E6AB3C36131D213CF4477 /* ACCommonExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ACCommonExtension.swift; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | 0AD8B24C0D394299FDE547943E5D21E2 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 4B88A58B569ACA1937A9A1547A6983C3 /* Foundation.framework in Frameworks */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | B16A5EE698FC6CA349EDF30488D45674 /* Frameworks */ = { 100 | isa = PBXFrameworksBuildPhase; 101 | buildActionMask = 2147483647; 102 | files = ( 103 | 80E2FB9CF7DBFF7B93D5942FDAC17D77 /* Foundation.framework in Frameworks */, 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | C75C4745FB88DFD1739B7CFD262B51D9 /* Frameworks */ = { 108 | isa = PBXFrameworksBuildPhase; 109 | buildActionMask = 2147483647; 110 | files = ( 111 | 200030A9129B5F5214F62942276762F3 /* Foundation.framework in Frameworks */, 112 | ); 113 | runOnlyForDeploymentPostprocessing = 0; 114 | }; 115 | /* End PBXFrameworksBuildPhase section */ 116 | 117 | /* Begin PBXGroup section */ 118 | 0969984D9A4D18ECF4495478CBB192F1 /* Pods-ACRouter_Example */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | D0218E6C342566A2FB0A0196BD197291 /* Info.plist */, 122 | E60B144F05F4568EB8ACE4256CA22FEF /* Pods-ACRouter_Example.modulemap */, 123 | E83F9D5BBDCD3310DA9DF6E081AB06B0 /* Pods-ACRouter_Example-acknowledgements.markdown */, 124 | 3E961B5F51C130B70E998FDAC5943C0E /* Pods-ACRouter_Example-acknowledgements.plist */, 125 | 8DAD79FED54A19013AC4C3FF08C38682 /* Pods-ACRouter_Example-dummy.m */, 126 | 045258A81B2E084A0354618473811F47 /* Pods-ACRouter_Example-frameworks.sh */, 127 | 71A1EEBEBBA2DB0DBB7613A1F1EA7A00 /* Pods-ACRouter_Example-resources.sh */, 128 | 9F3A08AF63A35E046A802A9AE14EE9D1 /* Pods-ACRouter_Example-umbrella.h */, 129 | 1321A56EE262A3534DC96C4726ED90FE /* Pods-ACRouter_Example.debug.xcconfig */, 130 | 730507DDB2D4DD817890CDB67E5C4D64 /* Pods-ACRouter_Example.release.xcconfig */, 131 | ); 132 | name = "Pods-ACRouter_Example"; 133 | path = "Target Support Files/Pods-ACRouter_Example"; 134 | sourceTree = ""; 135 | }; 136 | 191F8AC681C7F4730E38DAC304A83CC3 /* Pods-ACRouter_Tests */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 470F2B5E8A8C0C74AE3BEBF610896935 /* Info.plist */, 140 | 479D0787F671D0CB84B4C005F5AA36FF /* Pods-ACRouter_Tests.modulemap */, 141 | 212C62106561F714D775D85811E22FAA /* Pods-ACRouter_Tests-acknowledgements.markdown */, 142 | BF514A5E8B51D04FE8B4886D2D9E8EBD /* Pods-ACRouter_Tests-acknowledgements.plist */, 143 | 5067E876CF012EDF877B34FBD936CA9D /* Pods-ACRouter_Tests-dummy.m */, 144 | 6FD7E18D52E8B6A1E6D46C99385E68D1 /* Pods-ACRouter_Tests-frameworks.sh */, 145 | 6006091B99EE822AB2B700ACBBAB3D74 /* Pods-ACRouter_Tests-resources.sh */, 146 | 7C1C58F9F7EA34406E13B459D19D85D1 /* Pods-ACRouter_Tests-umbrella.h */, 147 | C4DA4692694D779750E716BAA7BA8EEA /* Pods-ACRouter_Tests.debug.xcconfig */, 148 | 343A1DD61C6A82C027BE12F332FE222E /* Pods-ACRouter_Tests.release.xcconfig */, 149 | ); 150 | name = "Pods-ACRouter_Tests"; 151 | path = "Target Support Files/Pods-ACRouter_Tests"; 152 | sourceTree = ""; 153 | }; 154 | 537E602F62A5D23C1B836566529CA42D /* ACRouter */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | D4005D65BF9BF0D69D7A68B189546259 /* ACRouter */, 158 | E7FE9DB5289B074CD58EC232998B16EB /* Support Files */, 159 | ); 160 | name = ACRouter; 161 | path = ../..; 162 | sourceTree = ""; 163 | }; 164 | 64072ED2CC27C569D518CD69AC638E23 /* Products */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | F5A9293BBABBF7081A62B2AB39AB9B05 /* ACRouter.framework */, 168 | AA4F7D252E56663F0FE98BCF470A4FDB /* Pods_ACRouter_Example.framework */, 169 | D11CF261FF9092D933BBCC405C0E4A4B /* Pods_ACRouter_Tests.framework */, 170 | ); 171 | name = Products; 172 | sourceTree = ""; 173 | }; 174 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, 178 | ); 179 | name = iOS; 180 | sourceTree = ""; 181 | }; 182 | 7DB346D0F39D3F0E887471402A8071AB = { 183 | isa = PBXGroup; 184 | children = ( 185 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 186 | C04CC991E125DB50D781C157095B0008 /* Development Pods */, 187 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 188 | 64072ED2CC27C569D518CD69AC638E23 /* Products */, 189 | C1B11C8AF57444C5B322DA9F944BC731 /* Targets Support Files */, 190 | ); 191 | sourceTree = ""; 192 | }; 193 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, 197 | ); 198 | name = Frameworks; 199 | sourceTree = ""; 200 | }; 201 | C04CC991E125DB50D781C157095B0008 /* Development Pods */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 537E602F62A5D23C1B836566529CA42D /* ACRouter */, 205 | ); 206 | name = "Development Pods"; 207 | sourceTree = ""; 208 | }; 209 | C1B11C8AF57444C5B322DA9F944BC731 /* Targets Support Files */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 0969984D9A4D18ECF4495478CBB192F1 /* Pods-ACRouter_Example */, 213 | 191F8AC681C7F4730E38DAC304A83CC3 /* Pods-ACRouter_Tests */, 214 | ); 215 | name = "Targets Support Files"; 216 | sourceTree = ""; 217 | }; 218 | D4005D65BF9BF0D69D7A68B189546259 /* ACRouter */ = { 219 | isa = PBXGroup; 220 | children = ( 221 | DA698960D1F5A67322132CC3FDA1497D /* Classes */, 222 | ); 223 | path = ACRouter; 224 | sourceTree = ""; 225 | }; 226 | DA698960D1F5A67322132CC3FDA1497D /* Classes */ = { 227 | isa = PBXGroup; 228 | children = ( 229 | F894639DEA2E6AB3C36131D213CF4477 /* ACCommonExtension.swift */, 230 | 53F745BA1B068403B4A9095DF57913DE /* ACRouter.swift */, 231 | AF4B9D4BAF017FEAA92220512BE5FC68 /* ACRouter+Convenience.swift */, 232 | CCEC140C8F52D2C472B5A1AB850C4C72 /* ACRouter+Jump.swift */, 233 | 2B7B3E02A5C2724D5E0BBBAEC8A55B7B /* ACRouterable.swift */, 234 | 3A8620661426111B6E4AF2D6C8F96BE6 /* ACRouterParser.swift */, 235 | 2B4BECCCE49DDCDB9004122BBC8A5235 /* ACRouterPattern.swift */, 236 | 26DDE229B82A346F067D63CB86C6862A /* ACRouterRequest.swift */, 237 | C1D4257E1E7CFB350024FA88 /* ACRouterInterceptor.swift */, 238 | ); 239 | path = Classes; 240 | sourceTree = ""; 241 | }; 242 | E7FE9DB5289B074CD58EC232998B16EB /* Support Files */ = { 243 | isa = PBXGroup; 244 | children = ( 245 | 0E3705A540E9DB03AB39ADF24D0B36F3 /* ACRouter.modulemap */, 246 | 510A07C6E55ABC20AB85F394BEBF3924 /* ACRouter.xcconfig */, 247 | 9272EF3D4EB4CF3ABE8C37430FD0C341 /* ACRouter-dummy.m */, 248 | 1D9771367DB3A7DB083A1E382D3840D2 /* ACRouter-prefix.pch */, 249 | F59AC3D75E7F215F12E09D72044AA911 /* ACRouter-umbrella.h */, 250 | 208590F11764D2AE3ACE17BAAA7E15EC /* Info.plist */, 251 | ); 252 | name = "Support Files"; 253 | path = "Example/Pods/Target Support Files/ACRouter"; 254 | sourceTree = ""; 255 | }; 256 | /* End PBXGroup section */ 257 | 258 | /* Begin PBXHeadersBuildPhase section */ 259 | 08915FD91C5CB2989F6379C1F4C17FB8 /* Headers */ = { 260 | isa = PBXHeadersBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 452F34B6938D7618D57D3E5F83C00007 /* Pods-ACRouter_Tests-umbrella.h in Headers */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | A08AA16107A688355D173DE56E63CF1D /* Headers */ = { 268 | isa = PBXHeadersBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | E123FD7CB1E60123AF00E8F96FD53175 /* ACRouter-umbrella.h in Headers */, 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | ADD35E79C81369F13C81404C78EC5D77 /* Headers */ = { 276 | isa = PBXHeadersBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | 831BB7200F4C8738F39E90F5FC951C6A /* Pods-ACRouter_Example-umbrella.h in Headers */, 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | /* End PBXHeadersBuildPhase section */ 284 | 285 | /* Begin PBXNativeTarget section */ 286 | 25A3EDBC61BDF624094DF05591931390 /* Pods-ACRouter_Tests */ = { 287 | isa = PBXNativeTarget; 288 | buildConfigurationList = E6A33A6A4438586971352F84B6A87694 /* Build configuration list for PBXNativeTarget "Pods-ACRouter_Tests" */; 289 | buildPhases = ( 290 | 552493B627790E4C1737668A0965C15E /* Sources */, 291 | 0AD8B24C0D394299FDE547943E5D21E2 /* Frameworks */, 292 | 08915FD91C5CB2989F6379C1F4C17FB8 /* Headers */, 293 | ); 294 | buildRules = ( 295 | ); 296 | dependencies = ( 297 | 5001C614385481207D30A4A467885552 /* PBXTargetDependency */, 298 | ); 299 | name = "Pods-ACRouter_Tests"; 300 | productName = "Pods-ACRouter_Tests"; 301 | productReference = D11CF261FF9092D933BBCC405C0E4A4B /* Pods_ACRouter_Tests.framework */; 302 | productType = "com.apple.product-type.framework"; 303 | }; 304 | 4263C2F335071052429B02A4393C3D10 /* ACRouter */ = { 305 | isa = PBXNativeTarget; 306 | buildConfigurationList = E8374F9A9E7A543329C902C92B9B80A4 /* Build configuration list for PBXNativeTarget "ACRouter" */; 307 | buildPhases = ( 308 | 259561DD2C41DE4662276748733C1651 /* Sources */, 309 | C75C4745FB88DFD1739B7CFD262B51D9 /* Frameworks */, 310 | A08AA16107A688355D173DE56E63CF1D /* Headers */, 311 | ); 312 | buildRules = ( 313 | ); 314 | dependencies = ( 315 | ); 316 | name = ACRouter; 317 | productName = ACRouter; 318 | productReference = F5A9293BBABBF7081A62B2AB39AB9B05 /* ACRouter.framework */; 319 | productType = "com.apple.product-type.framework"; 320 | }; 321 | 618C6FF2B0D7660F8B187A735AA041BF /* Pods-ACRouter_Example */ = { 322 | isa = PBXNativeTarget; 323 | buildConfigurationList = 439638FFEBDE2FB51A610F8D29081A61 /* Build configuration list for PBXNativeTarget "Pods-ACRouter_Example" */; 324 | buildPhases = ( 325 | 7EF2CD08A00B2B13A8917FAC46DA91E7 /* Sources */, 326 | B16A5EE698FC6CA349EDF30488D45674 /* Frameworks */, 327 | ADD35E79C81369F13C81404C78EC5D77 /* Headers */, 328 | ); 329 | buildRules = ( 330 | ); 331 | dependencies = ( 332 | C2540283AC07781B4600E41655B5BE01 /* PBXTargetDependency */, 333 | ); 334 | name = "Pods-ACRouter_Example"; 335 | productName = "Pods-ACRouter_Example"; 336 | productReference = AA4F7D252E56663F0FE98BCF470A4FDB /* Pods_ACRouter_Example.framework */; 337 | productType = "com.apple.product-type.framework"; 338 | }; 339 | /* End PBXNativeTarget section */ 340 | 341 | /* Begin PBXProject section */ 342 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 343 | isa = PBXProject; 344 | attributes = { 345 | LastSwiftUpdateCheck = 0730; 346 | LastUpgradeCheck = 0700; 347 | }; 348 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 349 | compatibilityVersion = "Xcode 3.2"; 350 | developmentRegion = English; 351 | hasScannedForEncodings = 0; 352 | knownRegions = ( 353 | en, 354 | ); 355 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 356 | productRefGroup = 64072ED2CC27C569D518CD69AC638E23 /* Products */; 357 | projectDirPath = ""; 358 | projectRoot = ""; 359 | targets = ( 360 | 4263C2F335071052429B02A4393C3D10 /* ACRouter */, 361 | 618C6FF2B0D7660F8B187A735AA041BF /* Pods-ACRouter_Example */, 362 | 25A3EDBC61BDF624094DF05591931390 /* Pods-ACRouter_Tests */, 363 | ); 364 | }; 365 | /* End PBXProject section */ 366 | 367 | /* Begin PBXSourcesBuildPhase section */ 368 | 259561DD2C41DE4662276748733C1651 /* Sources */ = { 369 | isa = PBXSourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | C75FA69A04322ABE41294DA44348A3CC /* ACCommonExtension.swift in Sources */, 373 | 8FA6F96A788168C8909303CD4253AB67 /* ACRouter+Convenience.swift in Sources */, 374 | 2F5962884B9C4CB6A21B15E4D077BDF5 /* ACRouter+Jump.swift in Sources */, 375 | 1FAD684B8D1BB6C598A5DF8AA50B4FAE /* ACRouter-dummy.m in Sources */, 376 | C1D4257F1E7CFB350024FA88 /* ACRouterInterceptor.swift in Sources */, 377 | 36FF145ADF18D526A447DAD528C3B963 /* ACRouter.swift in Sources */, 378 | 3BC95F9ED2CFF6CCC5595689999D02A0 /* ACRouterable.swift in Sources */, 379 | 010EBB387A3CC7CBB6D05973546E6045 /* ACRouterParser.swift in Sources */, 380 | F7392E2B6DFF6C675F487B9F3072603E /* ACRouterPattern.swift in Sources */, 381 | 1B2A68399513B50380C6E2D1645D33A2 /* ACRouterRequest.swift in Sources */, 382 | ); 383 | runOnlyForDeploymentPostprocessing = 0; 384 | }; 385 | 552493B627790E4C1737668A0965C15E /* Sources */ = { 386 | isa = PBXSourcesBuildPhase; 387 | buildActionMask = 2147483647; 388 | files = ( 389 | 9236FFCD55C6AC5E9B2A922FC5C9AA10 /* Pods-ACRouter_Tests-dummy.m in Sources */, 390 | ); 391 | runOnlyForDeploymentPostprocessing = 0; 392 | }; 393 | 7EF2CD08A00B2B13A8917FAC46DA91E7 /* Sources */ = { 394 | isa = PBXSourcesBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | DB75712D24E8D3A3666F33CD3E146BEB /* Pods-ACRouter_Example-dummy.m in Sources */, 398 | ); 399 | runOnlyForDeploymentPostprocessing = 0; 400 | }; 401 | /* End PBXSourcesBuildPhase section */ 402 | 403 | /* Begin PBXTargetDependency section */ 404 | 5001C614385481207D30A4A467885552 /* PBXTargetDependency */ = { 405 | isa = PBXTargetDependency; 406 | name = ACRouter; 407 | target = 4263C2F335071052429B02A4393C3D10 /* ACRouter */; 408 | targetProxy = 4E706EB199540350109E1487353CC5DF /* PBXContainerItemProxy */; 409 | }; 410 | C2540283AC07781B4600E41655B5BE01 /* PBXTargetDependency */ = { 411 | isa = PBXTargetDependency; 412 | name = ACRouter; 413 | target = 4263C2F335071052429B02A4393C3D10 /* ACRouter */; 414 | targetProxy = 74BDCC2760AFEA388A1F77DE93A7980A /* PBXContainerItemProxy */; 415 | }; 416 | /* End PBXTargetDependency section */ 417 | 418 | /* Begin XCBuildConfiguration section */ 419 | 04C6D2EB80DE749C631AE9578CAEDC9D /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | baseConfigurationReference = 730507DDB2D4DD817890CDB67E5C4D64 /* Pods-ACRouter_Example.release.xcconfig */; 422 | buildSettings = { 423 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 424 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 425 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 426 | CURRENT_PROJECT_VERSION = 1; 427 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 428 | DEFINES_MODULE = YES; 429 | DYLIB_COMPATIBILITY_VERSION = 1; 430 | DYLIB_CURRENT_VERSION = 1; 431 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 432 | ENABLE_STRICT_OBJC_MSGSEND = YES; 433 | GCC_NO_COMMON_BLOCKS = YES; 434 | INFOPLIST_FILE = "Target Support Files/Pods-ACRouter_Example/Info.plist"; 435 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 436 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 438 | MACH_O_TYPE = staticlib; 439 | MODULEMAP_FILE = "Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example.modulemap"; 440 | MTL_ENABLE_DEBUG_INFO = NO; 441 | OTHER_LDFLAGS = ""; 442 | OTHER_LIBTOOLFLAGS = ""; 443 | PODS_ROOT = "$(SRCROOT)"; 444 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 445 | PRODUCT_NAME = Pods_ACRouter_Example; 446 | SDKROOT = iphoneos; 447 | SKIP_INSTALL = YES; 448 | TARGETED_DEVICE_FAMILY = "1,2"; 449 | VERSIONING_SYSTEM = "apple-generic"; 450 | VERSION_INFO_PREFIX = ""; 451 | }; 452 | name = Release; 453 | }; 454 | 25E717AE2D1754A64DEE97BA28BBAC65 /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | baseConfigurationReference = 510A07C6E55ABC20AB85F394BEBF3924 /* ACRouter.xcconfig */; 457 | buildSettings = { 458 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 459 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 460 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 461 | CURRENT_PROJECT_VERSION = 1; 462 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 463 | DEFINES_MODULE = YES; 464 | DYLIB_COMPATIBILITY_VERSION = 1; 465 | DYLIB_CURRENT_VERSION = 1; 466 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 467 | ENABLE_STRICT_OBJC_MSGSEND = YES; 468 | GCC_NO_COMMON_BLOCKS = YES; 469 | GCC_PREFIX_HEADER = "Target Support Files/ACRouter/ACRouter-prefix.pch"; 470 | INFOPLIST_FILE = "Target Support Files/ACRouter/Info.plist"; 471 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 472 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 474 | MODULEMAP_FILE = "Target Support Files/ACRouter/ACRouter.modulemap"; 475 | MTL_ENABLE_DEBUG_INFO = NO; 476 | PRODUCT_NAME = ACRouter; 477 | SDKROOT = iphoneos; 478 | SKIP_INSTALL = YES; 479 | SWIFT_VERSION = 3.0; 480 | TARGETED_DEVICE_FAMILY = "1,2"; 481 | VERSIONING_SYSTEM = "apple-generic"; 482 | VERSION_INFO_PREFIX = ""; 483 | }; 484 | name = Release; 485 | }; 486 | 49669CAFA43E60A4272EA19ECA91EAD3 /* Debug */ = { 487 | isa = XCBuildConfiguration; 488 | baseConfigurationReference = 510A07C6E55ABC20AB85F394BEBF3924 /* ACRouter.xcconfig */; 489 | buildSettings = { 490 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 491 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 492 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 493 | CURRENT_PROJECT_VERSION = 1; 494 | DEBUG_INFORMATION_FORMAT = dwarf; 495 | DEFINES_MODULE = YES; 496 | DYLIB_COMPATIBILITY_VERSION = 1; 497 | DYLIB_CURRENT_VERSION = 1; 498 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 499 | ENABLE_STRICT_OBJC_MSGSEND = YES; 500 | GCC_NO_COMMON_BLOCKS = YES; 501 | GCC_PREFIX_HEADER = "Target Support Files/ACRouter/ACRouter-prefix.pch"; 502 | INFOPLIST_FILE = "Target Support Files/ACRouter/Info.plist"; 503 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 504 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 505 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 506 | MODULEMAP_FILE = "Target Support Files/ACRouter/ACRouter.modulemap"; 507 | MTL_ENABLE_DEBUG_INFO = YES; 508 | PRODUCT_NAME = ACRouter; 509 | SDKROOT = iphoneos; 510 | SKIP_INSTALL = YES; 511 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 512 | SWIFT_VERSION = 3.0; 513 | TARGETED_DEVICE_FAMILY = "1,2"; 514 | VERSIONING_SYSTEM = "apple-generic"; 515 | VERSION_INFO_PREFIX = ""; 516 | }; 517 | name = Debug; 518 | }; 519 | 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */ = { 520 | isa = XCBuildConfiguration; 521 | buildSettings = { 522 | ALWAYS_SEARCH_USER_PATHS = NO; 523 | CLANG_ANALYZER_NONNULL = YES; 524 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 525 | CLANG_CXX_LIBRARY = "libc++"; 526 | CLANG_ENABLE_MODULES = YES; 527 | CLANG_ENABLE_OBJC_ARC = YES; 528 | CLANG_WARN_BOOL_CONVERSION = YES; 529 | CLANG_WARN_CONSTANT_CONVERSION = YES; 530 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 531 | CLANG_WARN_EMPTY_BODY = YES; 532 | CLANG_WARN_ENUM_CONVERSION = YES; 533 | CLANG_WARN_INT_CONVERSION = YES; 534 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 535 | CLANG_WARN_UNREACHABLE_CODE = YES; 536 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 537 | CODE_SIGNING_REQUIRED = NO; 538 | COPY_PHASE_STRIP = NO; 539 | ENABLE_TESTABILITY = YES; 540 | GCC_C_LANGUAGE_STANDARD = gnu99; 541 | GCC_DYNAMIC_NO_PIC = NO; 542 | GCC_OPTIMIZATION_LEVEL = 0; 543 | GCC_PREPROCESSOR_DEFINITIONS = ( 544 | "POD_CONFIGURATION_DEBUG=1", 545 | "DEBUG=1", 546 | "$(inherited)", 547 | ); 548 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 549 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 550 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 551 | GCC_WARN_UNDECLARED_SELECTOR = YES; 552 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 553 | GCC_WARN_UNUSED_FUNCTION = YES; 554 | GCC_WARN_UNUSED_VARIABLE = YES; 555 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 556 | ONLY_ACTIVE_ARCH = YES; 557 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 558 | STRIP_INSTALLED_PRODUCT = NO; 559 | SYMROOT = "${SRCROOT}/../build"; 560 | }; 561 | name = Debug; 562 | }; 563 | 73835FB82F40231A7EED50E71752BB78 /* Release */ = { 564 | isa = XCBuildConfiguration; 565 | baseConfigurationReference = 343A1DD61C6A82C027BE12F332FE222E /* Pods-ACRouter_Tests.release.xcconfig */; 566 | buildSettings = { 567 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 568 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 569 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 570 | CURRENT_PROJECT_VERSION = 1; 571 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 572 | DEFINES_MODULE = YES; 573 | DYLIB_COMPATIBILITY_VERSION = 1; 574 | DYLIB_CURRENT_VERSION = 1; 575 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 576 | ENABLE_STRICT_OBJC_MSGSEND = YES; 577 | GCC_NO_COMMON_BLOCKS = YES; 578 | INFOPLIST_FILE = "Target Support Files/Pods-ACRouter_Tests/Info.plist"; 579 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 580 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 581 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 582 | MACH_O_TYPE = staticlib; 583 | MODULEMAP_FILE = "Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests.modulemap"; 584 | MTL_ENABLE_DEBUG_INFO = NO; 585 | OTHER_LDFLAGS = ""; 586 | OTHER_LIBTOOLFLAGS = ""; 587 | PODS_ROOT = "$(SRCROOT)"; 588 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 589 | PRODUCT_NAME = Pods_ACRouter_Tests; 590 | SDKROOT = iphoneos; 591 | SKIP_INSTALL = YES; 592 | TARGETED_DEVICE_FAMILY = "1,2"; 593 | VERSIONING_SYSTEM = "apple-generic"; 594 | VERSION_INFO_PREFIX = ""; 595 | }; 596 | name = Release; 597 | }; 598 | 8B36C5FE73088C76D904722A107AFBD4 /* Debug */ = { 599 | isa = XCBuildConfiguration; 600 | baseConfigurationReference = 1321A56EE262A3534DC96C4726ED90FE /* Pods-ACRouter_Example.debug.xcconfig */; 601 | buildSettings = { 602 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 603 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 604 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 605 | CURRENT_PROJECT_VERSION = 1; 606 | DEBUG_INFORMATION_FORMAT = dwarf; 607 | DEFINES_MODULE = YES; 608 | DYLIB_COMPATIBILITY_VERSION = 1; 609 | DYLIB_CURRENT_VERSION = 1; 610 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 611 | ENABLE_STRICT_OBJC_MSGSEND = YES; 612 | GCC_NO_COMMON_BLOCKS = YES; 613 | INFOPLIST_FILE = "Target Support Files/Pods-ACRouter_Example/Info.plist"; 614 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 615 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 616 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 617 | MACH_O_TYPE = staticlib; 618 | MODULEMAP_FILE = "Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example.modulemap"; 619 | MTL_ENABLE_DEBUG_INFO = YES; 620 | OTHER_LDFLAGS = ""; 621 | OTHER_LIBTOOLFLAGS = ""; 622 | PODS_ROOT = "$(SRCROOT)"; 623 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 624 | PRODUCT_NAME = Pods_ACRouter_Example; 625 | SDKROOT = iphoneos; 626 | SKIP_INSTALL = YES; 627 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 628 | TARGETED_DEVICE_FAMILY = "1,2"; 629 | VERSIONING_SYSTEM = "apple-generic"; 630 | VERSION_INFO_PREFIX = ""; 631 | }; 632 | name = Debug; 633 | }; 634 | 8F48E81B26A0A071C88F715D47B699EF /* Debug */ = { 635 | isa = XCBuildConfiguration; 636 | baseConfigurationReference = C4DA4692694D779750E716BAA7BA8EEA /* Pods-ACRouter_Tests.debug.xcconfig */; 637 | buildSettings = { 638 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 639 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 640 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 641 | CURRENT_PROJECT_VERSION = 1; 642 | DEBUG_INFORMATION_FORMAT = dwarf; 643 | DEFINES_MODULE = YES; 644 | DYLIB_COMPATIBILITY_VERSION = 1; 645 | DYLIB_CURRENT_VERSION = 1; 646 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 647 | ENABLE_STRICT_OBJC_MSGSEND = YES; 648 | GCC_NO_COMMON_BLOCKS = YES; 649 | INFOPLIST_FILE = "Target Support Files/Pods-ACRouter_Tests/Info.plist"; 650 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 651 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 652 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 653 | MACH_O_TYPE = staticlib; 654 | MODULEMAP_FILE = "Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests.modulemap"; 655 | MTL_ENABLE_DEBUG_INFO = YES; 656 | OTHER_LDFLAGS = ""; 657 | OTHER_LIBTOOLFLAGS = ""; 658 | PODS_ROOT = "$(SRCROOT)"; 659 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 660 | PRODUCT_NAME = Pods_ACRouter_Tests; 661 | SDKROOT = iphoneos; 662 | SKIP_INSTALL = YES; 663 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 664 | TARGETED_DEVICE_FAMILY = "1,2"; 665 | VERSIONING_SYSTEM = "apple-generic"; 666 | VERSION_INFO_PREFIX = ""; 667 | }; 668 | name = Debug; 669 | }; 670 | B7324857C38B065FEB1EEE3105C2367A /* Release */ = { 671 | isa = XCBuildConfiguration; 672 | buildSettings = { 673 | ALWAYS_SEARCH_USER_PATHS = NO; 674 | CLANG_ANALYZER_NONNULL = YES; 675 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 676 | CLANG_CXX_LIBRARY = "libc++"; 677 | CLANG_ENABLE_MODULES = YES; 678 | CLANG_ENABLE_OBJC_ARC = YES; 679 | CLANG_WARN_BOOL_CONVERSION = YES; 680 | CLANG_WARN_CONSTANT_CONVERSION = YES; 681 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 682 | CLANG_WARN_EMPTY_BODY = YES; 683 | CLANG_WARN_ENUM_CONVERSION = YES; 684 | CLANG_WARN_INT_CONVERSION = YES; 685 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 686 | CLANG_WARN_UNREACHABLE_CODE = YES; 687 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 688 | CODE_SIGNING_REQUIRED = NO; 689 | COPY_PHASE_STRIP = YES; 690 | ENABLE_NS_ASSERTIONS = NO; 691 | GCC_C_LANGUAGE_STANDARD = gnu99; 692 | GCC_PREPROCESSOR_DEFINITIONS = ( 693 | "POD_CONFIGURATION_RELEASE=1", 694 | "$(inherited)", 695 | ); 696 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 697 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 698 | GCC_WARN_UNDECLARED_SELECTOR = YES; 699 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 700 | GCC_WARN_UNUSED_FUNCTION = YES; 701 | GCC_WARN_UNUSED_VARIABLE = YES; 702 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 703 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 704 | STRIP_INSTALLED_PRODUCT = NO; 705 | SYMROOT = "${SRCROOT}/../build"; 706 | VALIDATE_PRODUCT = YES; 707 | }; 708 | name = Release; 709 | }; 710 | /* End XCBuildConfiguration section */ 711 | 712 | /* Begin XCConfigurationList section */ 713 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 714 | isa = XCConfigurationList; 715 | buildConfigurations = ( 716 | 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, 717 | B7324857C38B065FEB1EEE3105C2367A /* Release */, 718 | ); 719 | defaultConfigurationIsVisible = 0; 720 | defaultConfigurationName = Release; 721 | }; 722 | 439638FFEBDE2FB51A610F8D29081A61 /* Build configuration list for PBXNativeTarget "Pods-ACRouter_Example" */ = { 723 | isa = XCConfigurationList; 724 | buildConfigurations = ( 725 | 8B36C5FE73088C76D904722A107AFBD4 /* Debug */, 726 | 04C6D2EB80DE749C631AE9578CAEDC9D /* Release */, 727 | ); 728 | defaultConfigurationIsVisible = 0; 729 | defaultConfigurationName = Release; 730 | }; 731 | E6A33A6A4438586971352F84B6A87694 /* Build configuration list for PBXNativeTarget "Pods-ACRouter_Tests" */ = { 732 | isa = XCConfigurationList; 733 | buildConfigurations = ( 734 | 8F48E81B26A0A071C88F715D47B699EF /* Debug */, 735 | 73835FB82F40231A7EED50E71752BB78 /* Release */, 736 | ); 737 | defaultConfigurationIsVisible = 0; 738 | defaultConfigurationName = Release; 739 | }; 740 | E8374F9A9E7A543329C902C92B9B80A4 /* Build configuration list for PBXNativeTarget "ACRouter" */ = { 741 | isa = XCConfigurationList; 742 | buildConfigurations = ( 743 | 49669CAFA43E60A4272EA19ECA91EAD3 /* Debug */, 744 | 25E717AE2D1754A64DEE97BA28BBAC65 /* Release */, 745 | ); 746 | defaultConfigurationIsVisible = 0; 747 | defaultConfigurationName = Release; 748 | }; 749 | /* End XCConfigurationList section */ 750 | }; 751 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 752 | } 753 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ACRouter/ACRouter-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ACRouter : NSObject 3 | @end 4 | @implementation PodsDummy_ACRouter 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ACRouter/ACRouter-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ACRouter/ACRouter-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 ACRouterVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char ACRouterVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ACRouter/ACRouter.modulemap: -------------------------------------------------------------------------------- 1 | framework module ACRouter { 2 | umbrella header "ACRouter-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ACRouter/ACRouter.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ACRouter 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ACRouter/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ACRouter 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 SnowCheng 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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-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) 2017 SnowCheng 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 | ACRouter 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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ACRouter_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ACRouter_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/ACRouter/ACRouter.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/ACRouter/ACRouter.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ACRouter_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ACRouter_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ACRouter" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ACRouter/ACRouter.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ACRouter" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ACRouter_Example { 2 | umbrella header "Pods-ACRouter_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Example/Pods-ACRouter_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ACRouter" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ACRouter/ACRouter.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ACRouter" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ACRouter 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 SnowCheng 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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-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) 2017 SnowCheng 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 | ACRouter 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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ACRouter_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ACRouter_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/ACRouter/ACRouter.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/ACRouter/ACRouter.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ACRouter_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ACRouter_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ACRouter" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ACRouter/ACRouter.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ACRouter" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ACRouter_Tests { 2 | umbrella header "Pods-ACRouter_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ACRouter_Tests/Pods-ACRouter_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ACRouter" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ACRouter/ACRouter.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ACRouter" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | @testable import ACRouter 4 | 5 | class Tests: XCTestCase { 6 | 7 | let p1 = "AA://bb" 8 | let p2 = "AA://bb/cc" 9 | let p3 = "AA://bb/cc/ee" 10 | let p4 = "AA://bb/:cc/dd" 11 | 12 | let relocationUrl = "xx://xx/xx/xx" 13 | 14 | override func setUp() { 15 | super.setUp() 16 | 17 | ACRouter.addRouter(p1) {_ in return nil} 18 | ACRouter.addRouter(p2) {_ in return nil} 19 | ACRouter.addRouter(p3) {_ in return nil} 20 | ACRouter.addRouter(p4) {_ in return nil} 21 | 22 | ACRouter.addInterceptor([p1], priority: 0) { info -> Bool in 23 | if let string = info["shoudContinue1"] as? String, 24 | let shoudContinue = Bool(string) { 25 | return shoudContinue 26 | } 27 | return true 28 | } 29 | 30 | ACRouter.addInterceptor([p4], priority: 1) { info -> Bool in 31 | if let string = info["shoudContinue2"] as? String, 32 | let shoudContinue = Bool(string) { 33 | return shoudContinue 34 | } 35 | return true 36 | } 37 | 38 | ACRouter.addRelocationHandle { (urlString) -> String? in 39 | 40 | let dict = [self.relocationUrl: self.p1] 41 | return dict[urlString] 42 | 43 | } 44 | 45 | } 46 | 47 | func testResponse() { 48 | let response = ACRouter.requestURL("AA://bb/hello/dd?query=value1#?newquery=newvalue", userInfo: ["query": "value2" as AnyObject]) 49 | 50 | XCTAssertEqual(response.pattern?.patternString, p4) 51 | XCTAssertEqual(response.queries["cc"] as? String, "hello") 52 | XCTAssertEqual(response.queries["query"] as! [String], ["value1", "value2"]) 53 | XCTAssertEqual(response.queries["newquery"]as? String, "newvalue") 54 | } 55 | 56 | func testRelocation() { 57 | 58 | var response = ACRouter.requestURL("yy://yy/yy/yy") 59 | XCTAssertNil(response.pattern) 60 | 61 | response = ACRouter.requestURL(relocationUrl) 62 | XCTAssertNotNil(response.pattern) 63 | } 64 | 65 | func testIntercept() { 66 | var response: ACRouter.RouteResponse 67 | 68 | //p1 69 | response = ACRouter.requestURL("AA://bb?shoudContinue1=true&shoudContinue2=true") 70 | XCTAssertNotNil(response.pattern) 71 | 72 | response = ACRouter.requestURL("AA://bb?shoudContinue1=false&shoudContinue2=false") 73 | XCTAssertNil(response.pattern) 74 | 75 | response = ACRouter.requestURL("AA://bb?shoudContinue1=true&shoudContinue2=false") 76 | XCTAssertNil(response.pattern) 77 | 78 | response = ACRouter.requestURL("AA://bb?shoudContinue1=false&shoudContinue2=true") 79 | XCTAssertNotNil(response.pattern) 80 | 81 | //p2 82 | response = ACRouter.requestURL("AA://bb/cc?shoudContinue1=true&shoudContinue2=true") 83 | XCTAssertNotNil(response.pattern) 84 | 85 | response = ACRouter.requestURL("AA://bb/cc?shoudContinue1=false&shoudContinue2=false") 86 | XCTAssertNil(response.pattern) 87 | 88 | response = ACRouter.requestURL("AA://bb/cc?shoudContinue1=true&shoudContinue2=false") 89 | XCTAssertNil(response.pattern) 90 | 91 | response = ACRouter.requestURL("AA://bb/cc?shoudContinue1=false&shoudContinue2=true") 92 | XCTAssertNil(response.pattern) 93 | 94 | //p4 95 | response = ACRouter.requestURL("AA://bb/helllo/dd?shoudContinue1=true&shoudContinue2=true") 96 | XCTAssertNotNil(response.pattern) 97 | 98 | response = ACRouter.requestURL("AA://bb/helllo/dd?shoudContinue1=false&shoudContinue2=false") 99 | XCTAssertNil(response.pattern) 100 | 101 | response = ACRouter.requestURL("AA://bb/helllo/dd?shoudContinue1=true&shoudContinue2=false") 102 | XCTAssertNotNil(response.pattern) 103 | 104 | response = ACRouter.requestURL("AA://bb/helllo/dd?shoudContinue1=false&shoudContinue2=true") 105 | XCTAssertNil(response.pattern) 106 | 107 | } 108 | 109 | func testRequest() { 110 | var s = "AA://bb/cc/dd?query=value" 111 | var r = ACRouterRequest.init(s) 112 | XCTAssertEqual(r.sheme, "AA") 113 | XCTAssertEqual(r.paths, ["bb", "cc", "dd"]) 114 | XCTAssertEqual(r.queries as! [String: String], ["query": "value"]) 115 | 116 | s = "AA://bb/cc/dd?query=value#newPath" 117 | r = ACRouterRequest.init(s) 118 | XCTAssertEqual(r.sheme, "AA") 119 | XCTAssertEqual(r.paths, ["bb", "cc", "dd", "newPath"]) 120 | XCTAssertEqual(r.queries as! [String: String], ["query": "value"]) 121 | 122 | s = "AA://bb/cc/dd?query=value#?newquery=newvalue" 123 | r = ACRouterRequest.init(s) 124 | XCTAssertEqual(r.sheme, "AA") 125 | XCTAssertEqual(r.paths, ["bb", "cc", "dd"]) 126 | XCTAssertEqual(r.queries as! [String: String], ["query": "value", "newquery": "newvalue"]) 127 | 128 | s = "AA://bb/cc/dd?query=value#newPath?newquery=newvalue" 129 | r = ACRouterRequest.init(s) 130 | XCTAssertEqual(r.sheme, "AA") 131 | XCTAssertEqual(r.paths, ["bb", "cc", "dd", "newPath"]) 132 | XCTAssertEqual(r.queries as! [String: String], ["query": "value", "newquery": "newvalue"]) 133 | } 134 | 135 | func testPattern() { 136 | var s = "AA://bb/:cc/dd" 137 | var p = ACRouterPattern.init(s) {_ in return nil} 138 | XCTAssertEqual(p.sheme, "AA") 139 | XCTAssertEqual(p.patternPaths, ["bb", ":cc", "dd"]) 140 | XCTAssertEqual(p.paramsMatchDict, ["cc": 1]) 141 | XCTAssertEqual(p.matchString, "bb/~AC~/dd") 142 | 143 | s = "AA://bb/:cc/dd?query=value#newPath?newqury=newvalue" 144 | p = ACRouterPattern.init(s) {_ in return nil} 145 | XCTAssertEqual(p.sheme, "AA") 146 | XCTAssertEqual(p.patternPaths, ["bb", ":cc", "dd", "newPath"]) 147 | XCTAssertEqual(p.paramsMatchDict, ["cc": 1]) 148 | XCTAssertEqual(p.matchString, "bb/~AC~/dd/newPath") 149 | } 150 | 151 | func testGenerateURL() { 152 | let s1 = "AA://bb/:cc/dd" 153 | let p1 = ["cc": "value1", "ee": "value2"] 154 | let u1 = ACRouter.generate(s1, params: p1, jumpType: .modal) 155 | 156 | let r1 = ["AA://bb/value1/dd?ACJumpTypeKey=ACJumpTypeModal&ee=value2", 157 | "AA://bb/value1/dd?ee=value2&ACJumpTypeKey=ACJumpTypeModal"] 158 | XCTAssert(r1.contains(u1)) 159 | 160 | } 161 | 162 | } 163 | -------------------------------------------------------------------------------- /Images/process.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Archerlly/ACRouter/687103c4c85c12eca2e2f4fb5c1efef45cc57dc8/Images/process.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 SnowCheng 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 | -------------------------------------------------------------------------------- /Notes.md: -------------------------------------------------------------------------------- 1 | ## ACRouter 造轮子的由来 2 | 现在已经有很成熟的Router工具, 如 JLRoutes 与 MGJRouter, 它们的star和使用者都不少, 那么我为什么还要自己造轮子呢? 3 | 1. 这些都是用OC写的, 对于一个纯Swift项目, 总感觉哪不对劲 4 | 2. 这些第三方都有自己的一个侧重点, 如JLRoutes更侧重于URL的解析, 而MGJRouter则侧重于解析后的使用, 确切来说后者是基于前者并在自己的使用场景下开发完成的. 而对于ACRouter的功能侧重点又与前两者不一样 5 | 3. 抱着学习的心态, 对于大部分coder造轮子的初衷就是学习, 并且能使学习的成果产出并被大家认可 6 | 7 | **Router的定义:** 路由是把信息从源穿过网络传递到目的的行为 8 | 9 | ACRouter并不是要实现一个能将所有信息转化后传递到目的地的工具, 而只是一个简单的页面路由, 希望项目中的页面跳转不再需要彼此相互依赖, 只需要像Web一般通过一个特殊的URL就能完成页面间的跳转. 10 | 11 | 页面路由其实是做项目组件化的一个衍生物, 组件化需要将整个项目的各个模块进行解耦, 而对于模块间页面相互跳转的解耦, 如今最佳的解决方案就是页面路由. 12 | 页面路由并不是一个新的概念, 早在几年前就已经在实际App项目中使用了, 但当时这并不是大家的痛点, 所以并没有兴起. 而如今手机App的功能越来越复杂多样. 之前的一个Target, 一个Module的项目结构已经无法支持其快速发展与迭代了. 13 | 14 | 个人对Router的理解并不是解耦, 而是转移耦合. 将部分耦合转移到模块内部或由一个公共的工具统一管理, 实现在模块外部来看完成了模块间的解耦的`假象`. 尽管这是一个解耦的`假象`, 但是对于模块外的使用确实带来了不少的便利. 15 | 16 | 由于需要转移耦合, 做到高内聚低耦合, 因此必不可少的需要不少胶水代码, 使其”粘”在Router的这根主线上. 所以总体看来使用Router并不会带来明显的代码量减少, 但是对于项目结构的管理与多模块的并行开发带来了不少的优势, 但这种优势对于小项目可能无法体现, 但是对于大项目组件化已经成为了必不可少的一部分. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ACRouter 2 | 3 | [![CI Status](http://img.shields.io/travis/260732891@qq.com/ACRouter.svg?style=flat)](https://travis-ci.org/260732891@qq.com/ACRouter) 4 | [![Version](https://img.shields.io/cocoapods/v/ACRouter.svg?style=flat)](http://cocoapods.org/pods/ACRouter) 5 | [![License](https://img.shields.io/cocoapods/l/ACRouter.svg?style=flat)](http://cocoapods.org/pods/ACRouter) 6 | [![Platform](https://img.shields.io/cocoapods/p/ACRouter.svg?style=flat)](http://cocoapods.org/pods/ACRouter) 7 | 8 | ## Introduce 9 | 10 | A simple router for swift [中文文档](README_CN.md) 11 | 12 | ## Process 13 | ![sdf](./Images/process.jpg) 14 | 15 | ## Requirements 16 | 17 | swift3+ and xcode8+ 18 | 19 | ## Installation 20 | 21 | ```ruby 22 | pod "ACRouter" 23 | ``` 24 | 25 | ## How To Use 26 | 27 | 1. CustomViewController inherit ACRouterable, and implement the func of registerAction. 28 | ``` swift 29 | class CustomViewController: UIViewController, ACRouterable { 30 | static func registerAction(info: [String : AnyObject]) -> AnyObject { 31 | let newInstance = LoginViewController() 32 | if let title = info["username"] as? String { 33 | newInstance.title = title 34 | } 35 | return newInstance 36 | } 37 | } 38 | ``` 39 | 2. RegisterRouter for your CustomViewController 40 | ``` swift 41 | ACRouter.addRouter("AA://bb/cc/:p1", classString: "CustomViewController") 42 | ``` 43 | 44 | 3. OpenURL in you application 45 | ``` swift 46 | ACRouter.openURL("AA://bb/cc/content?value1=testInfo") 47 | ``` 48 | 49 | ## Convenience 50 | - Quickly add multiple router 51 | ``` swift 52 | let registerDict = ["AA://bb/cc/:p1" : "CustomViewControllerOne", "AA://ee/ff" : "CustomViewControllerTwo"] 53 | ACRouter.addRouter(registerDict) 54 | ``` 55 | - Quickly genarate jump 56 | ``` swift 57 | ACRouter.generate(_ patternString: params: jumpType: ) 58 | ``` 59 | It will parse patternString and embed the params and the jumpType in it 60 | - Check the request URL 61 | ``` swift 62 | canOpenURL(_ urlString: ) 63 | ``` 64 | - remove router 65 | ``` swift 66 | removeRouter(_ patternString: ) 67 | ``` 68 | 69 | ## Custom Use 70 | 1. AddRouter 71 | ``` swift 72 | ACRouter.addRouter(patternString: priority: handle: ) 73 | ``` 74 | It will store pattern information, and sort by priority reverse order 75 | 2. RequestRouter 76 | ``` swift 77 | ACRouter.requestURL(urlString: userInfo: ) 78 | ``` 79 | Request the real urlString, and response the pattern information and the queries which contain the userInfo. if exist the same key, it will embed in array. 80 | 81 | ## Todo list 82 | - [X] ~~Add Interceptor for router~~ 83 | - [X] ~~Add Test for router~~ 84 | - [X] ~~Add `openURL` failed action~~ 85 | - [X] Add `relocation` 86 | - [ ] `openURL` not only support Viewcontroller jumping 87 | 88 | ## Author 89 | 90 | 2302693080@qq.com 91 | 92 | ## License 93 | 94 | ACRouter is available under the MIT license. See the LICENSE file for more info. 95 | -------------------------------------------------------------------------------- /README_CN.md: -------------------------------------------------------------------------------- 1 | # ACRouter 2 | 3 | [![CI Status](http://img.shields.io/travis/260732891@qq.com/ACRouter.svg?style=flat)](https://travis-ci.org/260732891@qq.com/ACRouter) 4 | [![Version](https://img.shields.io/cocoapods/v/ACRouter.svg?style=flat)](http://cocoapods.org/pods/ACRouter) 5 | [![License](https://img.shields.io/cocoapods/l/ACRouter.svg?style=flat)](http://cocoapods.org/pods/ACRouter) 6 | [![Platform](https://img.shields.io/cocoapods/p/ACRouter.svg?style=flat)](http://cocoapods.org/pods/ACRouter) 7 | 8 | ## 简介 9 | 10 | 针对swift的页面路由 [路由的理解](Notes.md) 11 | 12 | ## 要求 13 | 14 | swift3+ and xcode8+ 15 | 16 | ## 安装 17 | 18 | ```ruby 19 | pod "ACRouter" 20 | ``` 21 | 22 | ## 总体流程 23 | ![sdf](./Images/process.jpg) 24 | 25 | ## 快速使用 26 | 27 | 1. 需要路由的控制器遵守协议`ACRouterable`, 并实现方法`registerAction`. 28 | ``` swift 29 | class CustomViewController: UIViewController, ACRouterable { 30 | static func registerAction(info: [String : AnyObject]) -> AnyObject { 31 | let newInstance = LoginViewController() 32 | if let title = info["username"] as? String { 33 | newInstance.title = title 34 | } 35 | return newInstance 36 | } 37 | } 38 | ``` 39 | 2. 注册路由 40 | ``` swift 41 | ACRouter.addRouter("AA://bb/cc/:p1", classString: "CustomViewController") 42 | ``` 43 | 44 | 3. 通过URL打开控制器 45 | ``` swift 46 | ACRouter.openURL("AA://bb/cc/content?value1=testInfo") 47 | ``` 48 | 49 | ## 便利方法 50 | - 快速添加路由映射关系 51 | ``` swift 52 | let registerDict = ["AA://bb/cc/:p1" : "CustomViewControllerOne", "AA://ee/ff" : "CustomViewControllerTwo"] 53 | ACRouter.addRouter(registerDict) 54 | ``` 55 | 56 | - 快速生成跳转URL 57 | ``` swift 58 | //自动将参数params和jumptype嵌入到注册的URL当中 59 | ACRouter.generate(_ patternString: params: jumpType: ) 60 | ``` 61 | 62 | - 检查跳转URL 63 | ``` swift 64 | canOpenURL(_ urlString: ) 65 | ``` 66 | 67 | - 移除路由 68 | ``` swift 69 | removeRouter(_ patternString: ) 70 | ``` 71 | 72 | ## 自定义使用 73 | 1. 添加路由, 自己配置优先级和HandleBlock 74 | ``` swift 75 | //注册的路由将按优先级逆序排序 76 | ACRouter.addRouter(patternString: priority: handle: ) 77 | ``` 78 | 79 | 2. 请求URL 80 | ``` swift 81 | //返回匹配的路由与所有解析出来的参数 82 | ACRouter.requestURL(urlString: userInfo: ) 83 | ``` 84 | 85 | ## Todo list 86 | - [X] ~~Add `Interceptor` for router~~ 87 | - [X] ~~Add Test for router~~ 88 | - [X] ~~Add `openURL` failed action~~ 89 | - [X] Add `relocation` 90 | - [ ] `openURL` not only support Viewcontroller jumping 91 | 92 | ## 致谢 93 | [JLRoutes](https://github.com/joeldev/JLRoutes) 、 94 | [MGJRouter](https://github.com/meili/MGJRouter) 、 95 | [ARoutes]() 96 | 97 | 欢迎提出你们宝贵的意见, 你们的star与issue是我前进的动力 98 | 99 | 100 | ## License 101 | 102 | ACRouter is available under the MIT license. See the LICENSE file for more info. 103 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------