├── .gitignore ├── Github.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── Github ├── AppDelegate.swift ├── Constant.swift ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── Info.plist ├── Login │ ├── Login.swift │ └── LoginViewController.swift ├── LoginAnimator.swift ├── Repos │ ├── Repos.swift │ └── ReposViewController.swift └── Storyboard.storyboard ├── GithubTests ├── GithubTests.swift └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout -------------------------------------------------------------------------------- /Github.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6B3E7A2419D8ECB2006071F7 /* ReposViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B3E7A2319D8ECB2006071F7 /* ReposViewController.swift */; }; 11 | 6B3E7A2619D8EEE2006071F7 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B3E7A2519D8EEE2006071F7 /* Constant.swift */; }; 12 | 6B3E7A2819D91CD9006071F7 /* Repos.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B3E7A2719D91CD9006071F7 /* Repos.swift */; }; 13 | 6BEE5F11193ECB1200E52C59 /* Login.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BEE5F10193ECB1200E52C59 /* Login.swift */; }; 14 | 6BFEB0C9193EBEDE00612B8B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFEB0C8193EBEDE00612B8B /* AppDelegate.swift */; }; 15 | 6BFEB0CB193EBEDE00612B8B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6BFEB0CA193EBEDE00612B8B /* Images.xcassets */; }; 16 | 6BFEB0D7193EBEDE00612B8B /* GithubTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFEB0D6193EBEDE00612B8B /* GithubTests.swift */; }; 17 | 6BFEB0E1193EBF4300612B8B /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6BFEB0E0193EBF4300612B8B /* Storyboard.storyboard */; }; 18 | 6BFEB0E3193EC12200612B8B /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFEB0E2193EC12200612B8B /* LoginViewController.swift */; }; 19 | D9CE587E1B1D20A100D9DAF3 /* LoginAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CE587D1B1D20A100D9DAF3 /* LoginAnimator.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 6B3E7A1919D8DE9F006071F7 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */; 26 | proxyType = 2; 27 | remoteGlobalIDString = 6B3E79B719D355CF006071F7; 28 | remoteInfo = JSONJoy; 29 | }; 30 | 6B3E7A1B19D8DE9F006071F7 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */; 33 | proxyType = 2; 34 | remoteGlobalIDString = 6B3E79C219D355CF006071F7; 35 | remoteInfo = JSONJoyTests; 36 | }; 37 | 6B3E7A1E19D8DEB5006071F7 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 6B3E79B619D355CF006071F7; 42 | remoteInfo = JSONJoy; 43 | }; 44 | 6BFD904B19C9299B00DD99B6 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = 6BFD901619C8D8B500DD99B6; 49 | remoteInfo = SwiftHTTP; 50 | }; 51 | 6BFD904D19C9299B00DD99B6 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = 6BFD902119C8D8B500DD99B6; 56 | remoteInfo = SwiftHTTPTests; 57 | }; 58 | 6BFD905119C92A1600DD99B6 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */; 61 | proxyType = 1; 62 | remoteGlobalIDString = 6BFD901519C8D8B500DD99B6; 63 | remoteInfo = SwiftHTTP; 64 | }; 65 | 6BFEB0D1193EBEDE00612B8B /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 6BFEB0BB193EBEDE00612B8B /* Project object */; 68 | proxyType = 1; 69 | remoteGlobalIDString = 6BFEB0C2193EBEDE00612B8B; 70 | remoteInfo = Github; 71 | }; 72 | D9CE58721B1D202D00D9DAF3 /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */; 75 | proxyType = 2; 76 | remoteGlobalIDString = D958022E19E6ED8E003C8218; 77 | remoteInfo = JSONJoyOSX; 78 | }; 79 | D9CE58741B1D202D00D9DAF3 /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */; 82 | proxyType = 2; 83 | remoteGlobalIDString = D958023819E6ED8E003C8218; 84 | remoteInfo = JSONJoyOSXTests; 85 | }; 86 | D9CE58791B1D202D00D9DAF3 /* PBXContainerItemProxy */ = { 87 | isa = PBXContainerItemProxy; 88 | containerPortal = 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */; 89 | proxyType = 2; 90 | remoteGlobalIDString = D958025919E6EEEB003C8218; 91 | remoteInfo = SwiftHTTPOSX; 92 | }; 93 | D9CE587B1B1D202D00D9DAF3 /* PBXContainerItemProxy */ = { 94 | isa = PBXContainerItemProxy; 95 | containerPortal = 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */; 96 | proxyType = 2; 97 | remoteGlobalIDString = D958026319E6EEEB003C8218; 98 | remoteInfo = SwiftHTTPOSXTests; 99 | }; 100 | /* End PBXContainerItemProxy section */ 101 | 102 | /* Begin PBXFileReference section */ 103 | 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JSONJoy.xcodeproj; path = "../JSONJoy-Swift/JSONJoy.xcodeproj"; sourceTree = ""; }; 104 | 6B3E7A2319D8ECB2006071F7 /* ReposViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ReposViewController.swift; path = Repos/ReposViewController.swift; sourceTree = ""; }; 105 | 6B3E7A2519D8EEE2006071F7 /* Constant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; 106 | 6B3E7A2719D91CD9006071F7 /* Repos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Repos.swift; path = Repos/Repos.swift; sourceTree = ""; }; 107 | 6BEE5F10193ECB1200E52C59 /* Login.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Login.swift; path = Login/Login.swift; sourceTree = ""; }; 108 | 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftHTTP.xcodeproj; path = ../SwiftHTTP/SwiftHTTP.xcodeproj; sourceTree = ""; }; 109 | 6BFEB0C3193EBEDE00612B8B /* Github.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Github.app; sourceTree = BUILT_PRODUCTS_DIR; }; 110 | 6BFEB0C7193EBEDE00612B8B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 111 | 6BFEB0C8193EBEDE00612B8B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 112 | 6BFEB0CA193EBEDE00612B8B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 113 | 6BFEB0D0193EBEDE00612B8B /* GithubTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GithubTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 114 | 6BFEB0D5193EBEDE00612B8B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 115 | 6BFEB0D6193EBEDE00612B8B /* GithubTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GithubTests.swift; sourceTree = ""; }; 116 | 6BFEB0E0193EBF4300612B8B /* Storyboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Storyboard.storyboard; sourceTree = ""; }; 117 | 6BFEB0E2193EC12200612B8B /* LoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoginViewController.swift; path = Login/LoginViewController.swift; sourceTree = ""; }; 118 | D9CE587D1B1D20A100D9DAF3 /* LoginAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginAnimator.swift; sourceTree = ""; }; 119 | /* End PBXFileReference section */ 120 | 121 | /* Begin PBXFrameworksBuildPhase section */ 122 | 6BFEB0C0193EBEDE00612B8B /* Frameworks */ = { 123 | isa = PBXFrameworksBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | ); 127 | runOnlyForDeploymentPostprocessing = 0; 128 | }; 129 | 6BFEB0CD193EBEDE00612B8B /* Frameworks */ = { 130 | isa = PBXFrameworksBuildPhase; 131 | buildActionMask = 2147483647; 132 | files = ( 133 | ); 134 | runOnlyForDeploymentPostprocessing = 0; 135 | }; 136 | /* End PBXFrameworksBuildPhase section */ 137 | 138 | /* Begin PBXGroup section */ 139 | 6B3E7A1519D8DE9F006071F7 /* Products */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 6B3E7A1A19D8DE9F006071F7 /* JSONJoy.framework */, 143 | 6B3E7A1C19D8DE9F006071F7 /* JSONJoyTests.xctest */, 144 | D9CE58731B1D202D00D9DAF3 /* JSONJoy.framework */, 145 | D9CE58751B1D202D00D9DAF3 /* JSONJoyOSXTests.xctest */, 146 | ); 147 | name = Products; 148 | sourceTree = ""; 149 | }; 150 | 6B3E7A2219D8EC70006071F7 /* Repos */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 6B3E7A2319D8ECB2006071F7 /* ReposViewController.swift */, 154 | 6B3E7A2719D91CD9006071F7 /* Repos.swift */, 155 | ); 156 | name = Repos; 157 | sourceTree = ""; 158 | }; 159 | 6BFD904719C9299B00DD99B6 /* Products */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 6BFD904C19C9299B00DD99B6 /* SwiftHTTP.framework */, 163 | 6BFD904E19C9299B00DD99B6 /* SwiftHTTPTests.xctest */, 164 | D9CE587A1B1D202D00D9DAF3 /* SwiftHTTP.framework */, 165 | D9CE587C1B1D202D00D9DAF3 /* SwiftHTTPOSXTests.xctest */, 166 | ); 167 | name = Products; 168 | sourceTree = ""; 169 | }; 170 | 6BFEB0BA193EBEDE00612B8B = { 171 | isa = PBXGroup; 172 | children = ( 173 | 6BFEB0C5193EBEDE00612B8B /* Github */, 174 | 6BFEB0D3193EBEDE00612B8B /* GithubTests */, 175 | 6BFEB0C4193EBEDE00612B8B /* Products */, 176 | 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */, 177 | 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */, 178 | ); 179 | sourceTree = ""; 180 | }; 181 | 6BFEB0C4193EBEDE00612B8B /* Products */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | 6BFEB0C3193EBEDE00612B8B /* Github.app */, 185 | 6BFEB0D0193EBEDE00612B8B /* GithubTests.xctest */, 186 | ); 187 | name = Products; 188 | sourceTree = ""; 189 | }; 190 | 6BFEB0C5193EBEDE00612B8B /* Github */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | D9CE586E1B1D202D00D9DAF3 /* Shared */, 194 | 6B3E7A2219D8EC70006071F7 /* Repos */, 195 | 6BFEB0E4193EC12800612B8B /* Login */, 196 | 6BFEB0C8193EBEDE00612B8B /* AppDelegate.swift */, 197 | 6BFEB0CA193EBEDE00612B8B /* Images.xcassets */, 198 | 6BFEB0C6193EBEDE00612B8B /* Supporting Files */, 199 | 6BFEB0E0193EBF4300612B8B /* Storyboard.storyboard */, 200 | 6B3E7A2519D8EEE2006071F7 /* Constant.swift */, 201 | ); 202 | path = Github; 203 | sourceTree = ""; 204 | }; 205 | 6BFEB0C6193EBEDE00612B8B /* Supporting Files */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | 6BFEB0C7193EBEDE00612B8B /* Info.plist */, 209 | ); 210 | name = "Supporting Files"; 211 | sourceTree = ""; 212 | }; 213 | 6BFEB0D3193EBEDE00612B8B /* GithubTests */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 6BFEB0D6193EBEDE00612B8B /* GithubTests.swift */, 217 | 6BFEB0D4193EBEDE00612B8B /* Supporting Files */, 218 | ); 219 | path = GithubTests; 220 | sourceTree = ""; 221 | }; 222 | 6BFEB0D4193EBEDE00612B8B /* Supporting Files */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 6BFEB0D5193EBEDE00612B8B /* Info.plist */, 226 | ); 227 | name = "Supporting Files"; 228 | sourceTree = ""; 229 | }; 230 | 6BFEB0E4193EC12800612B8B /* Login */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | 6BEE5F10193ECB1200E52C59 /* Login.swift */, 234 | 6BFEB0E2193EC12200612B8B /* LoginViewController.swift */, 235 | D9CE587D1B1D20A100D9DAF3 /* LoginAnimator.swift */, 236 | ); 237 | name = Login; 238 | sourceTree = ""; 239 | }; 240 | D9CE586E1B1D202D00D9DAF3 /* Shared */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | ); 244 | name = Shared; 245 | sourceTree = ""; 246 | }; 247 | /* End PBXGroup section */ 248 | 249 | /* Begin PBXNativeTarget section */ 250 | 6BFEB0C2193EBEDE00612B8B /* Github */ = { 251 | isa = PBXNativeTarget; 252 | buildConfigurationList = 6BFEB0DA193EBEDE00612B8B /* Build configuration list for PBXNativeTarget "Github" */; 253 | buildPhases = ( 254 | 6BFEB0BF193EBEDE00612B8B /* Sources */, 255 | 6BFEB0C0193EBEDE00612B8B /* Frameworks */, 256 | 6BFEB0C1193EBEDE00612B8B /* Resources */, 257 | ); 258 | buildRules = ( 259 | ); 260 | dependencies = ( 261 | 6B3E7A1F19D8DEB5006071F7 /* PBXTargetDependency */, 262 | 6BFD905219C92A1600DD99B6 /* PBXTargetDependency */, 263 | ); 264 | name = Github; 265 | productName = Github; 266 | productReference = 6BFEB0C3193EBEDE00612B8B /* Github.app */; 267 | productType = "com.apple.product-type.application"; 268 | }; 269 | 6BFEB0CF193EBEDE00612B8B /* GithubTests */ = { 270 | isa = PBXNativeTarget; 271 | buildConfigurationList = 6BFEB0DD193EBEDE00612B8B /* Build configuration list for PBXNativeTarget "GithubTests" */; 272 | buildPhases = ( 273 | 6BFEB0CC193EBEDE00612B8B /* Sources */, 274 | 6BFEB0CD193EBEDE00612B8B /* Frameworks */, 275 | 6BFEB0CE193EBEDE00612B8B /* Resources */, 276 | ); 277 | buildRules = ( 278 | ); 279 | dependencies = ( 280 | 6BFEB0D2193EBEDE00612B8B /* PBXTargetDependency */, 281 | ); 282 | name = GithubTests; 283 | productName = GithubTests; 284 | productReference = 6BFEB0D0193EBEDE00612B8B /* GithubTests.xctest */; 285 | productType = "com.apple.product-type.bundle.unit-test"; 286 | }; 287 | /* End PBXNativeTarget section */ 288 | 289 | /* Begin PBXProject section */ 290 | 6BFEB0BB193EBEDE00612B8B /* Project object */ = { 291 | isa = PBXProject; 292 | attributes = { 293 | LastSwiftUpdateCheck = 0720; 294 | LastUpgradeCheck = 0600; 295 | ORGANIZATIONNAME = Vluxe; 296 | TargetAttributes = { 297 | 6BFEB0C2193EBEDE00612B8B = { 298 | CreatedOnToolsVersion = 6.0; 299 | }; 300 | 6BFEB0CF193EBEDE00612B8B = { 301 | CreatedOnToolsVersion = 6.0; 302 | TestTargetID = 6BFEB0C2193EBEDE00612B8B; 303 | }; 304 | }; 305 | }; 306 | buildConfigurationList = 6BFEB0BE193EBEDE00612B8B /* Build configuration list for PBXProject "Github" */; 307 | compatibilityVersion = "Xcode 3.2"; 308 | developmentRegion = English; 309 | hasScannedForEncodings = 0; 310 | knownRegions = ( 311 | en, 312 | ); 313 | mainGroup = 6BFEB0BA193EBEDE00612B8B; 314 | productRefGroup = 6BFEB0C4193EBEDE00612B8B /* Products */; 315 | projectDirPath = ""; 316 | projectReferences = ( 317 | { 318 | ProductGroup = 6B3E7A1519D8DE9F006071F7 /* Products */; 319 | ProjectRef = 6B3E7A1419D8DE9F006071F7 /* JSONJoy.xcodeproj */; 320 | }, 321 | { 322 | ProductGroup = 6BFD904719C9299B00DD99B6 /* Products */; 323 | ProjectRef = 6BFD904619C9299B00DD99B6 /* SwiftHTTP.xcodeproj */; 324 | }, 325 | ); 326 | projectRoot = ""; 327 | targets = ( 328 | 6BFEB0C2193EBEDE00612B8B /* Github */, 329 | 6BFEB0CF193EBEDE00612B8B /* GithubTests */, 330 | ); 331 | }; 332 | /* End PBXProject section */ 333 | 334 | /* Begin PBXReferenceProxy section */ 335 | 6B3E7A1A19D8DE9F006071F7 /* JSONJoy.framework */ = { 336 | isa = PBXReferenceProxy; 337 | fileType = wrapper.framework; 338 | path = JSONJoy.framework; 339 | remoteRef = 6B3E7A1919D8DE9F006071F7 /* PBXContainerItemProxy */; 340 | sourceTree = BUILT_PRODUCTS_DIR; 341 | }; 342 | 6B3E7A1C19D8DE9F006071F7 /* JSONJoyTests.xctest */ = { 343 | isa = PBXReferenceProxy; 344 | fileType = wrapper.cfbundle; 345 | path = JSONJoyTests.xctest; 346 | remoteRef = 6B3E7A1B19D8DE9F006071F7 /* PBXContainerItemProxy */; 347 | sourceTree = BUILT_PRODUCTS_DIR; 348 | }; 349 | 6BFD904C19C9299B00DD99B6 /* SwiftHTTP.framework */ = { 350 | isa = PBXReferenceProxy; 351 | fileType = wrapper.framework; 352 | path = SwiftHTTP.framework; 353 | remoteRef = 6BFD904B19C9299B00DD99B6 /* PBXContainerItemProxy */; 354 | sourceTree = BUILT_PRODUCTS_DIR; 355 | }; 356 | 6BFD904E19C9299B00DD99B6 /* SwiftHTTPTests.xctest */ = { 357 | isa = PBXReferenceProxy; 358 | fileType = wrapper.cfbundle; 359 | path = SwiftHTTPTests.xctest; 360 | remoteRef = 6BFD904D19C9299B00DD99B6 /* PBXContainerItemProxy */; 361 | sourceTree = BUILT_PRODUCTS_DIR; 362 | }; 363 | D9CE58731B1D202D00D9DAF3 /* JSONJoy.framework */ = { 364 | isa = PBXReferenceProxy; 365 | fileType = wrapper.framework; 366 | path = JSONJoy.framework; 367 | remoteRef = D9CE58721B1D202D00D9DAF3 /* PBXContainerItemProxy */; 368 | sourceTree = BUILT_PRODUCTS_DIR; 369 | }; 370 | D9CE58751B1D202D00D9DAF3 /* JSONJoyOSXTests.xctest */ = { 371 | isa = PBXReferenceProxy; 372 | fileType = wrapper.cfbundle; 373 | path = JSONJoyOSXTests.xctest; 374 | remoteRef = D9CE58741B1D202D00D9DAF3 /* PBXContainerItemProxy */; 375 | sourceTree = BUILT_PRODUCTS_DIR; 376 | }; 377 | D9CE587A1B1D202D00D9DAF3 /* SwiftHTTP.framework */ = { 378 | isa = PBXReferenceProxy; 379 | fileType = wrapper.framework; 380 | path = SwiftHTTP.framework; 381 | remoteRef = D9CE58791B1D202D00D9DAF3 /* PBXContainerItemProxy */; 382 | sourceTree = BUILT_PRODUCTS_DIR; 383 | }; 384 | D9CE587C1B1D202D00D9DAF3 /* SwiftHTTPOSXTests.xctest */ = { 385 | isa = PBXReferenceProxy; 386 | fileType = wrapper.cfbundle; 387 | path = SwiftHTTPOSXTests.xctest; 388 | remoteRef = D9CE587B1B1D202D00D9DAF3 /* PBXContainerItemProxy */; 389 | sourceTree = BUILT_PRODUCTS_DIR; 390 | }; 391 | /* End PBXReferenceProxy section */ 392 | 393 | /* Begin PBXResourcesBuildPhase section */ 394 | 6BFEB0C1193EBEDE00612B8B /* Resources */ = { 395 | isa = PBXResourcesBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | 6BFEB0CB193EBEDE00612B8B /* Images.xcassets in Resources */, 399 | 6BFEB0E1193EBF4300612B8B /* Storyboard.storyboard in Resources */, 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | }; 403 | 6BFEB0CE193EBEDE00612B8B /* Resources */ = { 404 | isa = PBXResourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | ); 408 | runOnlyForDeploymentPostprocessing = 0; 409 | }; 410 | /* End PBXResourcesBuildPhase section */ 411 | 412 | /* Begin PBXSourcesBuildPhase section */ 413 | 6BFEB0BF193EBEDE00612B8B /* Sources */ = { 414 | isa = PBXSourcesBuildPhase; 415 | buildActionMask = 2147483647; 416 | files = ( 417 | 6B3E7A2419D8ECB2006071F7 /* ReposViewController.swift in Sources */, 418 | 6BEE5F11193ECB1200E52C59 /* Login.swift in Sources */, 419 | 6B3E7A2619D8EEE2006071F7 /* Constant.swift in Sources */, 420 | 6B3E7A2819D91CD9006071F7 /* Repos.swift in Sources */, 421 | 6BFEB0E3193EC12200612B8B /* LoginViewController.swift in Sources */, 422 | D9CE587E1B1D20A100D9DAF3 /* LoginAnimator.swift in Sources */, 423 | 6BFEB0C9193EBEDE00612B8B /* AppDelegate.swift in Sources */, 424 | ); 425 | runOnlyForDeploymentPostprocessing = 0; 426 | }; 427 | 6BFEB0CC193EBEDE00612B8B /* Sources */ = { 428 | isa = PBXSourcesBuildPhase; 429 | buildActionMask = 2147483647; 430 | files = ( 431 | 6BFEB0D7193EBEDE00612B8B /* GithubTests.swift in Sources */, 432 | ); 433 | runOnlyForDeploymentPostprocessing = 0; 434 | }; 435 | /* End PBXSourcesBuildPhase section */ 436 | 437 | /* Begin PBXTargetDependency section */ 438 | 6B3E7A1F19D8DEB5006071F7 /* PBXTargetDependency */ = { 439 | isa = PBXTargetDependency; 440 | name = JSONJoy; 441 | targetProxy = 6B3E7A1E19D8DEB5006071F7 /* PBXContainerItemProxy */; 442 | }; 443 | 6BFD905219C92A1600DD99B6 /* PBXTargetDependency */ = { 444 | isa = PBXTargetDependency; 445 | name = SwiftHTTP; 446 | targetProxy = 6BFD905119C92A1600DD99B6 /* PBXContainerItemProxy */; 447 | }; 448 | 6BFEB0D2193EBEDE00612B8B /* PBXTargetDependency */ = { 449 | isa = PBXTargetDependency; 450 | target = 6BFEB0C2193EBEDE00612B8B /* Github */; 451 | targetProxy = 6BFEB0D1193EBEDE00612B8B /* PBXContainerItemProxy */; 452 | }; 453 | /* End PBXTargetDependency section */ 454 | 455 | /* Begin XCBuildConfiguration section */ 456 | 6BFEB0D8193EBEDE00612B8B /* Debug */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | ALWAYS_SEARCH_USER_PATHS = NO; 460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 461 | CLANG_CXX_LIBRARY = "libc++"; 462 | CLANG_ENABLE_MODULES = YES; 463 | CLANG_ENABLE_OBJC_ARC = YES; 464 | CLANG_WARN_BOOL_CONVERSION = YES; 465 | CLANG_WARN_CONSTANT_CONVERSION = YES; 466 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 467 | CLANG_WARN_EMPTY_BODY = YES; 468 | CLANG_WARN_ENUM_CONVERSION = YES; 469 | CLANG_WARN_INT_CONVERSION = YES; 470 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 471 | CLANG_WARN_UNREACHABLE_CODE = YES; 472 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 473 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 474 | COPY_PHASE_STRIP = NO; 475 | ENABLE_STRICT_OBJC_MSGSEND = YES; 476 | GCC_C_LANGUAGE_STANDARD = gnu99; 477 | GCC_DYNAMIC_NO_PIC = NO; 478 | GCC_OPTIMIZATION_LEVEL = 0; 479 | GCC_PREPROCESSOR_DEFINITIONS = ( 480 | "DEBUG=1", 481 | "$(inherited)", 482 | ); 483 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 484 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 485 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 486 | GCC_WARN_UNDECLARED_SELECTOR = YES; 487 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 488 | GCC_WARN_UNUSED_FUNCTION = YES; 489 | GCC_WARN_UNUSED_VARIABLE = YES; 490 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 491 | METAL_ENABLE_DEBUG_INFO = YES; 492 | ONLY_ACTIVE_ARCH = YES; 493 | SDKROOT = iphoneos; 494 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 495 | TARGETED_DEVICE_FAMILY = "1,2"; 496 | }; 497 | name = Debug; 498 | }; 499 | 6BFEB0D9193EBEDE00612B8B /* Release */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | ALWAYS_SEARCH_USER_PATHS = NO; 503 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 504 | CLANG_CXX_LIBRARY = "libc++"; 505 | CLANG_ENABLE_MODULES = YES; 506 | CLANG_ENABLE_OBJC_ARC = YES; 507 | CLANG_WARN_BOOL_CONVERSION = YES; 508 | CLANG_WARN_CONSTANT_CONVERSION = YES; 509 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 510 | CLANG_WARN_EMPTY_BODY = YES; 511 | CLANG_WARN_ENUM_CONVERSION = YES; 512 | CLANG_WARN_INT_CONVERSION = YES; 513 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 514 | CLANG_WARN_UNREACHABLE_CODE = YES; 515 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 516 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 517 | COPY_PHASE_STRIP = YES; 518 | ENABLE_NS_ASSERTIONS = NO; 519 | ENABLE_STRICT_OBJC_MSGSEND = YES; 520 | GCC_C_LANGUAGE_STANDARD = gnu99; 521 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 522 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 523 | GCC_WARN_UNDECLARED_SELECTOR = YES; 524 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 525 | GCC_WARN_UNUSED_FUNCTION = YES; 526 | GCC_WARN_UNUSED_VARIABLE = YES; 527 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 528 | METAL_ENABLE_DEBUG_INFO = NO; 529 | SDKROOT = iphoneos; 530 | TARGETED_DEVICE_FAMILY = "1,2"; 531 | VALIDATE_PRODUCT = YES; 532 | }; 533 | name = Release; 534 | }; 535 | 6BFEB0DB193EBEDE00612B8B /* Debug */ = { 536 | isa = XCBuildConfiguration; 537 | buildSettings = { 538 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 539 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 540 | INFOPLIST_FILE = Github/Info.plist; 541 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | }; 544 | name = Debug; 545 | }; 546 | 6BFEB0DC193EBEDE00612B8B /* Release */ = { 547 | isa = XCBuildConfiguration; 548 | buildSettings = { 549 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 550 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 551 | INFOPLIST_FILE = Github/Info.plist; 552 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 553 | PRODUCT_NAME = "$(TARGET_NAME)"; 554 | }; 555 | name = Release; 556 | }; 557 | 6BFEB0DE193EBEDE00612B8B /* Debug */ = { 558 | isa = XCBuildConfiguration; 559 | buildSettings = { 560 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Github.app/Github"; 561 | FRAMEWORK_SEARCH_PATHS = ( 562 | "$(SDKROOT)/Developer/Library/Frameworks", 563 | "$(inherited)", 564 | ); 565 | GCC_PREPROCESSOR_DEFINITIONS = ( 566 | "DEBUG=1", 567 | "$(inherited)", 568 | ); 569 | INFOPLIST_FILE = GithubTests/Info.plist; 570 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 571 | METAL_ENABLE_DEBUG_INFO = YES; 572 | PRODUCT_NAME = "$(TARGET_NAME)"; 573 | TEST_HOST = "$(BUNDLE_LOADER)"; 574 | }; 575 | name = Debug; 576 | }; 577 | 6BFEB0DF193EBEDE00612B8B /* Release */ = { 578 | isa = XCBuildConfiguration; 579 | buildSettings = { 580 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Github.app/Github"; 581 | FRAMEWORK_SEARCH_PATHS = ( 582 | "$(SDKROOT)/Developer/Library/Frameworks", 583 | "$(inherited)", 584 | ); 585 | INFOPLIST_FILE = GithubTests/Info.plist; 586 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 587 | METAL_ENABLE_DEBUG_INFO = NO; 588 | PRODUCT_NAME = "$(TARGET_NAME)"; 589 | TEST_HOST = "$(BUNDLE_LOADER)"; 590 | }; 591 | name = Release; 592 | }; 593 | /* End XCBuildConfiguration section */ 594 | 595 | /* Begin XCConfigurationList section */ 596 | 6BFEB0BE193EBEDE00612B8B /* Build configuration list for PBXProject "Github" */ = { 597 | isa = XCConfigurationList; 598 | buildConfigurations = ( 599 | 6BFEB0D8193EBEDE00612B8B /* Debug */, 600 | 6BFEB0D9193EBEDE00612B8B /* Release */, 601 | ); 602 | defaultConfigurationIsVisible = 0; 603 | defaultConfigurationName = Release; 604 | }; 605 | 6BFEB0DA193EBEDE00612B8B /* Build configuration list for PBXNativeTarget "Github" */ = { 606 | isa = XCConfigurationList; 607 | buildConfigurations = ( 608 | 6BFEB0DB193EBEDE00612B8B /* Debug */, 609 | 6BFEB0DC193EBEDE00612B8B /* Release */, 610 | ); 611 | defaultConfigurationIsVisible = 0; 612 | defaultConfigurationName = Release; 613 | }; 614 | 6BFEB0DD193EBEDE00612B8B /* Build configuration list for PBXNativeTarget "GithubTests" */ = { 615 | isa = XCConfigurationList; 616 | buildConfigurations = ( 617 | 6BFEB0DE193EBEDE00612B8B /* Debug */, 618 | 6BFEB0DF193EBEDE00612B8B /* Release */, 619 | ); 620 | defaultConfigurationIsVisible = 0; 621 | defaultConfigurationName = Release; 622 | }; 623 | /* End XCConfigurationList section */ 624 | }; 625 | rootObject = 6BFEB0BB193EBEDE00612B8B /* Project object */; 626 | } 627 | -------------------------------------------------------------------------------- /Github.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Github/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Github 4 | // 5 | // Created by Austin Cherry on 6/3/14. 6 | // Copyright (c) 2014 Vluxe. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool { 18 | if Constant.sharedManager.token != nil { 19 | let storyboard = UIStoryboard(name: "Storyboard", bundle:nil) 20 | let viewController: AnyObject! = storyboard.instantiateViewControllerWithIdentifier("tabBarVC") 21 | 22 | window!.rootViewController = (viewController as! UITabBarController) 23 | window!.makeKeyAndVisible() 24 | } 25 | return true 26 | } 27 | 28 | func applicationWillResignActive(application: UIApplication) { 29 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 30 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 31 | } 32 | 33 | func applicationDidEnterBackground(application: UIApplication) { 34 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 36 | } 37 | 38 | func applicationWillEnterForeground(application: UIApplication) { 39 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 40 | } 41 | 42 | func applicationDidBecomeActive(application: UIApplication) { 43 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 44 | } 45 | 46 | func applicationWillTerminate(application: UIApplication) { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /Github/Constant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Constant.swift 3 | // Github 4 | // 5 | // Created by Austin Cherry on 9/28/14. 6 | // Copyright (c) 2014 Vluxe. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class Constant { 12 | private var t: String? // internal storage of token property. 13 | var token: String? { 14 | get { 15 | if t == nil { 16 | let defaults = NSUserDefaults() 17 | t = defaults.objectForKey("token") as? String 18 | return t 19 | } 20 | return t 21 | } 22 | set { 23 | let defaults = NSUserDefaults() 24 | defaults.setObject(newValue, forKey: "token") 25 | defaults.synchronize() 26 | t = newValue 27 | } 28 | } 29 | 30 | class var sharedManager : Constant { 31 | 32 | struct Static { 33 | static let instance : Constant = Constant() 34 | } 35 | return Static.instance 36 | } 37 | } -------------------------------------------------------------------------------- /Github/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "29x29", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "40x40", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "76x76", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Github/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /Github/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.vluxe.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Storyboard 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Github/Login/Login.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Login.swift 3 | // Github 4 | // 5 | // Created by Austin Cherry on 6/3/14. 6 | // Copyright (c) 2014 Vluxe. All rights reserved. 7 | // 8 | 9 | import SwiftHTTP 10 | import JSONJoy 11 | 12 | struct App: JSONJoy { 13 | var url: String? 14 | var name: String? 15 | var clientId: String? 16 | 17 | init(_ decoder: JSONDecoder) { 18 | url = decoder["url"].string 19 | name = decoder["name"].string 20 | clientId = decoder["client_id"].string 21 | } 22 | } 23 | 24 | struct Authorization: JSONJoy { 25 | var id: Int? 26 | var url: String? 27 | //var scopes: Array? 28 | var app: App? 29 | var token: String? 30 | var note: String? 31 | var noteUrl: String? 32 | //var updatedAt: String? 33 | //var createdAt: String? 34 | 35 | init(_ decoder: JSONDecoder) { 36 | id = decoder["id"].integer 37 | url = decoder["url"].string 38 | //decoder["scopes"].array(&scopes) 39 | app = App(decoder["app"]) 40 | token = decoder["token"].string 41 | note = decoder["note"].string 42 | noteUrl = decoder["note_url"].string 43 | //updatedAt = decoder["updated_at"].string 44 | //createdAt = decoder["created_at"].string 45 | } 46 | } 47 | 48 | struct Login { 49 | let clientId = "80b1798b0b410dd723ee" 50 | let clientSecret = "58b7abd90008cb39626802d4bb9444c53d9d79ad" 51 | var basicAuth = "" 52 | 53 | init(username: String, password: String) { 54 | let optData = "\(username):\(password)".dataUsingEncoding(NSUTF8StringEncoding) 55 | if let data = optData { 56 | basicAuth = data.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength) 57 | } 58 | } 59 | 60 | func auth(completionHandler: (Bool -> Void)) -> Void { 61 | 62 | let params = ["scopes":"repo", "note": "dev", "client_id": clientId, "client_secret": clientSecret] 63 | 64 | do { 65 | let opt = try HTTP.POST("https://api.github.com/authorizations", parameters: params, headers: ["Authorization": "Basic \(basicAuth)"] ,requestSerializer: JSONParameterSerializer()) 66 | opt.start { response in 67 | if let error = response.error { 68 | print("got an error: \(error)") 69 | dispatch_async(dispatch_get_main_queue(),{ 70 | completionHandler(false) 71 | }) 72 | 73 | return //also notify app of failure as needed 74 | } 75 | let auth = Authorization(JSONDecoder(response.data)) 76 | if let token = auth.token { 77 | print("token: \(token)") 78 | let defaults = NSUserDefaults() 79 | defaults.setObject(token, forKey: "token") 80 | defaults.synchronize() 81 | dispatch_async(dispatch_get_main_queue(),{ 82 | completionHandler(true) 83 | }) 84 | } else { 85 | dispatch_async(dispatch_get_main_queue(),{ 86 | completionHandler(false) 87 | }) 88 | } 89 | 90 | } 91 | } catch let error { 92 | dispatch_async(dispatch_get_main_queue(),{ 93 | completionHandler(false) 94 | }) 95 | print("got an error creating the request: \(error)") 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /Github/Login/LoginViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewController.swift 3 | // Github 4 | // 5 | // Created by Austin Cherry on 6/3/14. 6 | // Copyright (c) 2014 Vluxe. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LoginViewController : UIViewController, UITextFieldDelegate { 12 | @IBOutlet var usernameField : UITextField! 13 | @IBOutlet var passwordField : UITextField! 14 | let animator = LoginAnimator() 15 | 16 | required init?(coder aDecoder: NSCoder) { 17 | super.init(coder: aDecoder) 18 | } 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | passwordField.delegate = self 23 | } 24 | 25 | @IBAction func selectSignIn(sender : AnyObject) { 26 | login() 27 | } 28 | 29 | func textFieldShouldReturn(textField: UITextField) -> Bool { 30 | login() 31 | return true 32 | } 33 | 34 | func login() { 35 | let login = Login(username: usernameField.text!, password: passwordField.text!) 36 | login.auth({ (status: Bool) in 37 | if status { 38 | self.performSegueWithIdentifier("shuffleSlide", sender: self) 39 | } else { 40 | let alert = UIAlertView(title: "Failed to Login.", message: "Invalid Username or Password", delegate: self, cancelButtonTitle: "OK") 41 | alert.show() 42 | } 43 | 44 | }) 45 | } 46 | 47 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { 48 | super.prepareForSegue(segue, sender: sender) 49 | //let repoVC = segue.destinationViewController 50 | //repoVC.transitioningDelegate = animator 51 | //repoVC.modalPresentationStyle = .Custom 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Github/LoginAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoginAnimator.swift 3 | // Github 4 | // 5 | // Created by Austin Cherry on 6/1/15. 6 | // Copyright (c) 2015 Vluxe. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LoginAnimator: NSObject, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate { 12 | func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval { 13 | return 2.5 14 | } 15 | 16 | func animateTransition(transitionContext: UIViewControllerContextTransitioning) { 17 | let container = transitionContext.containerView() 18 | let fromViewController = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)! 19 | //let toViewController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)! 20 | let fromView = fromViewController.view //transitionContext.viewForKey(UITransitionContextFromViewKey)! 21 | let toView = transitionContext.viewForKey(UITransitionContextToViewKey)! 22 | let animationDuration = self.transitionDuration(transitionContext) / 5 23 | 24 | let point = CGPointMake(fromView.frame.origin.x, fromView.frame.origin.y) 25 | fromView.layer.anchorPoint = CGPointMake(0, 0) 26 | fromView.center = point 27 | let rotationTransform = CGAffineTransformIdentity 28 | 29 | container!.addSubview(toView) 30 | container!.addSubview(fromView) 31 | 32 | UIView.animateWithDuration(animationDuration, animations: { () -> Void in 33 | fromView.transform = CGAffineTransformRotate(rotationTransform, self.degreesToRadians(80)) 34 | }, completion: { (f: Bool) -> Void in 35 | UIView.animateWithDuration(animationDuration, animations: { () -> Void in 36 | fromView.transform = CGAffineTransformRotate(rotationTransform, self.degreesToRadians(70)) 37 | }, completion: { (f: Bool) -> Void in 38 | UIView.animateWithDuration(animationDuration, animations: { () -> Void in 39 | fromView.transform = CGAffineTransformRotate(rotationTransform, self.degreesToRadians(80)) 40 | }, completion: { (f: Bool) -> Void in 41 | UIView.animateWithDuration(animationDuration, animations: { () -> Void in 42 | fromView.transform = CGAffineTransformRotate(rotationTransform, self.degreesToRadians(70)) 43 | }, completion: { (f: Bool) -> Void in 44 | UIView.animateWithDuration(animationDuration, animations: { () -> Void in 45 | var frame = fromView.frame 46 | frame.origin.y = fromView.window!.frame.size.height 47 | fromView.frame = frame 48 | }, completion: { (f: Bool) -> Void in 49 | fromView.transform = CGAffineTransformRotate(rotationTransform, self.degreesToRadians(0)) 50 | transitionContext.completeTransition(true) 51 | }) 52 | }) 53 | }) 54 | }) 55 | }) 56 | 57 | } 58 | 59 | func degreesToRadians(degrees: CGFloat) -> CGFloat { 60 | return (degrees * CGFloat(M_PI) / 180) 61 | } 62 | 63 | func animationControllerForDismissedController(dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { 64 | return self 65 | } 66 | 67 | func animationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController) -> UIViewControllerAnimatedTransitioning? { 68 | return self 69 | } 70 | } -------------------------------------------------------------------------------- /Github/Repos/Repos.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Repos.swift 3 | // Github 4 | // 5 | // Created by Austin Cherry on 9/28/14. 6 | // Copyright (c) 2014 Vluxe. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | -------------------------------------------------------------------------------- /Github/Repos/ReposViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReposViewController.swift 3 | // Github 4 | // 5 | // Created by Austin Cherry on 9/28/14. 6 | // Copyright (c) 2014 Vluxe. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ReposViewController: UITableViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Uncomment the following line to preserve selection between presentations 17 | // self.clearsSelectionOnViewWillAppear = false 18 | } 19 | 20 | override func numberOfSectionsInTableView(tableView: UITableView) -> Int { 21 | return 1 22 | } 23 | 24 | override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 25 | return 0 26 | } 27 | 28 | /* 29 | override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! { 30 | let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath) as UITableViewCell 31 | 32 | // Configure the cell... 33 | 34 | return cell 35 | } 36 | */ 37 | 38 | // // In a storyboard-based application, you will often want to do a little preparation before navigation 39 | // override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) { 40 | // // Get the new view controller using [segue destinationViewController]. 41 | // // Pass the selected object to the new view controller. 42 | // } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Github/Storyboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /GithubTests/GithubTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GithubTests.swift 3 | // GithubTests 4 | // 5 | // Created by Austin Cherry on 6/3/14. 6 | // Copyright (c) 2014 Vluxe. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class GithubTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /GithubTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.vluxe.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) {{{year}}} {{{fullname}}} 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 | Github-Swift 2 | ============ 3 | 4 | iOS app written in Swift using the Github API 5 | --------------------------------------------------------------------------------