├── .gitignore ├── .travis.yml ├── GitHawkRoutes.podspec ├── GitHawkRoutes.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── GitHawkRoutes ├── BookmarkShortcutRoute.swift ├── GitHawkRoutes.h ├── Info.plist ├── IssueRoute.swift ├── RepoRoute.swift ├── Routable.swift ├── SearchShortcutRoute.swift ├── SwitchAccountShortcutRoute.swift ├── UIApplication+Routable.swift └── URL+Routable.swift ├── GitHawkRoutesTests ├── GitHawkRoutesTests.swift └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## OSX 6 | .DS_Store 7 | 8 | ## Build generated 9 | build/ 10 | DerivedData/ 11 | 12 | ## Various settings 13 | *.pbxuser 14 | !default.pbxuser 15 | *.mode1v3 16 | !default.mode1v3 17 | *.mode2v3 18 | !default.mode2v3 19 | *.perspectivev3 20 | !default.perspectivev3 21 | xcuserdata/ 22 | 23 | ## Other 24 | *.moved-aside 25 | *.xccheckout 26 | *.xcscmblueprint 27 | 28 | ## Obj-C/Swift specific 29 | *.hmap 30 | *.ipa 31 | *.dSYM.zip 32 | *.dSYM 33 | 34 | ## Playgrounds 35 | timeline.xctimeline 36 | playground.xcworkspace 37 | 38 | # Swift Package Manager 39 | # 40 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 41 | # Packages/ 42 | # Package.pins 43 | .build/ 44 | 45 | # CocoaPods 46 | # 47 | # We recommend against adding the Pods directory to your .gitignore. However 48 | # you should judge for yourself, the pros and cons are mentioned at: 49 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 50 | # 51 | # Pods/ 52 | 53 | # Carthage 54 | # 55 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 56 | # Carthage/Checkouts 57 | 58 | Carthage/Build 59 | 60 | # fastlane 61 | # 62 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 63 | # screenshots whenever they are needed. 64 | # For more information about the recommended setup visit: 65 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 66 | 67 | fastlane/report.xml 68 | fastlane/Preview.html 69 | fastlane/screenshots 70 | fastlane/test_output 71 | node_modules 72 | 73 | # Jekyll 74 | _site/ 75 | .sass-cache/ 76 | .jekyll-metadata 77 | 78 | # secrets 79 | Resources/*.xcconfig 80 | *Secrets.swift* 81 | 82 | 83 | # FBSnapshotTestCase Failure Diffs 84 | FailureDiffs/ 85 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: swift 2 | osx_image: xcode10 3 | script: 4 | - xcodebuild clean -project GitHawkRoutes.xcodeproj -scheme GitHawkRoutes -destination "platform=iOS Simulator,name=iPhone X,OS=12.0" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -quiet -------------------------------------------------------------------------------- /GitHawkRoutes.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | spec.name = 'GitHawkRoutes' 3 | spec.version = '0.1.1' 4 | spec.license = { :type => 'MIT' } 5 | spec.homepage = 'https://github.com/GitHawkApp/GitHawkRoutes' 6 | spec.authors = { 'Ryan Nystrom' => 'rnystrom@whoisryannystrom.com' } 7 | spec.summary = 'GitHawk routing and deep links.' 8 | spec.source = { :git => 'https://github.com/GitHawkApp/GitHawkRoutes.git', :tag => spec.version.to_s } 9 | spec.source_files = 'GitHawkRoutes/*.swift' 10 | spec.platform = :ios, '9.0' 11 | spec.swift_version = '4.2' 12 | end 13 | -------------------------------------------------------------------------------- /GitHawkRoutes.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2962505E217D530300EA6164 /* RepoRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2962505D217D530300EA6164 /* RepoRoute.swift */; }; 11 | 29695E93218A9FB800577363 /* URL+Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29695E92218A9FB800577363 /* URL+Routable.swift */; }; 12 | 29695E94218AA0B700577363 /* URL+Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29695E92218A9FB800577363 /* URL+Routable.swift */; }; 13 | 29B205CB217ABFB000E4DD9F /* GitHawkRoutes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B205C1217ABFAF00E4DD9F /* GitHawkRoutes.framework */; }; 14 | 29B205D0217ABFB000E4DD9F /* GitHawkRoutesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205CF217ABFB000E4DD9F /* GitHawkRoutesTests.swift */; }; 15 | 29B205D2217ABFB000E4DD9F /* GitHawkRoutes.h in Headers */ = {isa = PBXBuildFile; fileRef = 29B205C4217ABFAF00E4DD9F /* GitHawkRoutes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 29B205E1217AC01600E4DD9F /* Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DB217AC01600E4DD9F /* Routable.swift */; }; 17 | 29B205E2217AC01600E4DD9F /* Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DB217AC01600E4DD9F /* Routable.swift */; }; 18 | 29B205E3217AC01600E4DD9F /* IssueRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DC217AC01600E4DD9F /* IssueRoute.swift */; }; 19 | 29B205E4217AC01600E4DD9F /* IssueRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DC217AC01600E4DD9F /* IssueRoute.swift */; }; 20 | 29B205E5217AC01600E4DD9F /* SearchShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DD217AC01600E4DD9F /* SearchShortcutRoute.swift */; }; 21 | 29B205E6217AC01600E4DD9F /* SearchShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DD217AC01600E4DD9F /* SearchShortcutRoute.swift */; }; 22 | 29B205E9217AC01600E4DD9F /* BookmarkShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DF217AC01600E4DD9F /* BookmarkShortcutRoute.swift */; }; 23 | 29B205EA217AC01600E4DD9F /* BookmarkShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205DF217AC01600E4DD9F /* BookmarkShortcutRoute.swift */; }; 24 | 29B205EB217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205E0217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift */; }; 25 | 29B205EC217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205E0217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift */; }; 26 | 29B205EE217ACA3700E4DD9F /* UIApplication+Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205ED217ACA3700E4DD9F /* UIApplication+Routable.swift */; }; 27 | 29B205EF217ACA3700E4DD9F /* UIApplication+Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B205ED217ACA3700E4DD9F /* UIApplication+Routable.swift */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 29B205CC217ABFB000E4DD9F /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 29B205B8217ABFAF00E4DD9F /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 29B205C0217ABFAF00E4DD9F; 36 | remoteInfo = GitHawkRoutes; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 2962505D217D530300EA6164 /* RepoRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepoRoute.swift; sourceTree = ""; }; 42 | 29695E92218A9FB800577363 /* URL+Routable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+Routable.swift"; sourceTree = ""; }; 43 | 29B205C1217ABFAF00E4DD9F /* GitHawkRoutes.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GitHawkRoutes.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 29B205C4217ABFAF00E4DD9F /* GitHawkRoutes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GitHawkRoutes.h; sourceTree = ""; }; 45 | 29B205C5217ABFAF00E4DD9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 29B205CA217ABFB000E4DD9F /* GitHawkRoutesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GitHawkRoutesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 29B205CF217ABFB000E4DD9F /* GitHawkRoutesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHawkRoutesTests.swift; sourceTree = ""; }; 48 | 29B205D1217ABFB000E4DD9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 29B205DB217AC01600E4DD9F /* Routable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Routable.swift; sourceTree = ""; }; 50 | 29B205DC217AC01600E4DD9F /* IssueRoute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IssueRoute.swift; sourceTree = ""; }; 51 | 29B205DD217AC01600E4DD9F /* SearchShortcutRoute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchShortcutRoute.swift; sourceTree = ""; }; 52 | 29B205DF217AC01600E4DD9F /* BookmarkShortcutRoute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarkShortcutRoute.swift; sourceTree = ""; }; 53 | 29B205E0217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchAccountShortcutRoute.swift; sourceTree = ""; }; 54 | 29B205ED217ACA3700E4DD9F /* UIApplication+Routable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Routable.swift"; sourceTree = ""; }; 55 | /* End PBXFileReference section */ 56 | 57 | /* Begin PBXFrameworksBuildPhase section */ 58 | 29B205BE217ABFAF00E4DD9F /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | 29B205C7217ABFB000E4DD9F /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 29B205CB217ABFB000E4DD9F /* GitHawkRoutes.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 29B205B7217ABFAF00E4DD9F = { 77 | isa = PBXGroup; 78 | children = ( 79 | 29B205C3217ABFAF00E4DD9F /* GitHawkRoutes */, 80 | 29B205CE217ABFB000E4DD9F /* GitHawkRoutesTests */, 81 | 29B205C2217ABFAF00E4DD9F /* Products */, 82 | ); 83 | sourceTree = ""; 84 | }; 85 | 29B205C2217ABFAF00E4DD9F /* Products */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 29B205C1217ABFAF00E4DD9F /* GitHawkRoutes.framework */, 89 | 29B205CA217ABFB000E4DD9F /* GitHawkRoutesTests.xctest */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | 29B205C3217ABFAF00E4DD9F /* GitHawkRoutes */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 29B205DF217AC01600E4DD9F /* BookmarkShortcutRoute.swift */, 98 | 29B205C4217ABFAF00E4DD9F /* GitHawkRoutes.h */, 99 | 29B205C5217ABFAF00E4DD9F /* Info.plist */, 100 | 29B205DC217AC01600E4DD9F /* IssueRoute.swift */, 101 | 2962505D217D530300EA6164 /* RepoRoute.swift */, 102 | 29B205DB217AC01600E4DD9F /* Routable.swift */, 103 | 29B205DD217AC01600E4DD9F /* SearchShortcutRoute.swift */, 104 | 29B205E0217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift */, 105 | 29B205ED217ACA3700E4DD9F /* UIApplication+Routable.swift */, 106 | 29695E92218A9FB800577363 /* URL+Routable.swift */, 107 | ); 108 | path = GitHawkRoutes; 109 | sourceTree = ""; 110 | }; 111 | 29B205CE217ABFB000E4DD9F /* GitHawkRoutesTests */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 29B205CF217ABFB000E4DD9F /* GitHawkRoutesTests.swift */, 115 | 29B205D1217ABFB000E4DD9F /* Info.plist */, 116 | ); 117 | path = GitHawkRoutesTests; 118 | sourceTree = ""; 119 | }; 120 | /* End PBXGroup section */ 121 | 122 | /* Begin PBXHeadersBuildPhase section */ 123 | 29B205BC217ABFAF00E4DD9F /* Headers */ = { 124 | isa = PBXHeadersBuildPhase; 125 | buildActionMask = 2147483647; 126 | files = ( 127 | 29B205D2217ABFB000E4DD9F /* GitHawkRoutes.h in Headers */, 128 | ); 129 | runOnlyForDeploymentPostprocessing = 0; 130 | }; 131 | /* End PBXHeadersBuildPhase section */ 132 | 133 | /* Begin PBXNativeTarget section */ 134 | 29B205C0217ABFAF00E4DD9F /* GitHawkRoutes */ = { 135 | isa = PBXNativeTarget; 136 | buildConfigurationList = 29B205D5217ABFB000E4DD9F /* Build configuration list for PBXNativeTarget "GitHawkRoutes" */; 137 | buildPhases = ( 138 | 29B205BC217ABFAF00E4DD9F /* Headers */, 139 | 29B205BD217ABFAF00E4DD9F /* Sources */, 140 | 29B205BE217ABFAF00E4DD9F /* Frameworks */, 141 | 29B205BF217ABFAF00E4DD9F /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = GitHawkRoutes; 148 | productName = GitHawkRoutes; 149 | productReference = 29B205C1217ABFAF00E4DD9F /* GitHawkRoutes.framework */; 150 | productType = "com.apple.product-type.framework"; 151 | }; 152 | 29B205C9217ABFB000E4DD9F /* GitHawkRoutesTests */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 29B205D8217ABFB000E4DD9F /* Build configuration list for PBXNativeTarget "GitHawkRoutesTests" */; 155 | buildPhases = ( 156 | 29B205C6217ABFB000E4DD9F /* Sources */, 157 | 29B205C7217ABFB000E4DD9F /* Frameworks */, 158 | 29B205C8217ABFB000E4DD9F /* Resources */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | 29B205CD217ABFB000E4DD9F /* PBXTargetDependency */, 164 | ); 165 | name = GitHawkRoutesTests; 166 | productName = GitHawkRoutesTests; 167 | productReference = 29B205CA217ABFB000E4DD9F /* GitHawkRoutesTests.xctest */; 168 | productType = "com.apple.product-type.bundle.unit-test"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | 29B205B8217ABFAF00E4DD9F /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastSwiftUpdateCheck = 1000; 177 | LastUpgradeCheck = 1000; 178 | ORGANIZATIONNAME = "Ryan Nystrom"; 179 | TargetAttributes = { 180 | 29B205C0217ABFAF00E4DD9F = { 181 | CreatedOnToolsVersion = 10.0; 182 | LastSwiftMigration = 1000; 183 | }; 184 | 29B205C9217ABFB000E4DD9F = { 185 | CreatedOnToolsVersion = 10.0; 186 | }; 187 | }; 188 | }; 189 | buildConfigurationList = 29B205BB217ABFAF00E4DD9F /* Build configuration list for PBXProject "GitHawkRoutes" */; 190 | compatibilityVersion = "Xcode 9.3"; 191 | developmentRegion = en; 192 | hasScannedForEncodings = 0; 193 | knownRegions = ( 194 | en, 195 | ); 196 | mainGroup = 29B205B7217ABFAF00E4DD9F; 197 | productRefGroup = 29B205C2217ABFAF00E4DD9F /* Products */; 198 | projectDirPath = ""; 199 | projectRoot = ""; 200 | targets = ( 201 | 29B205C0217ABFAF00E4DD9F /* GitHawkRoutes */, 202 | 29B205C9217ABFB000E4DD9F /* GitHawkRoutesTests */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 29B205BF217ABFAF00E4DD9F /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | 29B205C8217ABFB000E4DD9F /* Resources */ = { 216 | isa = PBXResourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | /* End PBXResourcesBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 29B205BD217ABFAF00E4DD9F /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 29B205EE217ACA3700E4DD9F /* UIApplication+Routable.swift in Sources */, 230 | 29695E93218A9FB800577363 /* URL+Routable.swift in Sources */, 231 | 29B205EB217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift in Sources */, 232 | 29B205E5217AC01600E4DD9F /* SearchShortcutRoute.swift in Sources */, 233 | 2962505E217D530300EA6164 /* RepoRoute.swift in Sources */, 234 | 29B205E3217AC01600E4DD9F /* IssueRoute.swift in Sources */, 235 | 29B205E1217AC01600E4DD9F /* Routable.swift in Sources */, 236 | 29B205E9217AC01600E4DD9F /* BookmarkShortcutRoute.swift in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | 29B205C6217ABFB000E4DD9F /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | 29B205D0217ABFB000E4DD9F /* GitHawkRoutesTests.swift in Sources */, 245 | 29695E94218AA0B700577363 /* URL+Routable.swift in Sources */, 246 | 29B205E6217AC01600E4DD9F /* SearchShortcutRoute.swift in Sources */, 247 | 29B205EC217AC01600E4DD9F /* SwitchAccountShortcutRoute.swift in Sources */, 248 | 29B205EA217AC01600E4DD9F /* BookmarkShortcutRoute.swift in Sources */, 249 | 29B205E2217AC01600E4DD9F /* Routable.swift in Sources */, 250 | 29B205E4217AC01600E4DD9F /* IssueRoute.swift in Sources */, 251 | 29B205EF217ACA3700E4DD9F /* UIApplication+Routable.swift in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXSourcesBuildPhase section */ 256 | 257 | /* Begin PBXTargetDependency section */ 258 | 29B205CD217ABFB000E4DD9F /* PBXTargetDependency */ = { 259 | isa = PBXTargetDependency; 260 | target = 29B205C0217ABFAF00E4DD9F /* GitHawkRoutes */; 261 | targetProxy = 29B205CC217ABFB000E4DD9F /* PBXContainerItemProxy */; 262 | }; 263 | /* End PBXTargetDependency section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 29B205D3217ABFB000E4DD9F /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | ALWAYS_SEARCH_USER_PATHS = NO; 270 | CLANG_ANALYZER_NONNULL = YES; 271 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_ENABLE_OBJC_WEAK = YES; 277 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 278 | CLANG_WARN_BOOL_CONVERSION = YES; 279 | CLANG_WARN_COMMA = YES; 280 | CLANG_WARN_CONSTANT_CONVERSION = YES; 281 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 282 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 283 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 284 | CLANG_WARN_EMPTY_BODY = YES; 285 | CLANG_WARN_ENUM_CONVERSION = YES; 286 | CLANG_WARN_INFINITE_RECURSION = YES; 287 | CLANG_WARN_INT_CONVERSION = YES; 288 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 289 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 290 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 291 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 292 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 293 | CLANG_WARN_STRICT_PROTOTYPES = YES; 294 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 295 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 296 | CLANG_WARN_UNREACHABLE_CODE = YES; 297 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 298 | CODE_SIGN_IDENTITY = "iPhone Developer"; 299 | COPY_PHASE_STRIP = NO; 300 | CURRENT_PROJECT_VERSION = 1; 301 | DEBUG_INFORMATION_FORMAT = dwarf; 302 | ENABLE_STRICT_OBJC_MSGSEND = YES; 303 | ENABLE_TESTABILITY = YES; 304 | GCC_C_LANGUAGE_STANDARD = gnu11; 305 | GCC_DYNAMIC_NO_PIC = NO; 306 | GCC_NO_COMMON_BLOCKS = YES; 307 | GCC_OPTIMIZATION_LEVEL = 0; 308 | GCC_PREPROCESSOR_DEFINITIONS = ( 309 | "DEBUG=1", 310 | "$(inherited)", 311 | ); 312 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 313 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 314 | GCC_WARN_UNDECLARED_SELECTOR = YES; 315 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 316 | GCC_WARN_UNUSED_FUNCTION = YES; 317 | GCC_WARN_UNUSED_VARIABLE = YES; 318 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 319 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 320 | MTL_FAST_MATH = YES; 321 | ONLY_ACTIVE_ARCH = YES; 322 | SDKROOT = iphoneos; 323 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 324 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 325 | VERSIONING_SYSTEM = "apple-generic"; 326 | VERSION_INFO_PREFIX = ""; 327 | }; 328 | name = Debug; 329 | }; 330 | 29B205D4217ABFB000E4DD9F /* Release */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ALWAYS_SEARCH_USER_PATHS = NO; 334 | CLANG_ANALYZER_NONNULL = YES; 335 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 337 | CLANG_CXX_LIBRARY = "libc++"; 338 | CLANG_ENABLE_MODULES = YES; 339 | CLANG_ENABLE_OBJC_ARC = YES; 340 | CLANG_ENABLE_OBJC_WEAK = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 360 | CLANG_WARN_UNREACHABLE_CODE = YES; 361 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 362 | CODE_SIGN_IDENTITY = "iPhone Developer"; 363 | COPY_PHASE_STRIP = NO; 364 | CURRENT_PROJECT_VERSION = 1; 365 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 366 | ENABLE_NS_ASSERTIONS = NO; 367 | ENABLE_STRICT_OBJC_MSGSEND = YES; 368 | GCC_C_LANGUAGE_STANDARD = gnu11; 369 | GCC_NO_COMMON_BLOCKS = YES; 370 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 371 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 372 | GCC_WARN_UNDECLARED_SELECTOR = YES; 373 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 374 | GCC_WARN_UNUSED_FUNCTION = YES; 375 | GCC_WARN_UNUSED_VARIABLE = YES; 376 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 377 | MTL_ENABLE_DEBUG_INFO = NO; 378 | MTL_FAST_MATH = YES; 379 | SDKROOT = iphoneos; 380 | SWIFT_COMPILATION_MODE = wholemodule; 381 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 382 | VALIDATE_PRODUCT = YES; 383 | VERSIONING_SYSTEM = "apple-generic"; 384 | VERSION_INFO_PREFIX = ""; 385 | }; 386 | name = Release; 387 | }; 388 | 29B205D6217ABFB000E4DD9F /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | CLANG_ENABLE_MODULES = YES; 392 | CODE_SIGN_IDENTITY = ""; 393 | CODE_SIGN_STYLE = Automatic; 394 | DEFINES_MODULE = YES; 395 | DYLIB_COMPATIBILITY_VERSION = 1; 396 | DYLIB_CURRENT_VERSION = 1; 397 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 398 | INFOPLIST_FILE = GitHawkRoutes/Info.plist; 399 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 400 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 401 | LD_RUNPATH_SEARCH_PATHS = ( 402 | "$(inherited)", 403 | "@executable_path/Frameworks", 404 | "@loader_path/Frameworks", 405 | ); 406 | PRODUCT_BUNDLE_IDENTIFIER = com.githawk.GitHawkRoutes; 407 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 408 | SKIP_INSTALL = YES; 409 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 410 | SWIFT_VERSION = 4.2; 411 | TARGETED_DEVICE_FAMILY = "1,2"; 412 | }; 413 | name = Debug; 414 | }; 415 | 29B205D7217ABFB000E4DD9F /* Release */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | CLANG_ENABLE_MODULES = YES; 419 | CODE_SIGN_IDENTITY = ""; 420 | CODE_SIGN_STYLE = Automatic; 421 | DEFINES_MODULE = YES; 422 | DYLIB_COMPATIBILITY_VERSION = 1; 423 | DYLIB_CURRENT_VERSION = 1; 424 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 425 | INFOPLIST_FILE = GitHawkRoutes/Info.plist; 426 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 427 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 428 | LD_RUNPATH_SEARCH_PATHS = ( 429 | "$(inherited)", 430 | "@executable_path/Frameworks", 431 | "@loader_path/Frameworks", 432 | ); 433 | PRODUCT_BUNDLE_IDENTIFIER = com.githawk.GitHawkRoutes; 434 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 435 | SKIP_INSTALL = YES; 436 | SWIFT_VERSION = 4.2; 437 | TARGETED_DEVICE_FAMILY = "1,2"; 438 | }; 439 | name = Release; 440 | }; 441 | 29B205D9217ABFB000E4DD9F /* Debug */ = { 442 | isa = XCBuildConfiguration; 443 | buildSettings = { 444 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 445 | CODE_SIGN_STYLE = Automatic; 446 | INFOPLIST_FILE = GitHawkRoutesTests/Info.plist; 447 | LD_RUNPATH_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "@executable_path/Frameworks", 450 | "@loader_path/Frameworks", 451 | ); 452 | PRODUCT_BUNDLE_IDENTIFIER = com.githawk.GitHawkRoutesTests; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | SWIFT_VERSION = 4.2; 455 | TARGETED_DEVICE_FAMILY = "1,2"; 456 | }; 457 | name = Debug; 458 | }; 459 | 29B205DA217ABFB000E4DD9F /* Release */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 463 | CODE_SIGN_STYLE = Automatic; 464 | INFOPLIST_FILE = GitHawkRoutesTests/Info.plist; 465 | LD_RUNPATH_SEARCH_PATHS = ( 466 | "$(inherited)", 467 | "@executable_path/Frameworks", 468 | "@loader_path/Frameworks", 469 | ); 470 | PRODUCT_BUNDLE_IDENTIFIER = com.githawk.GitHawkRoutesTests; 471 | PRODUCT_NAME = "$(TARGET_NAME)"; 472 | SWIFT_VERSION = 4.2; 473 | TARGETED_DEVICE_FAMILY = "1,2"; 474 | }; 475 | name = Release; 476 | }; 477 | /* End XCBuildConfiguration section */ 478 | 479 | /* Begin XCConfigurationList section */ 480 | 29B205BB217ABFAF00E4DD9F /* Build configuration list for PBXProject "GitHawkRoutes" */ = { 481 | isa = XCConfigurationList; 482 | buildConfigurations = ( 483 | 29B205D3217ABFB000E4DD9F /* Debug */, 484 | 29B205D4217ABFB000E4DD9F /* Release */, 485 | ); 486 | defaultConfigurationIsVisible = 0; 487 | defaultConfigurationName = Release; 488 | }; 489 | 29B205D5217ABFB000E4DD9F /* Build configuration list for PBXNativeTarget "GitHawkRoutes" */ = { 490 | isa = XCConfigurationList; 491 | buildConfigurations = ( 492 | 29B205D6217ABFB000E4DD9F /* Debug */, 493 | 29B205D7217ABFB000E4DD9F /* Release */, 494 | ); 495 | defaultConfigurationIsVisible = 0; 496 | defaultConfigurationName = Release; 497 | }; 498 | 29B205D8217ABFB000E4DD9F /* Build configuration list for PBXNativeTarget "GitHawkRoutesTests" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | 29B205D9217ABFB000E4DD9F /* Debug */, 502 | 29B205DA217ABFB000E4DD9F /* Release */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | /* End XCConfigurationList section */ 508 | }; 509 | rootObject = 29B205B8217ABFAF00E4DD9F /* Project object */; 510 | } 511 | -------------------------------------------------------------------------------- /GitHawkRoutes.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GitHawkRoutes.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /GitHawkRoutes/BookmarkShortcutRoute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BookmarkShortcutRoute.swift 3 | // Freetime 4 | // 5 | // Created by Ryan Nystrom on 10/7/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct BookmarkShortcutRoute: Routable { 12 | 13 | public init() {} 14 | 15 | public static func from(params: [String: String]) -> BookmarkShortcutRoute? { 16 | return BookmarkShortcutRoute() 17 | } 18 | 19 | public var encoded: [String: String] { return [:] } 20 | 21 | public static var path: String { 22 | return "com.githawk.shortcut.bookmark" 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /GitHawkRoutes/GitHawkRoutes.h: -------------------------------------------------------------------------------- 1 | // 2 | // GitHawkRoutes.h 3 | // GitHawkRoutes 4 | // 5 | // Created by Ryan Nystrom on 10/19/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for GitHawkRoutes. 12 | FOUNDATION_EXPORT double GitHawkRoutesVersionNumber; 13 | 14 | //! Project version string for GitHawkRoutes. 15 | FOUNDATION_EXPORT const unsigned char GitHawkRoutesVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /GitHawkRoutes/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /GitHawkRoutes/IssueRoute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IssueNotificationRoute.swift 3 | // Freetime 4 | // 5 | // Created by Ryan Nystrom on 10/9/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct IssueRoute: Routable { 12 | 13 | public let owner: String 14 | public let repo: String 15 | public let number: Int 16 | public let scrollToBottom: Bool 17 | 18 | public init(owner: String, repo: String, number: Int, scrollToBottom: Bool = false) { 19 | self.owner = owner 20 | self.repo = repo 21 | self.number = number 22 | self.scrollToBottom = scrollToBottom 23 | } 24 | 25 | public static func from(params: [String: String]) -> IssueRoute? { 26 | guard let owner = params["owner"], 27 | let repo = params["repo"], 28 | let number = (params["number"] as NSString?)?.integerValue 29 | else { return nil } 30 | // optional to handle migrations 31 | let scrollToBottom = (params["scrollToBottom"] as NSString?)?.boolValue ?? false 32 | return IssueRoute( 33 | owner: owner, 34 | repo: repo, 35 | number: number, 36 | scrollToBottom: scrollToBottom 37 | ) 38 | } 39 | 40 | public var encoded: [String: String] { 41 | return [ 42 | "owner": owner, 43 | "repo": repo, 44 | "number": "\(number)", 45 | "scrollToBottom": "\(scrollToBottom)" 46 | ] 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /GitHawkRoutes/RepoRoute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RepoRoute.swift 3 | // GitHawkRoutes 4 | // 5 | // Created by Ryan Nystrom on 10/21/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct RepoRoute: Routable { 12 | 13 | public let owner: String 14 | public let repo: String 15 | public let branch: String? 16 | 17 | public init(owner: String, repo: String, branch: String?) { 18 | self.owner = owner 19 | self.repo = repo 20 | self.branch = branch 21 | } 22 | 23 | public static func from(params: [String: String]) -> RepoRoute? { 24 | guard let owner = params["owner"], 25 | let repo = params["repo"] 26 | else { return nil } 27 | return RepoRoute(owner: owner, repo: repo, branch: params["branch"]) 28 | } 29 | 30 | public var encoded: [String: String] { 31 | var map = [ 32 | "owner": owner, 33 | "repo": repo, 34 | ] 35 | if let branch = self.branch { 36 | map["branch"] = branch 37 | } 38 | return map 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /GitHawkRoutes/Routable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Routable.swift 3 | // Freetime 4 | // 5 | // Created by Ryan Nystrom on 10/7/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public protocol Routable { 12 | static func from(params: [String: String]) -> Self? 13 | var encoded: [String: String] { get } 14 | } 15 | 16 | public extension Routable { 17 | 18 | public static var path: String { 19 | return String(describing: self) 20 | } 21 | 22 | public var encoded: [String: String] { return [:] } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /GitHawkRoutes/SearchShortcutRoute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchShortcutRoute.swift 3 | // Freetime 4 | // 5 | // Created by Ryan Nystrom on 10/7/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public struct SearchShortcutRoute: Routable { 12 | 13 | public init() {} 14 | 15 | public static func from(params: [String: String]) -> SearchShortcutRoute? { 16 | return SearchShortcutRoute() 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /GitHawkRoutes/SwitchAccountShortcutRoute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwitchAccountShortcutRoute.swift 3 | // Freetime 4 | // 5 | // Created by Ryan Nystrom on 10/7/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct SwitchAccountShortcutRoute: Routable { 12 | 13 | public let username: String 14 | 15 | public init(username: String) { 16 | self.username = username 17 | } 18 | 19 | public static func from(params: [String: String]) -> SwitchAccountShortcutRoute? { 20 | guard let username = params["username"] else { return nil } 21 | return SwitchAccountShortcutRoute(username: username) 22 | } 23 | 24 | public var encoded: [String: String] { 25 | return [ 26 | "username": username 27 | ] 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /GitHawkRoutes/UIApplication+Routable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplication+Routable.swift 3 | // GitHawkRoutes 4 | // 5 | // Created by Ryan Nystrom on 10/19/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public extension UIApplication { 12 | 13 | public func open( 14 | githawk route: T, 15 | completion: ((Bool) -> Void)? = nil 16 | ) { 17 | 18 | guard let url = URL.from(githawk: route), 19 | canOpenURL(url) 20 | else { 21 | completion?(false) 22 | return 23 | } 24 | if #available(iOS 10.0, *) { 25 | open(url, options: [:], completionHandler: completion) 26 | } else { 27 | let result = openURL(url) 28 | completion?(result) 29 | } 30 | } 31 | 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /GitHawkRoutes/URL+Routable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // URL+Routable.swift 3 | // GitHawkRoutes 4 | // 5 | // Created by Ryan Nystrom on 10/31/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | internal extension URL { 12 | 13 | static func from(githawk route: T) -> URL? { 14 | var components = URLComponents() 15 | components.scheme = "freetime" 16 | components.host = T.path 17 | components.queryItems = route.encoded.map(URLQueryItem.init) 18 | return components.url 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /GitHawkRoutesTests/GitHawkRoutesTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GitHawkRoutesTests.swift 3 | // GitHawkRoutesTests 4 | // 5 | // Created by Ryan Nystrom on 10/19/18. 6 | // Copyright © 2018 Ryan Nystrom. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import GitHawkRoutes 11 | 12 | class GitHawkRoutesTests: XCTestCase { 13 | 14 | func testRepo() { 15 | let repo = RepoRoute( 16 | owner: "GitHawkApp", 17 | repo: "GitHawk", 18 | branch: "master" 19 | ) 20 | let url = URL.from(githawk: repo)! 21 | let components = URLComponents(url: url, resolvingAgainstBaseURL: false)! 22 | 23 | XCTAssertEqual("freetime", components.scheme) 24 | XCTAssertEqual("RepoRoute", components.host) 25 | XCTAssertEqual("GitHawkApp", components.queryItems?.first(where: { $0.name == "owner"})!.value) 26 | XCTAssertEqual("GitHawk", components.queryItems?.first(where: { $0.name == "repo"})!.value) 27 | XCTAssertEqual("master", components.queryItems?.first(where: { $0.name == "branch"})!.value) 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /GitHawkRoutesTests/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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017 Ryan Nystrom http://whoisryannystrom.com/ 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHawkRoutes 2 | 3 | Strongly-typed deep-links _into_ GitHawk. 4 | 5 | ## Installation 6 | 7 | Just add `GitHawkRoutes` to your Podfile and pod install. Done! 8 | 9 | ``` 10 | pod 'GitHawkRoutes' 11 | ``` 12 | 13 | ## Usage 14 | 15 | Create one of the available routes: 16 | 17 | ```swift 18 | import GitHawkRoutes 19 | 20 | let repo = RepoRoute( 21 | owner: "GitHawkApp", 22 | repo: "GitHawk", 23 | branch: "master" 24 | ) 25 | ``` 26 | 27 | Then simply use our `UIApplication` extension to have your app open GitHawk: 28 | 29 | ```swift 30 | UIApplication.shared.open(githawk: repo) 31 | ``` 32 | 33 | Really, that's it! 34 | 35 | > Beware using the `master` branch of this repo as the App Store version of GitHawk may be behind. In that case, the route will just open GitHawk. 36 | 37 | ## Acknowledgements 38 | 39 | - Created with ❤️ by [Ryan Nystrom](https://twitter.com/_ryannystrom) --------------------------------------------------------------------------------