Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Github test.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 8N949X2SJZ;
DEVELOPMENT_TEAM = L967JD2LSG;
INFOPLIST_FILE = "Github test/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -429,7 +429,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 8N949X2SJZ;
DEVELOPMENT_TEAM = L967JD2LSG;
INFOPLIST_FILE = "Github test/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Github test/Networking/HTTPClient.swift"
timestampString = "563198559.964149"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "73"
endingLineNumber = "73"
landmarkName = "makeRequest(path:method:body:queryItems:headers:completionHandler:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Github test/Services/GithubAPIService.swift"
timestampString = "563198581.9955291"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "41"
endingLineNumber = "41"
landmarkName = "getUser(completionHandler:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Github test/Controllers/ProfileViewController.swift"
timestampString = "563198601.582305"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "64"
endingLineNumber = "64"
landmarkName = "loadUser()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
34 changes: 19 additions & 15 deletions Github test/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="XF9-vB-Pie">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="XF9-vB-Pie">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -100,11 +100,11 @@
<objects>
<viewController storyboardIdentifier="profile" id="0T2-eb-qxW" customClass="ProfileViewController" customModule="Github_test" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="b7Z-3l-znQ">
<rect key="frame" x="0.0" y="0.0" width="375" height="724"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tabBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G05-pD-L2s">
<rect key="frame" x="0.0" y="641" width="375" height="49"/>
<rect key="frame" x="0.0" y="729" width="375" height="49"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="49" id="SCX-4g-q8X"/>
Expand All @@ -119,8 +119,8 @@
<color key="tintColor" name="lightPurple"/>
<color key="selectedImageTintColor" name="lightPurple"/>
</tabBar>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="YRu-38-uuW">
<rect key="frame" x="0.0" y="0.0" width="375" height="641"/>
<tableView clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="YRu-38-uuW">
<rect key="frame" x="0.0" y="-4" width="375" height="641"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="header" rowHeight="240" id="UOO-Hu-mEH" customClass="HeaderView" customModule="Github_test" customModuleProvider="target">
Expand All @@ -131,12 +131,12 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="nickname" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R4d-Vw-fUl">
<rect key="frame" x="158.66666666666666" y="160.66666666666666" width="58" height="16"/>
<rect key="frame" x="158.33333333333334" y="160.66666666666666" width="58.333333333333343" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.65098039220000004" green="0.62745098040000002" blue="0.61960784310000006" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="bio" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y1l-wV-Aft">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="1" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y1l-wV-Aft">
<rect key="frame" x="15" y="192.66666666666666" width="345" height="28.333333333333343"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="darkPurple"/>
Expand All @@ -145,8 +145,8 @@
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="rAQ-bp-WTV">
<rect key="frame" x="177.66666666666666" y="51" width="20" height="20"/>
</activityIndicatorView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ATd-lK-bP0">
<rect key="frame" x="157" y="126.00000000000001" width="59" height="26.666666666666671"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NameNameNameNameNameNameNameNameNameNameName" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ATd-lK-bP0">
<rect key="frame" x="-137" y="126.00000000000001" width="647" height="26.666666666666671"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="22"/>
<color key="textColor" red="0.25312232971191406" green="0.10148253291845322" blue="0.4117889404296875" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -276,7 +276,7 @@
</prototypes>
</tableView>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MMy-Sr-oMF" userLabel="blurredView">
<rect key="frame" x="147.66666666666666" y="322" width="80" height="80"/>
<rect key="frame" x="147.66666666666666" y="366" width="80" height="80"/>
<subviews>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zfI-Gt-bxo">
<rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
Expand Down Expand Up @@ -355,11 +355,11 @@
<objects>
<viewController title="Edit Profile" id="u2F-dv-UT0" customClass="EditProfileViewController" customModule="Github_test" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="o0H-Ja-01F">
<rect key="frame" x="0.0" y="0.0" width="375" height="724"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" allowsSelection="NO" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="G6H-TQ-8gs">
<rect key="frame" x="0.0" y="0.0" width="375" height="690"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="778"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="header" rowHeight="118.99999999999997" id="tT6-WH-Tmg" customClass="HeaderView" customModule="Github_test" customModuleProvider="target">
Expand Down Expand Up @@ -491,7 +491,7 @@
</prototypes>
</tableView>
<view hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rdG-GJ-b6v">
<rect key="frame" x="147.66666666666666" y="322" width="80" height="80"/>
<rect key="frame" x="147.66666666666666" y="366" width="80" height="80"/>
<subviews>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G0D-F7-Wfx">
<rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
Expand Down Expand Up @@ -579,11 +579,12 @@
<nil name="viewControllers"/>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="iXA-fB-HdB"/>
<segue destination="0T2-eb-qxW" kind="show" id="IeW-1L-OmV"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="TP1-xz-6za" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="198" y="887"/>
<point key="canvasLocation" x="175" y="1058"/>
</scene>
</scenes>
<resources>
Expand All @@ -605,4 +606,7 @@
<color red="0.51372549019607838" green="0.12549019607843137" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
<inferredMetricsTieBreakers>
<segue reference="IeW-1L-OmV"/>
</inferredMetricsTieBreakers>
</document>
3 changes: 3 additions & 0 deletions Github test/Controllers/AuthenticationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class AuthenticationViewController: UIViewController {
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {


// MARK: - Remark. I'm not sure about 'fatalError'. Maybe there is can be better way than fatalError
guard let token = sender as? String,
let profileVC = segue.destination as? ProfileViewController else { fatalError() }
profileVC.token = token
Expand Down
3 changes: 3 additions & 0 deletions Github test/Controllers/ProfileViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class ProfileViewController: UIViewController {
startAnimatingIndicators()

githubAPIService.getUser { [weak self] user, error in

// error valueNotFound --> Issue #1

if let error = error as? HTTPClient.NetworkError {
if error == .badStatusCode {
(self?.navigationController as? NavigationController)?.showAuth()
Expand Down
3 changes: 3 additions & 0 deletions Github test/Networking/HTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class HTTPClient {
queryItems: [URLQueryItem]?,
headers: [String: String]?,
completionHandler: @escaping CompletionHandler) {



var urlComponnents = URLComponents(url: baseURL, resolvingAgainstBaseURL: false)
urlComponnents?.path = path
urlComponnents?.queryItems = queryItems
Expand Down
Binary file added Issues/1.mov
Binary file not shown.
Binary file added Issues/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Issues/3.MP4
Binary file not shown.
8 changes: 8 additions & 0 deletions Issues/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Issues
1. Autologin stuck in inifine loading. (1.mov)
2. Progress hud didn't prevent changing tabs. (1.mov)
3. App crashing when user select "edit" button while progress hud display (1.mov)
4. Broken UI on iPhone X (2.png)

NOTE: Issues 1 - 3 approved on real device(iPhone 6).
Please see 3.mp4