Skip to content

Commit 93d2924

Browse files
committed
Projeto base para Dev Sprint Renato Sarro #3
1 parent e03b8af commit 93d2924

34 files changed

+2098
-1
lines changed

LICENSE

+674
Large diffs are not rendered by default.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Onboarding Challenge
1+
# GitHub App Challenge 🐙
22

33
In this challenge, we are going to integrate with the GitHub API to show a user's repository list, with navigation to a repository's details. During the Dev Sprint, we also follow good practices of both Git flow and Agile development.
44

solutions/devsprint-renato-sarro-3/GitHubApp.xcodeproj/project.pbxproj

+731
Large diffs are not rendered by default.

solutions/devsprint-renato-sarro-3/GitHubApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// AppDelegate.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 29/09/21.
6+
//
7+
8+
import UIKit
9+
10+
@main
11+
class AppDelegate: UIResponder, UIApplicationDelegate {
12+
13+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14+
15+
return true
16+
}
17+
18+
// MARK: UISceneSession Lifecycle
19+
20+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
21+
22+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
23+
}
24+
}
25+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// SceneDelegate.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 29/09/21.
6+
//
7+
8+
import UIKit
9+
10+
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11+
12+
var window: UIWindow?
13+
14+
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
15+
16+
guard let windowScene = (scene as? UIWindowScene) else { return }
17+
18+
self.window = UIWindow(frame: UIScreen.main.bounds)
19+
self.window?.rootViewController = UINavigationController(rootViewController: ListViewController())
20+
self.window?.windowScene = windowScene
21+
self.window?.makeKeyAndVisible()
22+
}
23+
}
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// DebugViewController.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 07/01/22.
6+
//
7+
8+
import UIKit
9+
10+
/**
11+
12+
Use this ViewController to debug your View components.
13+
14+
1) Change `myView` type to your UIView subclass
15+
2) Set `myViewHeight` according to your View
16+
3) Set an instance of DebugViewController as window's rootViewController in `SceneDelegate.swift` file
17+
18+
*/
19+
20+
class DebugViewController: UIViewController {
21+
22+
private let myView: UIView = {
23+
24+
let view = UIView()
25+
view.translatesAutoresizingMaskIntoConstraints = false
26+
return view
27+
}()
28+
29+
private let myViewHeight: CGFloat = 100
30+
31+
init() {
32+
super.init(nibName: nil, bundle: nil)
33+
34+
view.backgroundColor = .white
35+
36+
view.addSubview(myView)
37+
38+
NSLayoutConstraint.activate([
39+
40+
myView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),
41+
myView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),
42+
myView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
43+
myView.heightAnchor.constraint(equalToConstant: myViewHeight),
44+
45+
])
46+
}
47+
48+
required init?(coder: NSCoder) {
49+
fatalError("init(coder:) has not been implemented")
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// String+Extensions.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 06/10/21.
6+
//
7+
8+
import Foundation
9+
10+
extension String {
11+
12+
static func repositoryInfo(repositoriesCount: Int, bifurcationsCount: Int) -> String {
13+
14+
return "\(repositoriesCount) stars \(bifurcationsCount) bifurcations"
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// UIColor+Extensions.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 06/10/21.
6+
//
7+
8+
import UIKit
9+
10+
extension UIColor {
11+
12+
convenience init(red: Int, green: Int, blue: Int) {
13+
14+
self.init(red: CGFloat(red)/255.0,
15+
green: CGFloat(green)/255.0,
16+
blue: CGFloat(blue)/255.0,
17+
alpha: 1)
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// UITableViewCell+Extensions.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 06/10/21.
6+
//
7+
8+
import UIKit
9+
10+
extension UITableViewCell {
11+
12+
class func classIdentifier() -> String {
13+
guard let className = String(describing: self).components(separatedBy: ".").last else {
14+
return ""
15+
}
16+
17+
return className
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// UIViewController+Extensions.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 06/10/21.
6+
//
7+
8+
import UIKit
9+
10+
extension UIViewController {
11+
12+
func insideNavigationController() -> UINavigationController {
13+
14+
let navigationController = UINavigationController(rootViewController: self)
15+
navigationController.modalPresentationStyle = .formSheet
16+
17+
return navigationController
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// Repository.swift
3+
// GitHubApp
4+
//
5+
// Created by Rodrigo Borges on 14/01/22.
6+
//
7+
8+
import Foundation
9+
10+
struct Repository {
11+
let name: String
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"scale" : "2x",
6+
"size" : "20x20"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"scale" : "3x",
11+
"size" : "20x20"
12+
},
13+
{
14+
"filename" : "devpass-logo-blue copy 5.png",
15+
"idiom" : "iphone",
16+
"scale" : "2x",
17+
"size" : "29x29"
18+
},
19+
{
20+
"filename" : "devpass-logo-blue copy 4.png",
21+
"idiom" : "iphone",
22+
"scale" : "3x",
23+
"size" : "29x29"
24+
},
25+
{
26+
"filename" : "devpass-logo-blue copy 3.png",
27+
"idiom" : "iphone",
28+
"scale" : "2x",
29+
"size" : "40x40"
30+
},
31+
{
32+
"filename" : "devpass-logo-blue copy 2-1.png",
33+
"idiom" : "iphone",
34+
"scale" : "3x",
35+
"size" : "40x40"
36+
},
37+
{
38+
"filename" : "devpass-logo-blue copy 2.png",
39+
"idiom" : "iphone",
40+
"scale" : "2x",
41+
"size" : "60x60"
42+
},
43+
{
44+
"filename" : "devpass-logo-blue copy.png",
45+
"idiom" : "iphone",
46+
"scale" : "3x",
47+
"size" : "60x60"
48+
},
49+
{
50+
"idiom" : "ipad",
51+
"scale" : "1x",
52+
"size" : "20x20"
53+
},
54+
{
55+
"idiom" : "ipad",
56+
"scale" : "2x",
57+
"size" : "20x20"
58+
},
59+
{
60+
"idiom" : "ipad",
61+
"scale" : "1x",
62+
"size" : "29x29"
63+
},
64+
{
65+
"idiom" : "ipad",
66+
"scale" : "2x",
67+
"size" : "29x29"
68+
},
69+
{
70+
"idiom" : "ipad",
71+
"scale" : "1x",
72+
"size" : "40x40"
73+
},
74+
{
75+
"idiom" : "ipad",
76+
"scale" : "2x",
77+
"size" : "40x40"
78+
},
79+
{
80+
"idiom" : "ipad",
81+
"scale" : "1x",
82+
"size" : "76x76"
83+
},
84+
{
85+
"idiom" : "ipad",
86+
"scale" : "2x",
87+
"size" : "76x76"
88+
},
89+
{
90+
"idiom" : "ipad",
91+
"scale" : "2x",
92+
"size" : "83.5x83.5"
93+
},
94+
{
95+
"idiom" : "ios-marketing",
96+
"scale" : "1x",
97+
"size" : "1024x1024"
98+
}
99+
],
100+
"info" : {
101+
"author" : "xcode",
102+
"version" : 1
103+
}
104+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--View Controller-->
10+
<scene sceneID="EHf-IW-A2E">
11+
<objects>
12+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
13+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16+
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
17+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18+
</view>
19+
</viewController>
20+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21+
</objects>
22+
<point key="canvasLocation" x="53" y="375"/>
23+
</scene>
24+
</scenes>
25+
</document>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>UIApplicationSceneManifest</key>
6+
<dict>
7+
<key>UIApplicationSupportsMultipleScenes</key>
8+
<false/>
9+
<key>UISceneConfigurations</key>
10+
<dict>
11+
<key>UIWindowSceneSessionRoleApplication</key>
12+
<array>
13+
<dict>
14+
<key>UISceneConfigurationName</key>
15+
<string>Default Configuration</string>
16+
<key>UISceneDelegateClassName</key>
17+
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
18+
</dict>
19+
</array>
20+
</dict>
21+
</dict>
22+
</dict>
23+
</plist>

0 commit comments

Comments
 (0)