├── .gitignore ├── LICENSE ├── README.md ├── RootViewController.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── satoutakeshi.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── RootViewController ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── DeepLinkShortcut.swift ├── Info.plist ├── Router.swift └── ViewController │ ├── Camera.storyboard │ ├── CameraViewController.swift │ ├── Login.storyboard │ ├── LoginViewController.swift │ ├── MainViewController.swift │ ├── RootViewController.swift │ ├── SettingViewController.swift │ ├── SplashViewController.swift │ └── TabViewController.swift ├── RootViewControllerTests ├── Info.plist └── RootViewControllerTests.swift └── RootViewControllerUITests ├── Info.plist └── RootViewControllerUITests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 佐藤剛士 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RootViewController -------------------------------------------------------------------------------- /RootViewController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 30E768492070BA4B00AB9333 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E768482070BA4B00AB9333 /* AppDelegate.swift */; }; 11 | 30E7684B2070BA4B00AB9333 /* TabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E7684A2070BA4B00AB9333 /* TabViewController.swift */; }; 12 | 30E7684E2070BA4C00AB9333 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 30E7684C2070BA4C00AB9333 /* Main.storyboard */; }; 13 | 30E768502070BA4C00AB9333 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 30E7684F2070BA4C00AB9333 /* Assets.xcassets */; }; 14 | 30E768532070BA4C00AB9333 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 30E768512070BA4C00AB9333 /* LaunchScreen.storyboard */; }; 15 | 30E7685E2070BA4C00AB9333 /* RootViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E7685D2070BA4C00AB9333 /* RootViewControllerTests.swift */; }; 16 | 30E768692070BA4C00AB9333 /* RootViewControllerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E768682070BA4C00AB9333 /* RootViewControllerUITests.swift */; }; 17 | 30E768772070BCC700AB9333 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E768762070BCC700AB9333 /* MainViewController.swift */; }; 18 | 30E768792070BCE400AB9333 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E768782070BCE400AB9333 /* LoginViewController.swift */; }; 19 | 30E7687B2070BCF100AB9333 /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E7687A2070BCF100AB9333 /* SettingViewController.swift */; }; 20 | 30E7687D2070BD1100AB9333 /* CameraViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E7687C2070BD1100AB9333 /* CameraViewController.swift */; }; 21 | 30E768802070BDC700AB9333 /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E7687F2070BDC700AB9333 /* Router.swift */; }; 22 | 30E768822070BDF200AB9333 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E768812070BDF200AB9333 /* RootViewController.swift */; }; 23 | 30E768842070BEA300AB9333 /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E768832070BEA300AB9333 /* SplashViewController.swift */; }; 24 | 30E768862070C4C900AB9333 /* Login.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 30E768852070C4C900AB9333 /* Login.storyboard */; }; 25 | 30E768882070D49600AB9333 /* Camera.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 30E768872070D49600AB9333 /* Camera.storyboard */; }; 26 | 30E7688A20711AF500AB9333 /* DeepLinkShortcut.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E7688920711AF500AB9333 /* DeepLinkShortcut.swift */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 30E7685A2070BA4C00AB9333 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 30E7683D2070BA4B00AB9333 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 30E768442070BA4B00AB9333; 35 | remoteInfo = RootViewController; 36 | }; 37 | 30E768652070BA4C00AB9333 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 30E7683D2070BA4B00AB9333 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 30E768442070BA4B00AB9333; 42 | remoteInfo = RootViewController; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 30E768452070BA4B00AB9333 /* RootViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RootViewController.app; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 30E768482070BA4B00AB9333 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 49 | 30E7684A2070BA4B00AB9333 /* TabViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewController.swift; sourceTree = ""; }; 50 | 30E7684D2070BA4C00AB9333 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 30E7684F2070BA4C00AB9333 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 30E768522070BA4C00AB9333 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 30E768542070BA4C00AB9333 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 30E768592070BA4C00AB9333 /* RootViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RootViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 30E7685D2070BA4C00AB9333 /* RootViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewControllerTests.swift; sourceTree = ""; }; 56 | 30E7685F2070BA4C00AB9333 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 30E768642070BA4C00AB9333 /* RootViewControllerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RootViewControllerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 30E768682070BA4C00AB9333 /* RootViewControllerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewControllerUITests.swift; sourceTree = ""; }; 59 | 30E7686A2070BA4C00AB9333 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | 30E768762070BCC700AB9333 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; 61 | 30E768782070BCE400AB9333 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; 62 | 30E7687A2070BCF100AB9333 /* SettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = ""; }; 63 | 30E7687C2070BD1100AB9333 /* CameraViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraViewController.swift; sourceTree = ""; }; 64 | 30E7687F2070BDC700AB9333 /* Router.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = ""; }; 65 | 30E768812070BDF200AB9333 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; 66 | 30E768832070BEA300AB9333 /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = ""; }; 67 | 30E768852070C4C900AB9333 /* Login.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Login.storyboard; sourceTree = ""; }; 68 | 30E768872070D49600AB9333 /* Camera.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Camera.storyboard; sourceTree = ""; }; 69 | 30E7688920711AF500AB9333 /* DeepLinkShortcut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinkShortcut.swift; sourceTree = ""; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | 30E768422070BA4B00AB9333 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | 30E768562070BA4C00AB9333 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | 30E768612070BA4C00AB9333 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | /* End PBXFrameworksBuildPhase section */ 95 | 96 | /* Begin PBXGroup section */ 97 | 30E7683C2070BA4B00AB9333 = { 98 | isa = PBXGroup; 99 | children = ( 100 | 30E768472070BA4B00AB9333 /* RootViewController */, 101 | 30E7685C2070BA4C00AB9333 /* RootViewControllerTests */, 102 | 30E768672070BA4C00AB9333 /* RootViewControllerUITests */, 103 | 30E768462070BA4B00AB9333 /* Products */, 104 | ); 105 | sourceTree = ""; 106 | }; 107 | 30E768462070BA4B00AB9333 /* Products */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 30E768452070BA4B00AB9333 /* RootViewController.app */, 111 | 30E768592070BA4C00AB9333 /* RootViewControllerTests.xctest */, 112 | 30E768642070BA4C00AB9333 /* RootViewControllerUITests.xctest */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 30E768472070BA4B00AB9333 /* RootViewController */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 30E7687E2070BDA700AB9333 /* ViewController */, 121 | 30E768482070BA4B00AB9333 /* AppDelegate.swift */, 122 | 30E7687F2070BDC700AB9333 /* Router.swift */, 123 | 30E7684C2070BA4C00AB9333 /* Main.storyboard */, 124 | 30E7684F2070BA4C00AB9333 /* Assets.xcassets */, 125 | 30E768512070BA4C00AB9333 /* LaunchScreen.storyboard */, 126 | 30E768542070BA4C00AB9333 /* Info.plist */, 127 | 30E7688920711AF500AB9333 /* DeepLinkShortcut.swift */, 128 | ); 129 | path = RootViewController; 130 | sourceTree = ""; 131 | }; 132 | 30E7685C2070BA4C00AB9333 /* RootViewControllerTests */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 30E7685D2070BA4C00AB9333 /* RootViewControllerTests.swift */, 136 | 30E7685F2070BA4C00AB9333 /* Info.plist */, 137 | ); 138 | path = RootViewControllerTests; 139 | sourceTree = ""; 140 | }; 141 | 30E768672070BA4C00AB9333 /* RootViewControllerUITests */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 30E768682070BA4C00AB9333 /* RootViewControllerUITests.swift */, 145 | 30E7686A2070BA4C00AB9333 /* Info.plist */, 146 | ); 147 | path = RootViewControllerUITests; 148 | sourceTree = ""; 149 | }; 150 | 30E7687E2070BDA700AB9333 /* ViewController */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 30E768812070BDF200AB9333 /* RootViewController.swift */, 154 | 30E768832070BEA300AB9333 /* SplashViewController.swift */, 155 | 30E768782070BCE400AB9333 /* LoginViewController.swift */, 156 | 30E7684A2070BA4B00AB9333 /* TabViewController.swift */, 157 | 30E768762070BCC700AB9333 /* MainViewController.swift */, 158 | 30E7687A2070BCF100AB9333 /* SettingViewController.swift */, 159 | 30E7687C2070BD1100AB9333 /* CameraViewController.swift */, 160 | 30E768852070C4C900AB9333 /* Login.storyboard */, 161 | 30E768872070D49600AB9333 /* Camera.storyboard */, 162 | ); 163 | path = ViewController; 164 | sourceTree = ""; 165 | }; 166 | /* End PBXGroup section */ 167 | 168 | /* Begin PBXNativeTarget section */ 169 | 30E768442070BA4B00AB9333 /* RootViewController */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = 30E7686D2070BA4C00AB9333 /* Build configuration list for PBXNativeTarget "RootViewController" */; 172 | buildPhases = ( 173 | 30E768412070BA4B00AB9333 /* Sources */, 174 | 30E768422070BA4B00AB9333 /* Frameworks */, 175 | 30E768432070BA4B00AB9333 /* Resources */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | ); 181 | name = RootViewController; 182 | productName = RootViewController; 183 | productReference = 30E768452070BA4B00AB9333 /* RootViewController.app */; 184 | productType = "com.apple.product-type.application"; 185 | }; 186 | 30E768582070BA4C00AB9333 /* RootViewControllerTests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = 30E768702070BA4C00AB9333 /* Build configuration list for PBXNativeTarget "RootViewControllerTests" */; 189 | buildPhases = ( 190 | 30E768552070BA4C00AB9333 /* Sources */, 191 | 30E768562070BA4C00AB9333 /* Frameworks */, 192 | 30E768572070BA4C00AB9333 /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | 30E7685B2070BA4C00AB9333 /* PBXTargetDependency */, 198 | ); 199 | name = RootViewControllerTests; 200 | productName = RootViewControllerTests; 201 | productReference = 30E768592070BA4C00AB9333 /* RootViewControllerTests.xctest */; 202 | productType = "com.apple.product-type.bundle.unit-test"; 203 | }; 204 | 30E768632070BA4C00AB9333 /* RootViewControllerUITests */ = { 205 | isa = PBXNativeTarget; 206 | buildConfigurationList = 30E768732070BA4C00AB9333 /* Build configuration list for PBXNativeTarget "RootViewControllerUITests" */; 207 | buildPhases = ( 208 | 30E768602070BA4C00AB9333 /* Sources */, 209 | 30E768612070BA4C00AB9333 /* Frameworks */, 210 | 30E768622070BA4C00AB9333 /* Resources */, 211 | ); 212 | buildRules = ( 213 | ); 214 | dependencies = ( 215 | 30E768662070BA4C00AB9333 /* PBXTargetDependency */, 216 | ); 217 | name = RootViewControllerUITests; 218 | productName = RootViewControllerUITests; 219 | productReference = 30E768642070BA4C00AB9333 /* RootViewControllerUITests.xctest */; 220 | productType = "com.apple.product-type.bundle.ui-testing"; 221 | }; 222 | /* End PBXNativeTarget section */ 223 | 224 | /* Begin PBXProject section */ 225 | 30E7683D2070BA4B00AB9333 /* Project object */ = { 226 | isa = PBXProject; 227 | attributes = { 228 | LastSwiftUpdateCheck = 0920; 229 | LastUpgradeCheck = 0920; 230 | ORGANIZATIONNAME = "Personal Factory"; 231 | TargetAttributes = { 232 | 30E768442070BA4B00AB9333 = { 233 | CreatedOnToolsVersion = 9.2; 234 | ProvisioningStyle = Automatic; 235 | }; 236 | 30E768582070BA4C00AB9333 = { 237 | CreatedOnToolsVersion = 9.2; 238 | ProvisioningStyle = Automatic; 239 | TestTargetID = 30E768442070BA4B00AB9333; 240 | }; 241 | 30E768632070BA4C00AB9333 = { 242 | CreatedOnToolsVersion = 9.2; 243 | ProvisioningStyle = Automatic; 244 | TestTargetID = 30E768442070BA4B00AB9333; 245 | }; 246 | }; 247 | }; 248 | buildConfigurationList = 30E768402070BA4B00AB9333 /* Build configuration list for PBXProject "RootViewController" */; 249 | compatibilityVersion = "Xcode 8.0"; 250 | developmentRegion = en; 251 | hasScannedForEncodings = 0; 252 | knownRegions = ( 253 | en, 254 | Base, 255 | ); 256 | mainGroup = 30E7683C2070BA4B00AB9333; 257 | productRefGroup = 30E768462070BA4B00AB9333 /* Products */; 258 | projectDirPath = ""; 259 | projectRoot = ""; 260 | targets = ( 261 | 30E768442070BA4B00AB9333 /* RootViewController */, 262 | 30E768582070BA4C00AB9333 /* RootViewControllerTests */, 263 | 30E768632070BA4C00AB9333 /* RootViewControllerUITests */, 264 | ); 265 | }; 266 | /* End PBXProject section */ 267 | 268 | /* Begin PBXResourcesBuildPhase section */ 269 | 30E768432070BA4B00AB9333 /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | 30E768862070C4C900AB9333 /* Login.storyboard in Resources */, 274 | 30E768532070BA4C00AB9333 /* LaunchScreen.storyboard in Resources */, 275 | 30E768502070BA4C00AB9333 /* Assets.xcassets in Resources */, 276 | 30E7684E2070BA4C00AB9333 /* Main.storyboard in Resources */, 277 | 30E768882070D49600AB9333 /* Camera.storyboard in Resources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | 30E768572070BA4C00AB9333 /* Resources */ = { 282 | isa = PBXResourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | 30E768622070BA4C00AB9333 /* Resources */ = { 289 | isa = PBXResourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | /* End PBXResourcesBuildPhase section */ 296 | 297 | /* Begin PBXSourcesBuildPhase section */ 298 | 30E768412070BA4B00AB9333 /* Sources */ = { 299 | isa = PBXSourcesBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | 30E7687B2070BCF100AB9333 /* SettingViewController.swift in Sources */, 303 | 30E7688A20711AF500AB9333 /* DeepLinkShortcut.swift in Sources */, 304 | 30E768792070BCE400AB9333 /* LoginViewController.swift in Sources */, 305 | 30E768772070BCC700AB9333 /* MainViewController.swift in Sources */, 306 | 30E768842070BEA300AB9333 /* SplashViewController.swift in Sources */, 307 | 30E768802070BDC700AB9333 /* Router.swift in Sources */, 308 | 30E7684B2070BA4B00AB9333 /* TabViewController.swift in Sources */, 309 | 30E768492070BA4B00AB9333 /* AppDelegate.swift in Sources */, 310 | 30E768822070BDF200AB9333 /* RootViewController.swift in Sources */, 311 | 30E7687D2070BD1100AB9333 /* CameraViewController.swift in Sources */, 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | 30E768552070BA4C00AB9333 /* Sources */ = { 316 | isa = PBXSourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | 30E7685E2070BA4C00AB9333 /* RootViewControllerTests.swift in Sources */, 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | }; 323 | 30E768602070BA4C00AB9333 /* Sources */ = { 324 | isa = PBXSourcesBuildPhase; 325 | buildActionMask = 2147483647; 326 | files = ( 327 | 30E768692070BA4C00AB9333 /* RootViewControllerUITests.swift in Sources */, 328 | ); 329 | runOnlyForDeploymentPostprocessing = 0; 330 | }; 331 | /* End PBXSourcesBuildPhase section */ 332 | 333 | /* Begin PBXTargetDependency section */ 334 | 30E7685B2070BA4C00AB9333 /* PBXTargetDependency */ = { 335 | isa = PBXTargetDependency; 336 | target = 30E768442070BA4B00AB9333 /* RootViewController */; 337 | targetProxy = 30E7685A2070BA4C00AB9333 /* PBXContainerItemProxy */; 338 | }; 339 | 30E768662070BA4C00AB9333 /* PBXTargetDependency */ = { 340 | isa = PBXTargetDependency; 341 | target = 30E768442070BA4B00AB9333 /* RootViewController */; 342 | targetProxy = 30E768652070BA4C00AB9333 /* PBXContainerItemProxy */; 343 | }; 344 | /* End PBXTargetDependency section */ 345 | 346 | /* Begin PBXVariantGroup section */ 347 | 30E7684C2070BA4C00AB9333 /* Main.storyboard */ = { 348 | isa = PBXVariantGroup; 349 | children = ( 350 | 30E7684D2070BA4C00AB9333 /* Base */, 351 | ); 352 | name = Main.storyboard; 353 | sourceTree = ""; 354 | }; 355 | 30E768512070BA4C00AB9333 /* LaunchScreen.storyboard */ = { 356 | isa = PBXVariantGroup; 357 | children = ( 358 | 30E768522070BA4C00AB9333 /* Base */, 359 | ); 360 | name = LaunchScreen.storyboard; 361 | sourceTree = ""; 362 | }; 363 | /* End PBXVariantGroup section */ 364 | 365 | /* Begin XCBuildConfiguration section */ 366 | 30E7686B2070BA4C00AB9333 /* Debug */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | ALWAYS_SEARCH_USER_PATHS = NO; 370 | CLANG_ANALYZER_NONNULL = YES; 371 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 372 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 373 | CLANG_CXX_LIBRARY = "libc++"; 374 | CLANG_ENABLE_MODULES = YES; 375 | CLANG_ENABLE_OBJC_ARC = YES; 376 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 377 | CLANG_WARN_BOOL_CONVERSION = YES; 378 | CLANG_WARN_COMMA = YES; 379 | CLANG_WARN_CONSTANT_CONVERSION = YES; 380 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 381 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 382 | CLANG_WARN_EMPTY_BODY = YES; 383 | CLANG_WARN_ENUM_CONVERSION = YES; 384 | CLANG_WARN_INFINITE_RECURSION = YES; 385 | CLANG_WARN_INT_CONVERSION = YES; 386 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 387 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 388 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 389 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 390 | CLANG_WARN_STRICT_PROTOTYPES = YES; 391 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 392 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 393 | CLANG_WARN_UNREACHABLE_CODE = YES; 394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 395 | CODE_SIGN_IDENTITY = "iPhone Developer"; 396 | COPY_PHASE_STRIP = NO; 397 | DEBUG_INFORMATION_FORMAT = dwarf; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | ENABLE_TESTABILITY = YES; 400 | GCC_C_LANGUAGE_STANDARD = gnu11; 401 | GCC_DYNAMIC_NO_PIC = NO; 402 | GCC_NO_COMMON_BLOCKS = YES; 403 | GCC_OPTIMIZATION_LEVEL = 0; 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 415 | MTL_ENABLE_DEBUG_INFO = YES; 416 | ONLY_ACTIVE_ARCH = YES; 417 | SDKROOT = iphoneos; 418 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 419 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 420 | }; 421 | name = Debug; 422 | }; 423 | 30E7686C2070BA4C00AB9333 /* Release */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | ALWAYS_SEARCH_USER_PATHS = NO; 427 | CLANG_ANALYZER_NONNULL = YES; 428 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 429 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 430 | CLANG_CXX_LIBRARY = "libc++"; 431 | CLANG_ENABLE_MODULES = YES; 432 | CLANG_ENABLE_OBJC_ARC = YES; 433 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 434 | CLANG_WARN_BOOL_CONVERSION = YES; 435 | CLANG_WARN_COMMA = YES; 436 | CLANG_WARN_CONSTANT_CONVERSION = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 439 | CLANG_WARN_EMPTY_BODY = YES; 440 | CLANG_WARN_ENUM_CONVERSION = YES; 441 | CLANG_WARN_INFINITE_RECURSION = YES; 442 | CLANG_WARN_INT_CONVERSION = YES; 443 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 444 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 445 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 446 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 447 | CLANG_WARN_STRICT_PROTOTYPES = YES; 448 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 449 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 450 | CLANG_WARN_UNREACHABLE_CODE = YES; 451 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 452 | CODE_SIGN_IDENTITY = "iPhone Developer"; 453 | COPY_PHASE_STRIP = NO; 454 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 455 | ENABLE_NS_ASSERTIONS = NO; 456 | ENABLE_STRICT_OBJC_MSGSEND = YES; 457 | GCC_C_LANGUAGE_STANDARD = gnu11; 458 | GCC_NO_COMMON_BLOCKS = YES; 459 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 460 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 461 | GCC_WARN_UNDECLARED_SELECTOR = YES; 462 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 463 | GCC_WARN_UNUSED_FUNCTION = YES; 464 | GCC_WARN_UNUSED_VARIABLE = YES; 465 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 466 | MTL_ENABLE_DEBUG_INFO = NO; 467 | SDKROOT = iphoneos; 468 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 469 | VALIDATE_PRODUCT = YES; 470 | }; 471 | name = Release; 472 | }; 473 | 30E7686E2070BA4C00AB9333 /* Debug */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 477 | CODE_SIGN_STYLE = Automatic; 478 | DEVELOPMENT_TEAM = WNEUDLL4LF; 479 | INFOPLIST_FILE = RootViewController/Info.plist; 480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 481 | PRODUCT_BUNDLE_IDENTIFIER = "com.personal-factory.RootViewController"; 482 | PRODUCT_NAME = "$(TARGET_NAME)"; 483 | SWIFT_VERSION = 4.0; 484 | TARGETED_DEVICE_FAMILY = "1,2"; 485 | }; 486 | name = Debug; 487 | }; 488 | 30E7686F2070BA4C00AB9333 /* Release */ = { 489 | isa = XCBuildConfiguration; 490 | buildSettings = { 491 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 492 | CODE_SIGN_STYLE = Automatic; 493 | DEVELOPMENT_TEAM = WNEUDLL4LF; 494 | INFOPLIST_FILE = RootViewController/Info.plist; 495 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 496 | PRODUCT_BUNDLE_IDENTIFIER = "com.personal-factory.RootViewController"; 497 | PRODUCT_NAME = "$(TARGET_NAME)"; 498 | SWIFT_VERSION = 4.0; 499 | TARGETED_DEVICE_FAMILY = "1,2"; 500 | }; 501 | name = Release; 502 | }; 503 | 30E768712070BA4C00AB9333 /* Debug */ = { 504 | isa = XCBuildConfiguration; 505 | buildSettings = { 506 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 507 | BUNDLE_LOADER = "$(TEST_HOST)"; 508 | CODE_SIGN_STYLE = Automatic; 509 | DEVELOPMENT_TEAM = WNEUDLL4LF; 510 | INFOPLIST_FILE = RootViewControllerTests/Info.plist; 511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 512 | PRODUCT_BUNDLE_IDENTIFIER = "com.personal-factory.RootViewControllerTests"; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | SWIFT_VERSION = 4.0; 515 | TARGETED_DEVICE_FAMILY = "1,2"; 516 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RootViewController.app/RootViewController"; 517 | }; 518 | name = Debug; 519 | }; 520 | 30E768722070BA4C00AB9333 /* Release */ = { 521 | isa = XCBuildConfiguration; 522 | buildSettings = { 523 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 524 | BUNDLE_LOADER = "$(TEST_HOST)"; 525 | CODE_SIGN_STYLE = Automatic; 526 | DEVELOPMENT_TEAM = WNEUDLL4LF; 527 | INFOPLIST_FILE = RootViewControllerTests/Info.plist; 528 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 529 | PRODUCT_BUNDLE_IDENTIFIER = "com.personal-factory.RootViewControllerTests"; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | SWIFT_VERSION = 4.0; 532 | TARGETED_DEVICE_FAMILY = "1,2"; 533 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RootViewController.app/RootViewController"; 534 | }; 535 | name = Release; 536 | }; 537 | 30E768742070BA4C00AB9333 /* Debug */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 541 | CODE_SIGN_STYLE = Automatic; 542 | DEVELOPMENT_TEAM = WNEUDLL4LF; 543 | INFOPLIST_FILE = RootViewControllerUITests/Info.plist; 544 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 545 | PRODUCT_BUNDLE_IDENTIFIER = "com.personal-factory.RootViewControllerUITests"; 546 | PRODUCT_NAME = "$(TARGET_NAME)"; 547 | SWIFT_VERSION = 4.0; 548 | TARGETED_DEVICE_FAMILY = "1,2"; 549 | TEST_TARGET_NAME = RootViewController; 550 | }; 551 | name = Debug; 552 | }; 553 | 30E768752070BA4C00AB9333 /* Release */ = { 554 | isa = XCBuildConfiguration; 555 | buildSettings = { 556 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 557 | CODE_SIGN_STYLE = Automatic; 558 | DEVELOPMENT_TEAM = WNEUDLL4LF; 559 | INFOPLIST_FILE = RootViewControllerUITests/Info.plist; 560 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 561 | PRODUCT_BUNDLE_IDENTIFIER = "com.personal-factory.RootViewControllerUITests"; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | SWIFT_VERSION = 4.0; 564 | TARGETED_DEVICE_FAMILY = "1,2"; 565 | TEST_TARGET_NAME = RootViewController; 566 | }; 567 | name = Release; 568 | }; 569 | /* End XCBuildConfiguration section */ 570 | 571 | /* Begin XCConfigurationList section */ 572 | 30E768402070BA4B00AB9333 /* Build configuration list for PBXProject "RootViewController" */ = { 573 | isa = XCConfigurationList; 574 | buildConfigurations = ( 575 | 30E7686B2070BA4C00AB9333 /* Debug */, 576 | 30E7686C2070BA4C00AB9333 /* Release */, 577 | ); 578 | defaultConfigurationIsVisible = 0; 579 | defaultConfigurationName = Release; 580 | }; 581 | 30E7686D2070BA4C00AB9333 /* Build configuration list for PBXNativeTarget "RootViewController" */ = { 582 | isa = XCConfigurationList; 583 | buildConfigurations = ( 584 | 30E7686E2070BA4C00AB9333 /* Debug */, 585 | 30E7686F2070BA4C00AB9333 /* Release */, 586 | ); 587 | defaultConfigurationIsVisible = 0; 588 | defaultConfigurationName = Release; 589 | }; 590 | 30E768702070BA4C00AB9333 /* Build configuration list for PBXNativeTarget "RootViewControllerTests" */ = { 591 | isa = XCConfigurationList; 592 | buildConfigurations = ( 593 | 30E768712070BA4C00AB9333 /* Debug */, 594 | 30E768722070BA4C00AB9333 /* Release */, 595 | ); 596 | defaultConfigurationIsVisible = 0; 597 | defaultConfigurationName = Release; 598 | }; 599 | 30E768732070BA4C00AB9333 /* Build configuration list for PBXNativeTarget "RootViewControllerUITests" */ = { 600 | isa = XCConfigurationList; 601 | buildConfigurations = ( 602 | 30E768742070BA4C00AB9333 /* Debug */, 603 | 30E768752070BA4C00AB9333 /* Release */, 604 | ); 605 | defaultConfigurationIsVisible = 0; 606 | defaultConfigurationName = Release; 607 | }; 608 | /* End XCConfigurationList section */ 609 | }; 610 | rootObject = 30E7683D2070BA4B00AB9333 /* Project object */; 611 | } 612 | -------------------------------------------------------------------------------- /RootViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RootViewController.xcodeproj/xcuserdata/satoutakeshi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 40 | 52 | 53 | 54 | 56 | 68 | 69 | 70 | 72 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /RootViewController.xcodeproj/xcuserdata/satoutakeshi.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RootViewController.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /RootViewController/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 16 | setup() 17 | return true 18 | } 19 | 20 | private func setup() { 21 | window = UIWindow(frame: UIScreen.main.bounds) 22 | window?.rootViewController = router.rootViewController 23 | window?.makeKeyAndVisible() 24 | 25 | UIApplication.shared.shortcutItems = DeepLinkShortcut.register() 26 | } 27 | 28 | // MARK: Shortcuts 29 | func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) { 30 | 31 | if let shortCut = DeepLinkShortcut.handleShortcut(shortcutItem) { 32 | let route = AppDelegate.shared.router 33 | switch shortCut { 34 | case .main: 35 | route.route(to: .main, from: route.rootViewController) 36 | case .camera: 37 | route.route(to: .camera, from: route.rootViewController) 38 | case .setting: 39 | route.route(to: .setting, from: route.rootViewController) 40 | } 41 | } 42 | completionHandler(true) 43 | } 44 | } 45 | 46 | private let _router = Router() 47 | 48 | extension AppDelegate { 49 | static var shared: AppDelegate { 50 | guard let delegate = UIApplication.shared.delegate as? AppDelegate else { 51 | fatalError("not set app delegate") 52 | } 53 | return delegate 54 | } 55 | var router: Router { 56 | return _router 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /RootViewController/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 | } -------------------------------------------------------------------------------- /RootViewController/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 | -------------------------------------------------------------------------------- /RootViewController/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 | -------------------------------------------------------------------------------- /RootViewController/DeepLinkShortcut.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeepLinkShortcut.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | struct DeepLinkShortcut { 11 | enum ItemType: String { 12 | case main 13 | case camera 14 | case setting 15 | } 16 | 17 | static func register() -> [UIApplicationShortcutItem] { 18 | let mainShortcutItem = UIApplicationShortcutItem(type: ItemType.main.rawValue, localizedTitle: "メイン画面") 19 | let cameraShortcutItem = UIApplicationShortcutItem(type: ItemType.camera.rawValue, localizedTitle: "カメラ画面") 20 | let settingShortcutItem = UIApplicationShortcutItem(type: ItemType.setting.rawValue, localizedTitle: "設定画面") 21 | return [mainShortcutItem, cameraShortcutItem, settingShortcutItem] 22 | } 23 | 24 | static func handleShortcut(_ shortcut: UIApplicationShortcutItem) -> ItemType? { 25 | return ItemType(rawValue: shortcut.type) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /RootViewController/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 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /RootViewController/Router.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Router.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | final class Router { 11 | enum Locate { 12 | case login 13 | case main 14 | case camera 15 | case setting 16 | } 17 | let rootViewController = RootViewController() 18 | func route(to locate: Locate, from viewController: UIViewController) { 19 | switch locate { 20 | case .login: 21 | rootViewController.showLoginScreen() 22 | break 23 | case .main: 24 | rootViewController.showMain() 25 | case .camera: 26 | rootViewController.showCameraScreen() 27 | break 28 | case .setting: 29 | rootViewController.showSettingScreen() 30 | break 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /RootViewController/ViewController/Camera.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /RootViewController/ViewController/CameraViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CameraViewController.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CameraViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | view.backgroundColor = UIColor.brown 16 | } 17 | static func instantiate() -> CameraViewController { 18 | guard let camera = UIStoryboard(name: "Camera", bundle: nil).instantiateInitialViewController() as? CameraViewController else { 19 | fatalError("not set top camera screen") 20 | } 21 | return camera 22 | } 23 | @IBAction func dismiss(_ sender: UIButton) { 24 | dismiss(animated: true, completion: nil) 25 | AppDelegate.shared.router.route(to: .main, from: self) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /RootViewController/ViewController/Login.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /RootViewController/ViewController/LoginViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewController.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LoginViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | view.backgroundColor = UIColor.yellow 16 | } 17 | @IBAction func goToNext(_ sender: UIButton) { 18 | AppDelegate.shared.router.route(to: .main, from: self) 19 | } 20 | static func instantiate() -> LoginViewController { 21 | guard let login = UIStoryboard(name: "Login", bundle: nil).instantiateInitialViewController() as? LoginViewController else { 22 | fatalError("not set top tab view ") 23 | } 24 | return login 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /RootViewController/ViewController/MainViewController.swift: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // FirstViewController.swift 4 | // RootViewController 5 | // 6 | // Created by satoutakeshi on 2018/04/01. 7 | // Copyright © 2018年 Personal Factory. All rights reserved. 8 | // 9 | 10 | import UIKit 11 | 12 | class MainViewController: UIViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RootViewController/ViewController/RootViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class RootViewController: UIViewController { 12 | private var current: UIViewController 13 | init() { 14 | //起動時は必ずスプラッシュ画面を表示 15 | current = SplashViewController() 16 | super.init(nibName: nil, bundle: nil) 17 | } 18 | required init?(coder aDecoder: NSCoder) { 19 | fatalError("init(coder:) has not been implemented") 20 | } 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | self.view.backgroundColor = UIColor.blue 24 | addChildViewController(current) 25 | current.view.frame = view.bounds 26 | view.addSubview(current.view) 27 | current.didMove(toParentViewController: self) 28 | } 29 | private func replaceCurrent(for new: UIViewController) { 30 | current.willMove(toParentViewController: nil) 31 | current.view.removeFromSuperview() 32 | current.removeFromParentViewController() 33 | current = new 34 | } 35 | private func animateFadeTransition(to new: UIViewController, completion: (() -> Void)? = nil) { 36 | current.willMove(toParentViewController: nil) 37 | 38 | addChildViewController(new) 39 | current.view.frame = new.view.bounds 40 | transition(from: current, to: new, duration: 0.3, options: [.transitionCrossDissolve, .curveEaseOut], animations: {[weak self] in 41 | self?.view.addSubview(new.view) 42 | }) {[weak self] completed in 43 | self?.current.removeFromParentViewController() 44 | self?.current.view.removeFromSuperview() 45 | new.didMove(toParentViewController: self) 46 | self?.current = new 47 | completion?() 48 | 49 | } 50 | } 51 | 52 | // MARK: アプリで行う具体的な遷移 53 | func showLoginScreen() { 54 | let new = LoginViewController.instantiate() 55 | addChildViewController(new) 56 | new.view.frame = view.bounds 57 | view.addSubview(new.view) 58 | new.didMove(toParentViewController: self) 59 | replaceCurrent(for: new) 60 | } 61 | 62 | func showMain() { 63 | switch current { 64 | case let tab as TabViewController: 65 | tab.selectMain() 66 | default: 67 | let tab = TabViewController.instantiate() 68 | animateFadeTransition(to: tab) 69 | // addChildViewController(tab) 70 | // tab.view.frame = view.bounds 71 | // view.addSubview(tab.view) 72 | // tab.didMove(toParentViewController: self) 73 | // replaceCurrent(for: tab) 74 | } 75 | } 76 | 77 | func showCameraScreen() { 78 | let camera = CameraViewController.instantiate() 79 | let navigation = UINavigationController(rootViewController: camera) 80 | current.present(navigation, animated: true, completion: nil) 81 | } 82 | 83 | func showSettingScreen() { 84 | switch current { 85 | case let tab as TabViewController: 86 | tab.selectSetting() 87 | default: 88 | let tab = TabViewController.instantiate() 89 | animateFadeTransition(to: tab) 90 | tab.selectSetting() 91 | } 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /RootViewController/ViewController/SettingViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingViewController.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SettingViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | view.backgroundColor = UIColor.gray 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RootViewController/ViewController/SplashViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SplashViewController.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SplashViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | onViewDidload() 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | func onViewDidload() { 25 | if UserDefaults.standard.bool(forKey: "IS_LOGIN") { 26 | //メイン画面を表示 27 | assert(Thread.isMainThread) 28 | AppDelegate.shared.router.route(to: .main, from: self) 29 | } else { 30 | UserDefaults.standard.set(true, forKey: "IS_LOGIN") 31 | //ログイン画面を表示 32 | AppDelegate.shared.router.route(to: .login, from: self) 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /RootViewController/ViewController/TabViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TabViewController.swift 3 | // RootViewController 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class EmptyViewControlelr: UIViewController{} 12 | 13 | class TabViewController: UITabBarController, UITabBarControllerDelegate { 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | self.delegate = self 18 | view.backgroundColor = UIColor.blue 19 | 20 | let main = MainViewController() 21 | main.tabBarItem = UITabBarItem(tabBarSystemItem: .favorites, tag: 1) 22 | 23 | let empty = EmptyViewControlelr() 24 | empty.tabBarItem = UITabBarItem(tabBarSystemItem: .featured, tag: 2) 25 | 26 | let setting = SettingViewController() 27 | setting.tabBarItem = UITabBarItem(tabBarSystemItem: .contacts, tag: 3) 28 | 29 | setViewControllers([main, empty, setting], animated: true) 30 | } 31 | 32 | func selectMain() { 33 | self.selectedIndex = 0 34 | } 35 | 36 | func selectSetting() { 37 | self.selectedIndex = 2 38 | } 39 | 40 | static func instantiate() -> TabViewController { 41 | guard let top = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController() as? TabViewController else { 42 | fatalError("not set top tab view ") 43 | } 44 | return top 45 | } 46 | 47 | // MARK: UITabBarControllerDelegate 48 | func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) { 49 | switch viewController { 50 | case is EmptyViewControlelr: 51 | AppDelegate.shared.router.route(to: .camera, from: self) 52 | default: 53 | break 54 | } 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /RootViewControllerTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /RootViewControllerTests/RootViewControllerTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewControllerTests.swift 3 | // RootViewControllerTests 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import RootViewController 11 | 12 | class RootViewControllerTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /RootViewControllerUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /RootViewControllerUITests/RootViewControllerUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewControllerUITests.swift 3 | // RootViewControllerUITests 4 | // 5 | // Created by satoutakeshi on 2018/04/01. 6 | // Copyright © 2018年 Personal Factory. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class RootViewControllerUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------