├── Navigation
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController3.swift
├── MyModel.swift
├── ViewController2.swift
├── Navigation
│ ├── Storyboard.swift
│ └── Navigation.swift
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── ViewController.swift
├── AppDelegate.swift
└── New Group
│ └── Main2.storyboard
├── Navigation.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── Guillian.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── Guillian.xcuserdatad
│ │ ├── xcschemes
│ │ └── xcschememanagement.plist
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── project.pbxproj
├── Storyboard.swift
├── LICENSE
├── README.md
└── Navigation.swift
/Navigation/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Navigation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Navigation.xcodeproj/project.xcworkspace/xcuserdata/Guillian.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LeBzul/Navigation/HEAD/Navigation.xcodeproj/project.xcworkspace/xcuserdata/Guillian.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Navigation/ViewController3.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController3.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 02/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 |
12 | class ViewController3: UIViewController {
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/Navigation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Navigation/MyModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MyModel.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 05/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class MyModel {
12 | var value: String = ""
13 |
14 | init(value: String) {
15 | self.value = value
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Navigation.xcodeproj/xcuserdata/Guillian.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Navigation.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Navigation/ViewController2.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController2.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 02/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController2: UIViewController {
12 |
13 | @IBAction func showController3() {
14 | if let controller = Navigation.getViewController("Controller3") {
15 | self.navigationController?.pushViewController(controller, animated: true)
16 | }
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/Storyboard.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Storyboard.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 09/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class Storyboard {
12 | var fileName: String!
13 | var entryPoint: String!
14 |
15 | var externalReferenceName: [(key: String, id: String)]!
16 | var arrayController: [(name: String, id: String)]!
17 |
18 | init(fileName: String, entryPoint: String, arrayController: [(name: String, id: String)], externalReferenceName: [(key: String, id: String)]) {
19 | self.fileName = fileName
20 | self.entryPoint = entryPoint
21 | self.arrayController = arrayController
22 | self.externalReferenceName = externalReferenceName
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Navigation/Navigation/Storyboard.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Storyboard.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 09/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class Storyboard {
12 | var fileName: String!
13 | var entryPoint: String!
14 |
15 | var externalReferenceName: [(key: String, id: String)]!
16 | var arrayController: [(name: String, id: String)]!
17 |
18 | init(fileName: String, entryPoint: String, arrayController: [(name: String, id: String)], externalReferenceName: [(key: String, id: String)]) {
19 | self.fileName = fileName
20 | self.entryPoint = entryPoint
21 | self.arrayController = arrayController
22 | self.externalReferenceName = externalReferenceName
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Navigation.xcodeproj/xcuserdata/Guillian.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2019 LeBzul
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/Navigation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Navigation
2 |
3 | - Simplifies UIViewController instantiation using only the controller StoryboardID.
4 | - Check the existence of a UIViewController in the project with the controller StoryboardID
5 | - Return list name (file name) of Storyboard in project
6 | - Return list name (StoryboardID) of UIViewController in project
7 | - Return list id of external storyboard reference for specific Storyboard
8 | - Return entry point for specific Storyboard
9 |
10 | ## Installation
11 |
12 | Import Navigation.swift and Storyboard.swift in your project (or use example project)
13 |
14 | ## Usage
15 |
16 | Return a initialised UIViewController just with Name (Name is a StoryboardId)
17 |
18 | ```Swift
19 | if let controller = Navigation.getViewController("MyController") {
20 | self.navigationController?.pushViewController(controller, animated: true)
21 | }
22 | ```
23 |
24 | Verify if controller exist in project
25 |
26 | ```Swift
27 | if Navigation.controllerExist("MyController") {
28 | print("MyController exist")
29 | }
30 | ```
31 |
32 | Return all storyboard name (file name)
33 |
34 | ```Swift
35 | Navigation.getAllStoryboardName()
36 | ```
37 | Return all UIViewController name (StoryboardID)
38 |
39 | ```Swift
40 | Navigation.getAllViewControllerName()
41 | ```
42 | Return all UIViewController name (StoryboardID) for specific Storyboard
43 |
44 | ```Swift
45 | Navigation.getAllViewController(inStoryboard: "Main")
46 | ```
47 |
48 | Return Entry point name for specific Storyboard
49 |
50 | ```Swift
51 | Navigation.getEntryPoint(inStoryboard: "Main")
52 | ```
53 |
54 | Return External storyboard reference name for specific Storyboard
55 |
56 | ```Swift
57 | Navigation.getExternalStoryboardReference(inStoryboard: "Main")
58 | ```
59 |
60 |
61 | # License
62 | Navigation is available under the MIT license. See the [LICENSE](LICENSE) file for more info.
63 | If you use it, I'll be happy to know about it.
64 |
--------------------------------------------------------------------------------
/Navigation/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Navigation/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/Navigation/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 02/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | @IBOutlet var label: UILabel!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | var text = ""
19 | text += "-> ALL Storyboard Name :\n"
20 | text += "\(Navigation.getAllStoryboardName())\n\n"
21 |
22 | text += "-> ALL ViewController IdStoryboard :\n"
23 | text += "\(Navigation.getAllViewControllerId())\n\n"
24 |
25 | text += "-> ViewController IdStoryboard in Main Storyboard :\n"
26 | text += "\(Navigation.getAllViewControllerId(inStoryboard: "Main"))\n\n"
27 |
28 | text += "-> ViewController IdStoryboard \"Hello\" exist ?\n"
29 | text += "\(Navigation.controllerExist("hello"))\n\n"
30 |
31 | text += "-> ViewController IdStoryboard \"MainViewController\" exist?\n"
32 | text += "\(Navigation.controllerExist("MainViewController"))\n\n"
33 |
34 | text += "-> Get ViewController IdStoryboard \"MainViewController\" :\n"
35 | text += "\(Navigation.getViewController("MainViewController"))\n\n"
36 |
37 | text += "-> Get ViewController IdStoryboard \"Hello\" :\n"
38 | text += "\(Navigation.getViewController("Hello"))\n\n"
39 |
40 | text += "-> Get entry point in Main Storyboard :\n"
41 | text += "\(Navigation.getEntryPoint(inStoryboard: "Main"))\n\n"
42 |
43 | text += "-> Get External Storyboard reference in Main :\n"
44 | text += "\(Navigation.getExternalStoryboardReference(inStoryboard: "Main"))\n\n"
45 |
46 | label.text = text
47 | }
48 |
49 | @IBAction func showController2() {
50 | if let controller = Navigation.getViewController("Controller2") {
51 | self.navigationController?.pushViewController(controller, animated: true)
52 | }
53 | }
54 |
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/Navigation/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 02/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
17 |
18 | return true
19 | }
20 |
21 | func applicationWillResignActive(_ application: UIApplication) {
22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
24 | }
25 |
26 | func applicationDidEnterBackground(_ application: UIApplication) {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | func applicationWillEnterForeground(_ application: UIApplication) {
32 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
33 | }
34 |
35 | func applicationDidBecomeActive(_ application: UIApplication) {
36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
37 | }
38 |
39 | func applicationWillTerminate(_ application: UIApplication) {
40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
41 | }
42 |
43 |
44 | }
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Navigation/New Group/Main2.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 |
--------------------------------------------------------------------------------
/Navigation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Navigation.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 02/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | // Alias
12 | public let Navigation = NavigationSingleton.instance
13 |
14 | public class NavigationSingleton {
15 | // Singleton
16 | internal static let instance = NavigationSingleton()
17 |
18 | enum PlistKey: String {
19 | case identifierNibName = "UIViewControllerIdentifiersToNibNames"
20 | case entryPoint = "UIStoryboardDesignatedEntryPointIdentifier"
21 | case externalReference = "UIViewControllerIdentifiersToExternalStoryboardReferences"
22 | }
23 |
24 | private var storyboards: [Storyboard]!
25 |
26 | private init() {
27 | storyboards = contructArrayStoryboard()
28 | }
29 |
30 | private func contructArrayStoryboard() -> [Storyboard] {
31 | var storyboards = [Storyboard]()
32 | var arrayName = [String]()
33 |
34 | if let directory = Bundle.main.resourcePath {
35 | // Storyboard file is in Base.lproj
36 | let allResources = try! FileManager.default.contentsOfDirectory(atPath: directory)
37 | // Filtered and add storyboard file
38 | arrayName.append(contentsOf: allResources.filter({ $0.hasSuffix(".storyboardc" )}))
39 | for name in arrayName {
40 | let shortName = name.split(separator: ".")[0] // cut extension
41 | storyboards += findAndParsePlist(in: "\(directory)/\(name)", shortName: String(shortName))
42 | }
43 |
44 | arrayName = [String]()
45 | let lprojs = allResources.filter({ $0.hasSuffix(".lproj" )})
46 | for lproj in lprojs {
47 | let allResources = try! FileManager.default.contentsOfDirectory(atPath: "\(directory)/\(lproj)")
48 | // Filtered and add storyboard file
49 | arrayName.append(contentsOf: allResources.filter({ $0.hasSuffix(".storyboardc" )}))
50 | for name in arrayName {
51 | let shortName = name.split(separator: ".")[0]
52 | storyboards += findAndParsePlist(in: "\(directory)/\(lproj)/\(name)", shortName: String(shortName))
53 | }
54 | }
55 | }
56 | return storyboards
57 | }
58 |
59 | // Search plist in "storyboardc", Parse and
60 | // Return : [Storyboard]
61 | private func findAndParsePlist(in storyboardName: String, shortName: String) -> [Storyboard] {
62 | var storyboardArray = [Storyboard]()
63 |
64 | let directory = "\(storyboardName)"
65 | if let directory = URL(string: directory) {
66 | guard let files = try? FileManager.default.contentsOfDirectory(at: directory, includingPropertiesForKeys: nil, options: FileManager.DirectoryEnumerationOptions.skipsHiddenFiles) else {
67 | return [Storyboard]()
68 | }
69 |
70 | let plists = files.filter({ $0.pathExtension == "plist"})
71 | for plist in plists {
72 | if let storyboard = parsePlist(file: plist.absoluteString, shortName: shortName) {
73 | storyboardArray.append(storyboard)
74 | }
75 | }
76 | }
77 | return storyboardArray
78 | }
79 |
80 | private func parsePlist(file: String, shortName: String) -> Storyboard? {
81 | var nsDictionary = NSDictionary()
82 | if let url = URL(string: file) {
83 | nsDictionary = NSDictionary(contentsOf: url) ?? NSDictionary()
84 |
85 | let entryPoint: String = (nsDictionary.value(forKey: PlistKey.entryPoint.rawValue) as? String) ?? "none"
86 | let identifiersNibName = (nsDictionary.value(forKey: PlistKey.identifierNibName.rawValue) as? Dictionary) ?? Dictionary()
87 |
88 |
89 | let externalReference = (nsDictionary.value(forKey: PlistKey.externalReference.rawValue) as? Dictionary>) ?? Dictionary>()
90 |
91 |
92 | var externalReferenceName = [(key: String, id: String)]()
93 | for reference in externalReference {
94 | for controller in reference.value {
95 | externalReferenceName.append((key: reference.key, id: controller.value))
96 | }
97 | }
98 |
99 | var arrayController = [(name: String, id: String)]()
100 | for idDictionnary in identifiersNibName {
101 | arrayController.append((name: idDictionnary.key, id: idDictionnary.key))
102 | }
103 | return Storyboard(fileName: shortName,
104 | entryPoint: entryPoint,
105 | arrayController: arrayController,
106 | externalReferenceName: externalReferenceName)
107 | }
108 | return nil
109 | }
110 |
111 | // MARK : - Accessible method
112 | // Return true if dictionnary contain controller Name
113 | func controllerExist(_ id: String) -> Bool {
114 | for storyboard in storyboards {
115 | for controllersName in storyboard.arrayController where controllersName.id == id {
116 | return true
117 | }
118 | }
119 | return false
120 | }
121 |
122 | func getEntryPoint(inStoryboard name: String) -> String? {
123 | for storyboard in storyboards where storyboard.fileName == name {
124 | return storyboard.entryPoint
125 | }
126 | return nil
127 | }
128 |
129 | func getExternalStoryboardReference(inStoryboard name: String) -> [String] {
130 | var arrayName = [String]()
131 | for storyboard in storyboards where storyboard.fileName == name {
132 | for reference in storyboard.externalReferenceName {
133 | arrayName.append(reference.id)
134 | }
135 | }
136 | return arrayName
137 | }
138 |
139 |
140 | func getViewController(_ id: String) -> UIViewController? {
141 | for storyboard in storyboards {
142 | for controller in storyboard.arrayController where controller.id == id {
143 | let storyboard = UIStoryboard(name: storyboard.fileName, bundle: nil)
144 | return storyboard.instantiateViewController(withIdentifier: controller.id)
145 | }
146 | }
147 | return nil
148 | }
149 |
150 | func getAllStoryboardName() -> [String] {
151 | var arrayNames = [String]()
152 | for storyboard in storyboards {
153 | arrayNames.append(storyboard.fileName)
154 | }
155 | return arrayNames
156 | }
157 |
158 | func getAllViewControllerId() -> [String] {
159 | var arrayNames = [String]()
160 | for storyboard in storyboards {
161 | for controllerName in storyboard.arrayController {
162 | arrayNames.append(controllerName.id)
163 | }
164 | }
165 | return arrayNames
166 | }
167 |
168 | func getAllViewControllerId(inStoryboard name: String) -> [String] {
169 | var arrayNames = [String]()
170 | for storyboard in storyboards where storyboard.fileName == name {
171 | for controllerName in storyboard.arrayController {
172 | arrayNames.append(controllerName.id)
173 | }
174 | }
175 | return arrayNames
176 | }
177 | }
178 |
--------------------------------------------------------------------------------
/Navigation/Navigation/Navigation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Navigation.swift
3 | // Navigation
4 | //
5 | // Created by Drouin on 02/04/2019.
6 | // Copyright © 2019 VersusMind. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | // Alias
12 | public let Navigation = NavigationSingleton.instance
13 |
14 | public class NavigationSingleton {
15 | // Singleton
16 | internal static let instance = NavigationSingleton()
17 |
18 | enum PlistKey: String {
19 | case identifierNibName = "UIViewControllerIdentifiersToNibNames"
20 | case entryPoint = "UIStoryboardDesignatedEntryPointIdentifier"
21 | case externalReference = "UIViewControllerIdentifiersToExternalStoryboardReferences"
22 | }
23 |
24 | private var storyboards: [Storyboard]!
25 |
26 | private init() {
27 | storyboards = contructArrayStoryboard()
28 | }
29 |
30 | private func contructArrayStoryboard() -> [Storyboard] {
31 | var storyboards = [Storyboard]()
32 | var arrayName = [String]()
33 |
34 | if let directory = Bundle.main.resourcePath {
35 | // Storyboard file is in Base.lproj
36 | let allResources = try! FileManager.default.contentsOfDirectory(atPath: directory)
37 | // Filtered and add storyboard file
38 | arrayName.append(contentsOf: allResources.filter({ $0.hasSuffix(".storyboardc" )}))
39 | for name in arrayName {
40 | let shortName = name.split(separator: ".")[0] // cut extension
41 | storyboards += findAndParsePlist(in: "\(directory)/\(name)", shortName: String(shortName))
42 | }
43 |
44 | arrayName = [String]()
45 | let lprojs = allResources.filter({ $0.hasSuffix(".lproj" )})
46 | for lproj in lprojs {
47 | let allResources = try! FileManager.default.contentsOfDirectory(atPath: "\(directory)/\(lproj)")
48 | // Filtered and add storyboard file
49 | arrayName.append(contentsOf: allResources.filter({ $0.hasSuffix(".storyboardc" )}))
50 | for name in arrayName {
51 | let shortName = name.split(separator: ".")[0]
52 | storyboards += findAndParsePlist(in: "\(directory)/\(lproj)/\(name)", shortName: String(shortName))
53 | }
54 | }
55 | }
56 | return storyboards
57 | }
58 |
59 | // Search plist in "storyboardc", Parse and
60 | // Return : [Storyboard]
61 | private func findAndParsePlist(in storyboardName: String, shortName: String) -> [Storyboard] {
62 | var storyboardArray = [Storyboard]()
63 |
64 | let directory = "\(storyboardName)"
65 | if let directory = URL(string: directory) {
66 | guard let files = try? FileManager.default.contentsOfDirectory(at: directory, includingPropertiesForKeys: nil, options: FileManager.DirectoryEnumerationOptions.skipsHiddenFiles) else {
67 | return [Storyboard]()
68 | }
69 |
70 | let plists = files.filter({ $0.pathExtension == "plist"})
71 | for plist in plists {
72 | if let storyboard = parsePlist(file: plist.absoluteString, shortName: shortName) {
73 | storyboardArray.append(storyboard)
74 | }
75 | }
76 | }
77 | return storyboardArray
78 | }
79 |
80 | private func parsePlist(file: String, shortName: String) -> Storyboard? {
81 | var nsDictionary = NSDictionary()
82 | if let url = URL(string: file) {
83 | nsDictionary = NSDictionary(contentsOf: url) ?? NSDictionary()
84 |
85 | let entryPoint: String = (nsDictionary.value(forKey: PlistKey.entryPoint.rawValue) as? String) ?? "none"
86 | let identifiersNibName = (nsDictionary.value(forKey: PlistKey.identifierNibName.rawValue) as? Dictionary) ?? Dictionary()
87 |
88 |
89 | let externalReference = (nsDictionary.value(forKey: PlistKey.externalReference.rawValue) as? Dictionary>) ?? Dictionary>()
90 |
91 |
92 | var externalReferenceName = [(key: String, id: String)]()
93 | for reference in externalReference {
94 | for controller in reference.value {
95 | externalReferenceName.append((key: reference.key, id: controller.value))
96 | }
97 | }
98 |
99 | var arrayController = [(name: String, id: String)]()
100 | for idDictionnary in identifiersNibName {
101 | arrayController.append((name: idDictionnary.key, id: idDictionnary.key))
102 | }
103 | return Storyboard(fileName: shortName,
104 | entryPoint: entryPoint,
105 | arrayController: arrayController,
106 | externalReferenceName: externalReferenceName)
107 | }
108 | return nil
109 | }
110 |
111 | // MARK : - Accessible method
112 | // Return true if dictionnary contain controller Name
113 | func controllerExist(_ id: String) -> Bool {
114 | for storyboard in storyboards {
115 | for controllersName in storyboard.arrayController where controllersName.id == id {
116 | return true
117 | }
118 | }
119 | return false
120 | }
121 |
122 | func getEntryPoint(inStoryboard name: String) -> String? {
123 | for storyboard in storyboards where storyboard.fileName == name {
124 | return storyboard.entryPoint
125 | }
126 | return nil
127 | }
128 |
129 | func getExternalStoryboardReference(inStoryboard name: String) -> [String] {
130 | var arrayName = [String]()
131 | for storyboard in storyboards where storyboard.fileName == name {
132 | for reference in storyboard.externalReferenceName {
133 | arrayName.append(reference.id)
134 | }
135 | }
136 | return arrayName
137 | }
138 |
139 |
140 | func getViewController(_ id: String) -> UIViewController? {
141 | for storyboard in storyboards {
142 | for controller in storyboard.arrayController where controller.id == id {
143 | let storyboard = UIStoryboard(name: storyboard.fileName, bundle: nil)
144 | return storyboard.instantiateViewController(withIdentifier: controller.id)
145 | }
146 | }
147 | return nil
148 | }
149 |
150 | func getAllStoryboardName() -> [String] {
151 | var arrayNames = [String]()
152 | for storyboard in storyboards {
153 | arrayNames.append(storyboard.fileName)
154 | }
155 | return arrayNames
156 | }
157 |
158 | func getAllViewControllerId() -> [String] {
159 | var arrayNames = [String]()
160 | for storyboard in storyboards {
161 | for controllerName in storyboard.arrayController {
162 | arrayNames.append(controllerName.id)
163 | }
164 | }
165 | return arrayNames
166 | }
167 |
168 | func getAllViewControllerId(inStoryboard name: String) -> [String] {
169 | var arrayNames = [String]()
170 | for storyboard in storyboards where storyboard.fileName == name {
171 | for controllerName in storyboard.arrayController {
172 | arrayNames.append(controllerName.id)
173 | }
174 | }
175 | return arrayNames
176 | }
177 | }
178 |
--------------------------------------------------------------------------------
/Navigation/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 |
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 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/Navigation.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | E97EDF5B22534116000434CD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97EDF5A22534116000434CD /* AppDelegate.swift */; };
11 | E97EDF5D22534116000434CD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97EDF5C22534116000434CD /* ViewController.swift */; };
12 | E97EDF6022534116000434CD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E97EDF5E22534116000434CD /* Main.storyboard */; };
13 | E97EDF6222534119000434CD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E97EDF6122534119000434CD /* Assets.xcassets */; };
14 | E97EDF6522534119000434CD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E97EDF6322534119000434CD /* LaunchScreen.storyboard */; };
15 | E97EDF6E2253879B000434CD /* Navigation.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97EDF6D2253879B000434CD /* Navigation.swift */; };
16 | E97EDF7022538E51000434CD /* ViewController2.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97EDF6F22538E51000434CD /* ViewController2.swift */; };
17 | E97EDF7222538F60000434CD /* Main2.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E97EDF7122538F60000434CD /* Main2.storyboard */; };
18 | E97EDF7422538F81000434CD /* ViewController3.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97EDF7322538F81000434CD /* ViewController3.swift */; };
19 | E97EDFE3225C9A50000434CD /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = E97EDFE2225C9A50000434CD /* Storyboard.swift */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXFileReference section */
23 | E97EDF5722534116000434CD /* Navigation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Navigation.app; sourceTree = BUILT_PRODUCTS_DIR; };
24 | E97EDF5A22534116000434CD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
25 | E97EDF5C22534116000434CD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
26 | E97EDF5F22534116000434CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
27 | E97EDF6122534119000434CD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
28 | E97EDF6422534119000434CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
29 | E97EDF662253411A000434CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
30 | E97EDF6D2253879B000434CD /* Navigation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Navigation.swift; sourceTree = ""; };
31 | E97EDF6F22538E51000434CD /* ViewController2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController2.swift; sourceTree = ""; };
32 | E97EDF7122538F60000434CD /* Main2.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Main2.storyboard; sourceTree = ""; };
33 | E97EDF7322538F81000434CD /* ViewController3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController3.swift; sourceTree = ""; };
34 | E97EDFE2225C9A50000434CD /* Storyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storyboard.swift; sourceTree = ""; };
35 | /* End PBXFileReference section */
36 |
37 | /* Begin PBXFrameworksBuildPhase section */
38 | E97EDF5422534116000434CD /* Frameworks */ = {
39 | isa = PBXFrameworksBuildPhase;
40 | buildActionMask = 2147483647;
41 | files = (
42 | );
43 | runOnlyForDeploymentPostprocessing = 0;
44 | };
45 | /* End PBXFrameworksBuildPhase section */
46 |
47 | /* Begin PBXGroup section */
48 | E97EDF4E22534116000434CD = {
49 | isa = PBXGroup;
50 | children = (
51 | E97EDF5922534116000434CD /* Navigation */,
52 | E97EDF5822534116000434CD /* Products */,
53 | );
54 | sourceTree = "";
55 | };
56 | E97EDF5822534116000434CD /* Products */ = {
57 | isa = PBXGroup;
58 | children = (
59 | E97EDF5722534116000434CD /* Navigation.app */,
60 | );
61 | name = Products;
62 | sourceTree = "";
63 | };
64 | E97EDF5922534116000434CD /* Navigation */ = {
65 | isa = PBXGroup;
66 | children = (
67 | E97EDFE4225CC926000434CD /* New Group */,
68 | E97EDF6C22538789000434CD /* Navigation */,
69 | E97EDF5A22534116000434CD /* AppDelegate.swift */,
70 | E97EDF5C22534116000434CD /* ViewController.swift */,
71 | E97EDF6F22538E51000434CD /* ViewController2.swift */,
72 | E97EDF7322538F81000434CD /* ViewController3.swift */,
73 | E97EDF5E22534116000434CD /* Main.storyboard */,
74 | E97EDF6122534119000434CD /* Assets.xcassets */,
75 | E97EDF6322534119000434CD /* LaunchScreen.storyboard */,
76 | E97EDF662253411A000434CD /* Info.plist */,
77 | );
78 | path = Navigation;
79 | sourceTree = "";
80 | };
81 | E97EDF6C22538789000434CD /* Navigation */ = {
82 | isa = PBXGroup;
83 | children = (
84 | E97EDF6D2253879B000434CD /* Navigation.swift */,
85 | E97EDFE2225C9A50000434CD /* Storyboard.swift */,
86 | );
87 | path = Navigation;
88 | sourceTree = "";
89 | };
90 | E97EDFE4225CC926000434CD /* New Group */ = {
91 | isa = PBXGroup;
92 | children = (
93 | E97EDF7122538F60000434CD /* Main2.storyboard */,
94 | );
95 | path = "New Group";
96 | sourceTree = "";
97 | };
98 | /* End PBXGroup section */
99 |
100 | /* Begin PBXNativeTarget section */
101 | E97EDF5622534116000434CD /* Navigation */ = {
102 | isa = PBXNativeTarget;
103 | buildConfigurationList = E97EDF692253411A000434CD /* Build configuration list for PBXNativeTarget "Navigation" */;
104 | buildPhases = (
105 | E97EDF5322534116000434CD /* Sources */,
106 | E97EDF5422534116000434CD /* Frameworks */,
107 | E97EDF5522534116000434CD /* Resources */,
108 | );
109 | buildRules = (
110 | );
111 | dependencies = (
112 | );
113 | name = Navigation;
114 | productName = Navigation;
115 | productReference = E97EDF5722534116000434CD /* Navigation.app */;
116 | productType = "com.apple.product-type.application";
117 | };
118 | /* End PBXNativeTarget section */
119 |
120 | /* Begin PBXProject section */
121 | E97EDF4F22534116000434CD /* Project object */ = {
122 | isa = PBXProject;
123 | attributes = {
124 | LastSwiftUpdateCheck = 1010;
125 | LastUpgradeCheck = 1010;
126 | ORGANIZATIONNAME = VersusMind;
127 | TargetAttributes = {
128 | E97EDF5622534116000434CD = {
129 | CreatedOnToolsVersion = 10.1;
130 | };
131 | };
132 | };
133 | buildConfigurationList = E97EDF5222534116000434CD /* Build configuration list for PBXProject "Navigation" */;
134 | compatibilityVersion = "Xcode 9.3";
135 | developmentRegion = en;
136 | hasScannedForEncodings = 0;
137 | knownRegions = (
138 | en,
139 | Base,
140 | );
141 | mainGroup = E97EDF4E22534116000434CD;
142 | productRefGroup = E97EDF5822534116000434CD /* Products */;
143 | projectDirPath = "";
144 | projectRoot = "";
145 | targets = (
146 | E97EDF5622534116000434CD /* Navigation */,
147 | );
148 | };
149 | /* End PBXProject section */
150 |
151 | /* Begin PBXResourcesBuildPhase section */
152 | E97EDF5522534116000434CD /* Resources */ = {
153 | isa = PBXResourcesBuildPhase;
154 | buildActionMask = 2147483647;
155 | files = (
156 | E97EDF6522534119000434CD /* LaunchScreen.storyboard in Resources */,
157 | E97EDF6222534119000434CD /* Assets.xcassets in Resources */,
158 | E97EDF7222538F60000434CD /* Main2.storyboard in Resources */,
159 | E97EDF6022534116000434CD /* Main.storyboard in Resources */,
160 | );
161 | runOnlyForDeploymentPostprocessing = 0;
162 | };
163 | /* End PBXResourcesBuildPhase section */
164 |
165 | /* Begin PBXSourcesBuildPhase section */
166 | E97EDF5322534116000434CD /* Sources */ = {
167 | isa = PBXSourcesBuildPhase;
168 | buildActionMask = 2147483647;
169 | files = (
170 | E97EDF7422538F81000434CD /* ViewController3.swift in Sources */,
171 | E97EDF6E2253879B000434CD /* Navigation.swift in Sources */,
172 | E97EDF7022538E51000434CD /* ViewController2.swift in Sources */,
173 | E97EDF5D22534116000434CD /* ViewController.swift in Sources */,
174 | E97EDFE3225C9A50000434CD /* Storyboard.swift in Sources */,
175 | E97EDF5B22534116000434CD /* AppDelegate.swift in Sources */,
176 | );
177 | runOnlyForDeploymentPostprocessing = 0;
178 | };
179 | /* End PBXSourcesBuildPhase section */
180 |
181 | /* Begin PBXVariantGroup section */
182 | E97EDF5E22534116000434CD /* Main.storyboard */ = {
183 | isa = PBXVariantGroup;
184 | children = (
185 | E97EDF5F22534116000434CD /* Base */,
186 | );
187 | name = Main.storyboard;
188 | sourceTree = "";
189 | };
190 | E97EDF6322534119000434CD /* LaunchScreen.storyboard */ = {
191 | isa = PBXVariantGroup;
192 | children = (
193 | E97EDF6422534119000434CD /* Base */,
194 | );
195 | name = LaunchScreen.storyboard;
196 | sourceTree = "";
197 | };
198 | /* End PBXVariantGroup section */
199 |
200 | /* Begin XCBuildConfiguration section */
201 | E97EDF672253411A000434CD /* Debug */ = {
202 | isa = XCBuildConfiguration;
203 | buildSettings = {
204 | ALWAYS_SEARCH_USER_PATHS = NO;
205 | CLANG_ANALYZER_NONNULL = YES;
206 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
207 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
208 | CLANG_CXX_LIBRARY = "libc++";
209 | CLANG_ENABLE_MODULES = YES;
210 | CLANG_ENABLE_OBJC_ARC = YES;
211 | CLANG_ENABLE_OBJC_WEAK = YES;
212 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
213 | CLANG_WARN_BOOL_CONVERSION = YES;
214 | CLANG_WARN_COMMA = YES;
215 | CLANG_WARN_CONSTANT_CONVERSION = YES;
216 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
217 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
218 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
219 | CLANG_WARN_EMPTY_BODY = YES;
220 | CLANG_WARN_ENUM_CONVERSION = YES;
221 | CLANG_WARN_INFINITE_RECURSION = YES;
222 | CLANG_WARN_INT_CONVERSION = YES;
223 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
224 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
225 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
226 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
227 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
228 | CLANG_WARN_STRICT_PROTOTYPES = YES;
229 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
230 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
231 | CLANG_WARN_UNREACHABLE_CODE = YES;
232 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
233 | CODE_SIGN_IDENTITY = "iPhone Developer";
234 | COPY_PHASE_STRIP = NO;
235 | DEBUG_INFORMATION_FORMAT = dwarf;
236 | ENABLE_STRICT_OBJC_MSGSEND = YES;
237 | ENABLE_TESTABILITY = YES;
238 | GCC_C_LANGUAGE_STANDARD = gnu11;
239 | GCC_DYNAMIC_NO_PIC = NO;
240 | GCC_NO_COMMON_BLOCKS = YES;
241 | GCC_OPTIMIZATION_LEVEL = 0;
242 | GCC_PREPROCESSOR_DEFINITIONS = (
243 | "DEBUG=1",
244 | "$(inherited)",
245 | );
246 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
247 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
248 | GCC_WARN_UNDECLARED_SELECTOR = YES;
249 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
250 | GCC_WARN_UNUSED_FUNCTION = YES;
251 | GCC_WARN_UNUSED_VARIABLE = YES;
252 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
253 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
254 | MTL_FAST_MATH = YES;
255 | ONLY_ACTIVE_ARCH = YES;
256 | SDKROOT = iphoneos;
257 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
258 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
259 | };
260 | name = Debug;
261 | };
262 | E97EDF682253411A000434CD /* Release */ = {
263 | isa = XCBuildConfiguration;
264 | buildSettings = {
265 | ALWAYS_SEARCH_USER_PATHS = NO;
266 | CLANG_ANALYZER_NONNULL = YES;
267 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
268 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
269 | CLANG_CXX_LIBRARY = "libc++";
270 | CLANG_ENABLE_MODULES = YES;
271 | CLANG_ENABLE_OBJC_ARC = YES;
272 | CLANG_ENABLE_OBJC_WEAK = YES;
273 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
274 | CLANG_WARN_BOOL_CONVERSION = YES;
275 | CLANG_WARN_COMMA = YES;
276 | CLANG_WARN_CONSTANT_CONVERSION = YES;
277 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
279 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
280 | CLANG_WARN_EMPTY_BODY = YES;
281 | CLANG_WARN_ENUM_CONVERSION = YES;
282 | CLANG_WARN_INFINITE_RECURSION = YES;
283 | CLANG_WARN_INT_CONVERSION = YES;
284 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
285 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
286 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
287 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
288 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
289 | CLANG_WARN_STRICT_PROTOTYPES = YES;
290 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
291 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
292 | CLANG_WARN_UNREACHABLE_CODE = YES;
293 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
294 | CODE_SIGN_IDENTITY = "iPhone Developer";
295 | COPY_PHASE_STRIP = NO;
296 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
297 | ENABLE_NS_ASSERTIONS = NO;
298 | ENABLE_STRICT_OBJC_MSGSEND = YES;
299 | GCC_C_LANGUAGE_STANDARD = gnu11;
300 | GCC_NO_COMMON_BLOCKS = YES;
301 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
302 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
303 | GCC_WARN_UNDECLARED_SELECTOR = YES;
304 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
305 | GCC_WARN_UNUSED_FUNCTION = YES;
306 | GCC_WARN_UNUSED_VARIABLE = YES;
307 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
308 | MTL_ENABLE_DEBUG_INFO = NO;
309 | MTL_FAST_MATH = YES;
310 | SDKROOT = iphoneos;
311 | SWIFT_COMPILATION_MODE = wholemodule;
312 | SWIFT_OPTIMIZATION_LEVEL = "-O";
313 | VALIDATE_PRODUCT = YES;
314 | };
315 | name = Release;
316 | };
317 | E97EDF6A2253411A000434CD /* Debug */ = {
318 | isa = XCBuildConfiguration;
319 | buildSettings = {
320 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
321 | CODE_SIGN_STYLE = Automatic;
322 | DEVELOPMENT_TEAM = FH7J82UUZR;
323 | INFOPLIST_FILE = Navigation/Info.plist;
324 | LD_RUNPATH_SEARCH_PATHS = (
325 | "$(inherited)",
326 | "@executable_path/Frameworks",
327 | );
328 | PRODUCT_BUNDLE_IDENTIFIER = com.versusmind.Navigation;
329 | PRODUCT_NAME = "$(TARGET_NAME)";
330 | SWIFT_VERSION = 4.2;
331 | TARGETED_DEVICE_FAMILY = "1,2";
332 | };
333 | name = Debug;
334 | };
335 | E97EDF6B2253411A000434CD /* Release */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
339 | CODE_SIGN_STYLE = Automatic;
340 | DEVELOPMENT_TEAM = FH7J82UUZR;
341 | INFOPLIST_FILE = Navigation/Info.plist;
342 | LD_RUNPATH_SEARCH_PATHS = (
343 | "$(inherited)",
344 | "@executable_path/Frameworks",
345 | );
346 | PRODUCT_BUNDLE_IDENTIFIER = com.versusmind.Navigation;
347 | PRODUCT_NAME = "$(TARGET_NAME)";
348 | SWIFT_VERSION = 4.2;
349 | TARGETED_DEVICE_FAMILY = "1,2";
350 | };
351 | name = Release;
352 | };
353 | /* End XCBuildConfiguration section */
354 |
355 | /* Begin XCConfigurationList section */
356 | E97EDF5222534116000434CD /* Build configuration list for PBXProject "Navigation" */ = {
357 | isa = XCConfigurationList;
358 | buildConfigurations = (
359 | E97EDF672253411A000434CD /* Debug */,
360 | E97EDF682253411A000434CD /* Release */,
361 | );
362 | defaultConfigurationIsVisible = 0;
363 | defaultConfigurationName = Release;
364 | };
365 | E97EDF692253411A000434CD /* Build configuration list for PBXNativeTarget "Navigation" */ = {
366 | isa = XCConfigurationList;
367 | buildConfigurations = (
368 | E97EDF6A2253411A000434CD /* Debug */,
369 | E97EDF6B2253411A000434CD /* Release */,
370 | );
371 | defaultConfigurationIsVisible = 0;
372 | defaultConfigurationName = Release;
373 | };
374 | /* End XCConfigurationList section */
375 | };
376 | rootObject = E97EDF4F22534116000434CD /* Project object */;
377 | }
378 |
--------------------------------------------------------------------------------