├── RootControllerNavigation.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── sostrov.xcuserdatad │ │ └── IDEFindNavigatorScopes.plist └── xcuserdata │ ├── sostrov.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── RootControllerNavigation.xcscheme │ │ └── xcschememanagement.plist │ └── stanostrovskiy.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist └── RootControllerNavigation ├── ActivityViewController.swift ├── AppDelegate.swift ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Base.lproj └── LaunchScreen.storyboard ├── Deeplink ├── DeepLinkManager.swift └── ShortcutParser.swift ├── Info.plist ├── LoginViewController.swift ├── MainViewController.swift ├── RootViewController.swift └── SplashViewController.swift /RootControllerNavigation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2FD711531FDE13CA00291D90 /* DeepLinkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FD7114F1FDE13CA00291D90 /* DeepLinkManager.swift */; }; 11 | 2FD711551FDE13CA00291D90 /* ShortcutParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FD711511FDE13CA00291D90 /* ShortcutParser.swift */; }; 12 | 5A8F87FC1FD6ED1800988B6B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A8F87FB1FD6ED1800988B6B /* AppDelegate.swift */; }; 13 | 5A8F88031FD6ED1800988B6B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5A8F88021FD6ED1800988B6B /* Assets.xcassets */; }; 14 | 5A8F88061FD6ED1800988B6B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5A8F88041FD6ED1800988B6B /* LaunchScreen.storyboard */; }; 15 | 5A8F880E1FD6ED6600988B6B /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A8F880D1FD6ED6600988B6B /* RootViewController.swift */; }; 16 | 5A8F88101FD6EF7C00988B6B /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A8F880F1FD6EF7C00988B6B /* SplashViewController.swift */; }; 17 | 5A8F88121FD6EFCE00988B6B /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A8F88111FD6EFCE00988B6B /* MainViewController.swift */; }; 18 | 5A8F88141FD6EFEF00988B6B /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A8F88131FD6EFEF00988B6B /* LoginViewController.swift */; }; 19 | 5A9E35951FD98F2F007580E7 /* ActivityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A9E35941FD98F2F007580E7 /* ActivityViewController.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 2FD7114F1FDE13CA00291D90 /* DeepLinkManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeepLinkManager.swift; sourceTree = ""; }; 24 | 2FD711511FDE13CA00291D90 /* ShortcutParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShortcutParser.swift; sourceTree = ""; }; 25 | 5A8F87F81FD6ED1800988B6B /* RootControllerNavigation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RootControllerNavigation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 5A8F87FB1FD6ED1800988B6B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 27 | 5A8F88021FD6ED1800988B6B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | 5A8F88051FD6ED1800988B6B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 29 | 5A8F88071FD6ED1800988B6B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | 5A8F880D1FD6ED6600988B6B /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; 31 | 5A8F880F1FD6EF7C00988B6B /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = ""; }; 32 | 5A8F88111FD6EFCE00988B6B /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; 33 | 5A8F88131FD6EFEF00988B6B /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; 34 | 5A9E35941FD98F2F007580E7 /* ActivityViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityViewController.swift; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 5A8F87F51FD6ED1800988B6B /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | 2FD7114E1FDE13A500291D90 /* Deeplink */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 2FD7114F1FDE13CA00291D90 /* DeepLinkManager.swift */, 52 | 2FD711511FDE13CA00291D90 /* ShortcutParser.swift */, 53 | ); 54 | path = Deeplink; 55 | sourceTree = ""; 56 | }; 57 | 5A8F87EF1FD6ED1800988B6B = { 58 | isa = PBXGroup; 59 | children = ( 60 | 5A8F87FA1FD6ED1800988B6B /* RootControllerNavigation */, 61 | 5A8F87F91FD6ED1800988B6B /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 5A8F87F91FD6ED1800988B6B /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 5A8F87F81FD6ED1800988B6B /* RootControllerNavigation.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 5A8F87FA1FD6ED1800988B6B /* RootControllerNavigation */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 2FD7114E1FDE13A500291D90 /* Deeplink */, 77 | 5A8F87FB1FD6ED1800988B6B /* AppDelegate.swift */, 78 | 5A8F88021FD6ED1800988B6B /* Assets.xcassets */, 79 | 5A8F88041FD6ED1800988B6B /* LaunchScreen.storyboard */, 80 | 5A8F88071FD6ED1800988B6B /* Info.plist */, 81 | 5A8F880D1FD6ED6600988B6B /* RootViewController.swift */, 82 | 5A8F880F1FD6EF7C00988B6B /* SplashViewController.swift */, 83 | 5A8F88111FD6EFCE00988B6B /* MainViewController.swift */, 84 | 5A8F88131FD6EFEF00988B6B /* LoginViewController.swift */, 85 | 5A9E35941FD98F2F007580E7 /* ActivityViewController.swift */, 86 | ); 87 | path = RootControllerNavigation; 88 | sourceTree = ""; 89 | }; 90 | /* End PBXGroup section */ 91 | 92 | /* Begin PBXNativeTarget section */ 93 | 5A8F87F71FD6ED1800988B6B /* RootControllerNavigation */ = { 94 | isa = PBXNativeTarget; 95 | buildConfigurationList = 5A8F880A1FD6ED1800988B6B /* Build configuration list for PBXNativeTarget "RootControllerNavigation" */; 96 | buildPhases = ( 97 | 5A8F87F41FD6ED1800988B6B /* Sources */, 98 | 5A8F87F51FD6ED1800988B6B /* Frameworks */, 99 | 5A8F87F61FD6ED1800988B6B /* Resources */, 100 | ); 101 | buildRules = ( 102 | ); 103 | dependencies = ( 104 | ); 105 | name = RootControllerNavigation; 106 | productName = RootControllerNavigation; 107 | productReference = 5A8F87F81FD6ED1800988B6B /* RootControllerNavigation.app */; 108 | productType = "com.apple.product-type.application"; 109 | }; 110 | /* End PBXNativeTarget section */ 111 | 112 | /* Begin PBXProject section */ 113 | 5A8F87F01FD6ED1800988B6B /* Project object */ = { 114 | isa = PBXProject; 115 | attributes = { 116 | LastSwiftUpdateCheck = 0910; 117 | LastUpgradeCheck = 0910; 118 | ORGANIZATIONNAME = "Stanislav Ostrovskiy"; 119 | TargetAttributes = { 120 | 5A8F87F71FD6ED1800988B6B = { 121 | CreatedOnToolsVersion = 9.1; 122 | ProvisioningStyle = Automatic; 123 | }; 124 | }; 125 | }; 126 | buildConfigurationList = 5A8F87F31FD6ED1800988B6B /* Build configuration list for PBXProject "RootControllerNavigation" */; 127 | compatibilityVersion = "Xcode 8.0"; 128 | developmentRegion = en; 129 | hasScannedForEncodings = 0; 130 | knownRegions = ( 131 | en, 132 | Base, 133 | ); 134 | mainGroup = 5A8F87EF1FD6ED1800988B6B; 135 | productRefGroup = 5A8F87F91FD6ED1800988B6B /* Products */; 136 | projectDirPath = ""; 137 | projectRoot = ""; 138 | targets = ( 139 | 5A8F87F71FD6ED1800988B6B /* RootControllerNavigation */, 140 | ); 141 | }; 142 | /* End PBXProject section */ 143 | 144 | /* Begin PBXResourcesBuildPhase section */ 145 | 5A8F87F61FD6ED1800988B6B /* Resources */ = { 146 | isa = PBXResourcesBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | 5A8F88061FD6ED1800988B6B /* LaunchScreen.storyboard in Resources */, 150 | 5A8F88031FD6ED1800988B6B /* Assets.xcassets in Resources */, 151 | ); 152 | runOnlyForDeploymentPostprocessing = 0; 153 | }; 154 | /* End PBXResourcesBuildPhase section */ 155 | 156 | /* Begin PBXSourcesBuildPhase section */ 157 | 5A8F87F41FD6ED1800988B6B /* Sources */ = { 158 | isa = PBXSourcesBuildPhase; 159 | buildActionMask = 2147483647; 160 | files = ( 161 | 2FD711551FDE13CA00291D90 /* ShortcutParser.swift in Sources */, 162 | 5A8F87FC1FD6ED1800988B6B /* AppDelegate.swift in Sources */, 163 | 5A9E35951FD98F2F007580E7 /* ActivityViewController.swift in Sources */, 164 | 5A8F880E1FD6ED6600988B6B /* RootViewController.swift in Sources */, 165 | 5A8F88101FD6EF7C00988B6B /* SplashViewController.swift in Sources */, 166 | 2FD711531FDE13CA00291D90 /* DeepLinkManager.swift in Sources */, 167 | 5A8F88141FD6EFEF00988B6B /* LoginViewController.swift in Sources */, 168 | 5A8F88121FD6EFCE00988B6B /* MainViewController.swift in Sources */, 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXSourcesBuildPhase section */ 173 | 174 | /* Begin PBXVariantGroup section */ 175 | 5A8F88041FD6ED1800988B6B /* LaunchScreen.storyboard */ = { 176 | isa = PBXVariantGroup; 177 | children = ( 178 | 5A8F88051FD6ED1800988B6B /* Base */, 179 | ); 180 | name = LaunchScreen.storyboard; 181 | sourceTree = ""; 182 | }; 183 | /* End PBXVariantGroup section */ 184 | 185 | /* Begin XCBuildConfiguration section */ 186 | 5A8F88081FD6ED1800988B6B /* Debug */ = { 187 | isa = XCBuildConfiguration; 188 | buildSettings = { 189 | ALWAYS_SEARCH_USER_PATHS = NO; 190 | CLANG_ANALYZER_NONNULL = YES; 191 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 192 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 193 | CLANG_CXX_LIBRARY = "libc++"; 194 | CLANG_ENABLE_MODULES = YES; 195 | CLANG_ENABLE_OBJC_ARC = YES; 196 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 197 | CLANG_WARN_BOOL_CONVERSION = YES; 198 | CLANG_WARN_COMMA = YES; 199 | CLANG_WARN_CONSTANT_CONVERSION = YES; 200 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 201 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 202 | CLANG_WARN_EMPTY_BODY = YES; 203 | CLANG_WARN_ENUM_CONVERSION = YES; 204 | CLANG_WARN_INFINITE_RECURSION = YES; 205 | CLANG_WARN_INT_CONVERSION = YES; 206 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 207 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 209 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 210 | CLANG_WARN_STRICT_PROTOTYPES = YES; 211 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 212 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 213 | CLANG_WARN_UNREACHABLE_CODE = YES; 214 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 215 | CODE_SIGN_IDENTITY = "iPhone Developer"; 216 | COPY_PHASE_STRIP = NO; 217 | DEBUG_INFORMATION_FORMAT = dwarf; 218 | ENABLE_STRICT_OBJC_MSGSEND = YES; 219 | ENABLE_TESTABILITY = YES; 220 | GCC_C_LANGUAGE_STANDARD = gnu11; 221 | GCC_DYNAMIC_NO_PIC = NO; 222 | GCC_NO_COMMON_BLOCKS = YES; 223 | GCC_OPTIMIZATION_LEVEL = 0; 224 | GCC_PREPROCESSOR_DEFINITIONS = ( 225 | "DEBUG=1", 226 | "$(inherited)", 227 | ); 228 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 229 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 230 | GCC_WARN_UNDECLARED_SELECTOR = YES; 231 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 232 | GCC_WARN_UNUSED_FUNCTION = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 235 | MTL_ENABLE_DEBUG_INFO = YES; 236 | ONLY_ACTIVE_ARCH = YES; 237 | SDKROOT = iphoneos; 238 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 239 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 240 | }; 241 | name = Debug; 242 | }; 243 | 5A8F88091FD6ED1800988B6B /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_ANALYZER_NONNULL = YES; 248 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 250 | CLANG_CXX_LIBRARY = "libc++"; 251 | CLANG_ENABLE_MODULES = YES; 252 | CLANG_ENABLE_OBJC_ARC = YES; 253 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 254 | CLANG_WARN_BOOL_CONVERSION = YES; 255 | CLANG_WARN_COMMA = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 259 | CLANG_WARN_EMPTY_BODY = YES; 260 | CLANG_WARN_ENUM_CONVERSION = YES; 261 | CLANG_WARN_INFINITE_RECURSION = YES; 262 | CLANG_WARN_INT_CONVERSION = YES; 263 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 264 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 267 | CLANG_WARN_STRICT_PROTOTYPES = YES; 268 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 269 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 270 | CLANG_WARN_UNREACHABLE_CODE = YES; 271 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 272 | CODE_SIGN_IDENTITY = "iPhone Developer"; 273 | COPY_PHASE_STRIP = NO; 274 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 275 | ENABLE_NS_ASSERTIONS = NO; 276 | ENABLE_STRICT_OBJC_MSGSEND = YES; 277 | GCC_C_LANGUAGE_STANDARD = gnu11; 278 | GCC_NO_COMMON_BLOCKS = YES; 279 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 280 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 281 | GCC_WARN_UNDECLARED_SELECTOR = YES; 282 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 283 | GCC_WARN_UNUSED_FUNCTION = YES; 284 | GCC_WARN_UNUSED_VARIABLE = YES; 285 | IPHONEOS_DEPLOYMENT_TARGET = 11.1; 286 | MTL_ENABLE_DEBUG_INFO = NO; 287 | SDKROOT = iphoneos; 288 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 289 | VALIDATE_PRODUCT = YES; 290 | }; 291 | name = Release; 292 | }; 293 | 5A8F880B1FD6ED1800988B6B /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | CODE_SIGN_STYLE = Automatic; 298 | DEVELOPMENT_TEAM = 5YJM63K9RT; 299 | INFOPLIST_FILE = RootControllerNavigation/Info.plist; 300 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 301 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 302 | PRODUCT_BUNDLE_IDENTIFIER = com.stan.ostrovskiy.RootControllerNavigation; 303 | PRODUCT_NAME = "$(TARGET_NAME)"; 304 | SWIFT_VERSION = 4.0; 305 | TARGETED_DEVICE_FAMILY = 1; 306 | }; 307 | name = Debug; 308 | }; 309 | 5A8F880C1FD6ED1800988B6B /* Release */ = { 310 | isa = XCBuildConfiguration; 311 | buildSettings = { 312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 313 | CODE_SIGN_STYLE = Automatic; 314 | DEVELOPMENT_TEAM = 5YJM63K9RT; 315 | INFOPLIST_FILE = RootControllerNavigation/Info.plist; 316 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 317 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 318 | PRODUCT_BUNDLE_IDENTIFIER = com.stan.ostrovskiy.RootControllerNavigation; 319 | PRODUCT_NAME = "$(TARGET_NAME)"; 320 | SWIFT_VERSION = 4.0; 321 | TARGETED_DEVICE_FAMILY = 1; 322 | }; 323 | name = Release; 324 | }; 325 | /* End XCBuildConfiguration section */ 326 | 327 | /* Begin XCConfigurationList section */ 328 | 5A8F87F31FD6ED1800988B6B /* Build configuration list for PBXProject "RootControllerNavigation" */ = { 329 | isa = XCConfigurationList; 330 | buildConfigurations = ( 331 | 5A8F88081FD6ED1800988B6B /* Debug */, 332 | 5A8F88091FD6ED1800988B6B /* Release */, 333 | ); 334 | defaultConfigurationIsVisible = 0; 335 | defaultConfigurationName = Release; 336 | }; 337 | 5A8F880A1FD6ED1800988B6B /* Build configuration list for PBXNativeTarget "RootControllerNavigation" */ = { 338 | isa = XCConfigurationList; 339 | buildConfigurations = ( 340 | 5A8F880B1FD6ED1800988B6B /* Debug */, 341 | 5A8F880C1FD6ED1800988B6B /* Release */, 342 | ); 343 | defaultConfigurationIsVisible = 0; 344 | defaultConfigurationName = Release; 345 | }; 346 | /* End XCConfigurationList section */ 347 | }; 348 | rootObject = 5A8F87F01FD6ED1800988B6B /* Project object */; 349 | } 350 | -------------------------------------------------------------------------------- /RootControllerNavigation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RootControllerNavigation.xcodeproj/project.xcworkspace/xcuserdata/sostrov.xcuserdatad/IDEFindNavigatorScopes.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /RootControllerNavigation.xcodeproj/xcuserdata/sostrov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /RootControllerNavigation.xcodeproj/xcuserdata/sostrov.xcuserdatad/xcschemes/RootControllerNavigation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /RootControllerNavigation.xcodeproj/xcuserdata/sostrov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RootControllerNavigation.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 5A8F87F71FD6ED1800988B6B 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /RootControllerNavigation.xcodeproj/xcuserdata/stanostrovskiy.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /RootControllerNavigation.xcodeproj/xcuserdata/stanostrovskiy.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RootControllerNavigation.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /RootControllerNavigation/ActivityViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityViewController.swift 3 | // RootControllerNavigation 4 | // 5 | // Created by Stanislav Ostrovskiy on 12/7/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ActivityViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | view.backgroundColor = UIColor.lightGray 17 | title = "Activity" 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /RootControllerNavigation/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RootControllerNavigation 4 | // 5 | // Created by Stanislav Ostrovskiy on 12/5/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. 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: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | 18 | ShortcutParser.shared.registerShortcuts() 19 | 20 | window = UIWindow(frame: UIScreen.main.bounds) 21 | window?.rootViewController = RootViewController() 22 | window?.makeKeyAndVisible() 23 | 24 | return true 25 | } 26 | 27 | func applicationDidBecomeActive(_ application: UIApplication) { 28 | // handle any deeplink 29 | Deeplinker.checkDeepLink() 30 | } 31 | 32 | // MARK: Shortcuts 33 | func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) { 34 | completionHandler(Deeplinker.handleShortcut(item: shortcutItem)) 35 | } 36 | } 37 | 38 | extension AppDelegate { 39 | static var shared: AppDelegate { 40 | return UIApplication.shared.delegate as! AppDelegate 41 | } 42 | 43 | var rootViewController: RootViewController { 44 | return window!.rootViewController as! RootViewController 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /RootControllerNavigation/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 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /RootControllerNavigation/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 | -------------------------------------------------------------------------------- /RootControllerNavigation/Deeplink/DeepLinkManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeepLinkManager.swift 3 | // Deeplinks 4 | // 5 | // Created by Stanislav Ostrovskiy on 5/25/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | enum DeeplinkType { 13 | case messages 14 | case activity 15 | } 16 | 17 | let Deeplinker = DeepLinkManager() 18 | class DeepLinkManager { 19 | fileprivate init() {} 20 | 21 | private var deeplinkType: DeeplinkType? 22 | 23 | @discardableResult 24 | func handleShortcut(item: UIApplicationShortcutItem) -> Bool { 25 | deeplinkType = ShortcutParser.shared.handleShortcut(item) 26 | return deeplinkType != nil 27 | } 28 | 29 | // check existing deepling and perform action 30 | func checkDeepLink() { 31 | AppDelegate.shared.rootViewController.deeplink = deeplinkType 32 | 33 | // reset deeplink after handling 34 | self.deeplinkType = nil 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /RootControllerNavigation/Deeplink/ShortcutParser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ShortcutParser.swift 3 | // Deeplinks 4 | // 5 | // Created by Stanislav Ostrovskiy on 5/25/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | enum ShortcutKey: String { 13 | case activity = "com.myApp.activity" 14 | case messages = "com.myApp.messages" 15 | } 16 | 17 | class ShortcutParser { 18 | static let shared = ShortcutParser() 19 | private init() { } 20 | 21 | func registerShortcuts() { 22 | let activityIcon = UIApplicationShortcutIcon(templateImageName: "Alert Icon") 23 | let activityShortcutItem = UIApplicationShortcutItem(type: ShortcutKey.activity.rawValue, localizedTitle: "Recent Activity", localizedSubtitle: nil, icon: activityIcon, userInfo: nil) 24 | 25 | let messageIcon = UIApplicationShortcutIcon(templateImageName: "Messenger Icon") 26 | let messageShortcutItem = UIApplicationShortcutItem(type: ShortcutKey.messages.rawValue, localizedTitle: "Messages", localizedSubtitle: nil, icon: messageIcon, userInfo: nil) 27 | 28 | UIApplication.shared.shortcutItems = [activityShortcutItem, messageShortcutItem] 29 | } 30 | 31 | func handleShortcut(_ shortcut: UIApplicationShortcutItem) -> DeeplinkType? { 32 | switch shortcut.type { 33 | case ShortcutKey.activity.rawValue: 34 | return .activity 35 | case ShortcutKey.messages.rawValue: 36 | return .messages 37 | default: 38 | return nil 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /RootControllerNavigation/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 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | 33 | UISupportedInterfaceOrientations~ipad 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /RootControllerNavigation/LoginViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewController.swift 3 | // RootControllerNavigation 4 | // 5 | // Created by Stanislav Ostrovskiy on 12/5/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LoginViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | view.backgroundColor = UIColor.white 17 | title = "Login Screen" 18 | 19 | let loginButton = UIBarButtonItem(title: "Log In", style: .plain, target: self, action: #selector(login)) 20 | navigationItem.setLeftBarButton(loginButton, animated: true) 21 | } 22 | 23 | @objc 24 | private func login() { 25 | UserDefaults.standard.set(true, forKey: "LOGGED_IN") 26 | AppDelegate.shared.rootViewController.switchToMainScreen() 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /RootControllerNavigation/MainViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.swift 3 | // RootControllerNavigation 4 | // 5 | // Created by Stanislav Ostrovskiy on 12/5/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MainNavigationController: UINavigationController { } 12 | 13 | class MainViewController: UIViewController { 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | view.backgroundColor = UIColor.lightGray 19 | title = "Main Screen" 20 | 21 | let logoutButton = UIBarButtonItem(title: "Log Out", style: .plain, target: self, action: #selector(logout)) 22 | navigationItem.setLeftBarButton(logoutButton, animated: true) 23 | 24 | let activityButton = UIBarButtonItem(title: "Activity", style: .plain, target: self, action: #selector(showActivityScreen)) 25 | navigationItem.setRightBarButton(activityButton, animated: true) 26 | } 27 | 28 | @objc 29 | private func logout() { 30 | UserDefaults.standard.set(false, forKey: "LOGGED_IN") 31 | AppDelegate.shared.rootViewController.switchToLogout() 32 | } 33 | 34 | @objc 35 | func showActivityScreen(animated: Bool = true) { 36 | let activityViewController = ActivityViewController() 37 | navigationController?.pushViewController(activityViewController, animated: animated) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /RootControllerNavigation/RootViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.swift 3 | // RootControllerNavigation 4 | // 5 | // Created by Stanislav Ostrovskiy on 12/5/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class RootViewController: UIViewController { 12 | 13 | private var current: UIViewController 14 | 15 | var deeplink: DeeplinkType? { 16 | didSet { 17 | handleDeeplink() 18 | } 19 | } 20 | 21 | init() { 22 | current = SplashViewController() 23 | super.init(nibName: nil, bundle: nil) 24 | } 25 | 26 | required init?(coder aDecoder: NSCoder) { 27 | fatalError("init(coder:) has not been implemented") 28 | } 29 | 30 | override func viewDidLoad() { 31 | super.viewDidLoad() 32 | 33 | addChildViewController(current) 34 | current.view.frame = view.bounds 35 | view.addSubview(current.view) 36 | current.didMove(toParentViewController: self) 37 | } 38 | 39 | func showLoginScreen() { 40 | 41 | let new = UINavigationController(rootViewController: LoginViewController()) 42 | 43 | addChildViewController(new) 44 | new.view.frame = view.bounds 45 | view.addSubview(new.view) 46 | new.didMove(toParentViewController: self) 47 | 48 | current.willMove(toParentViewController: nil) 49 | current.view.removeFromSuperview() 50 | current.removeFromParentViewController() 51 | 52 | current = new 53 | } 54 | 55 | func switchToLogout() { 56 | let loginViewController = LoginViewController() 57 | let logoutScreen = UINavigationController(rootViewController: loginViewController) 58 | animateDismissTransition(to: logoutScreen) 59 | } 60 | 61 | func switchToMainScreen() { 62 | let mainViewController = MainViewController() 63 | let mainScreen = MainNavigationController(rootViewController: mainViewController) 64 | animateFadeTransition(to: mainScreen) { [weak self] in 65 | self?.handleDeeplink() 66 | } 67 | } 68 | 69 | private func animateFadeTransition(to new: UIViewController, completion: (() -> Void)? = nil) { 70 | current.willMove(toParentViewController: nil) 71 | addChildViewController(new) 72 | transition(from: current, to: new, duration: 0.3, options: [.transitionCrossDissolve, .curveEaseOut], animations: { 73 | 74 | }) { completed in 75 | self.current.removeFromParentViewController() 76 | new.didMove(toParentViewController: self) 77 | self.current = new 78 | completion?() 79 | } 80 | } 81 | 82 | private func animateDismissTransition(to new: UIViewController, completion: (() -> Void)? = nil) { 83 | 84 | let initialFrame = CGRect(x: -view.bounds.width, y: 0, width: view.bounds.width, height: view.bounds.height) 85 | current.willMove(toParentViewController: nil) 86 | addChildViewController(new) 87 | new.view.frame = initialFrame 88 | 89 | transition(from: current, to: new, duration: 0.3, options: [], animations: { 90 | new.view.frame = self.view.bounds 91 | }) { completed in 92 | self.current.removeFromParentViewController() 93 | new.didMove(toParentViewController: self) 94 | self.current = new 95 | completion?() 96 | } 97 | } 98 | 99 | private func handleDeeplink() { 100 | if let mainNavigationController = current as? MainNavigationController, let deeplink = deeplink { 101 | switch deeplink { 102 | case .activity: 103 | mainNavigationController.popToRootViewController(animated: false) 104 | (mainNavigationController.topViewController as? MainViewController)?.showActivityScreen() 105 | default: 106 | // handle any other types of Deeplinks here 107 | break 108 | } 109 | 110 | // reset the deeplink back no nil, so it will not be triggered more than once 111 | self.deeplink = nil 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /RootControllerNavigation/SplashViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SplashViewController.swift 3 | // RootControllerNavigation 4 | // 5 | // Created by Stanislav Ostrovskiy on 12/5/17. 6 | // Copyright © 2017 Stanislav Ostrovskiy. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SplashViewController: UIViewController { 12 | 13 | private let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .whiteLarge) 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | view.backgroundColor = UIColor.white 19 | 20 | view.addSubview(activityIndicator) 21 | 22 | activityIndicator.frame = view.bounds 23 | activityIndicator.backgroundColor = UIColor(white: 0, alpha: 0.4) 24 | 25 | makeServiceCall() 26 | } 27 | 28 | private func makeServiceCall() { 29 | activityIndicator.startAnimating() 30 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .seconds(1)) { 31 | self.activityIndicator.stopAnimating() 32 | if UserDefaults.standard.bool(forKey: "LOGGED_IN") { 33 | AppDelegate.shared.rootViewController.switchToMainScreen() 34 | } else { 35 | AppDelegate.shared.rootViewController.showLoginScreen() 36 | } 37 | } 38 | } 39 | } 40 | --------------------------------------------------------------------------------