Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stavros Tsikinas (iOS) :) #22

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d90acc7
add .gitignore to repo
Jul 25, 2022
8049ed4
setup structure
Jul 26, 2022
a2bf3cd
setup model and test json file
Jul 27, 2022
38d3274
add tests for json file validation
Jul 28, 2022
400963b
Init of Card with parameters (testing mainly)
Jul 28, 2022
dc50ddb
setup initial view model
Jul 28, 2022
73fcd42
add UIImageView extensions to download card images
Jul 28, 2022
ce3e62b
add tests for view model
Jul 28, 2022
8742e8d
add Splash Screen icon
Jul 28, 2022
75a0b15
create Splash Screen
Jul 28, 2022
b81f05d
main skeleton (no style added)
Jul 29, 2022
84b9652
set tab bar styling
Jul 29, 2022
5ff4406
setup grid item view (no view model added)
Jul 31, 2022
9365b40
attach vm to grid cell
Aug 3, 2022
b266121
decided to use extension of UIImageView instead of service!
Aug 3, 2022
0e91dca
unit test with placeholder image url
Aug 3, 2022
9466434
setup cardDataService
Aug 7, 2022
912e73e
inject service to views
Aug 8, 2022
159f853
write unit tests for cards data service
Aug 8, 2022
86ca2d4
fill all cards view
Aug 8, 2022
dcee3d8
Allow http requests (images hosted)
Aug 9, 2022
77a352e
setup watermark view for empty collections
Aug 10, 2022
ebebe48
add watermark view to view controller
Aug 10, 2022
14c39ac
Add UITests TODO for watermark
Aug 10, 2022
a5d304d
add bar button to view
Aug 10, 2022
dd60f76
add logic to button and write unit tests for service function
Aug 11, 2022
286c5bc
setup DB and attach service to views
Aug 13, 2022
f8ae82d
make transition to detail view
Aug 22, 2022
e0a8249
setup initial detail view for cards
Aug 23, 2022
e99d22b
write unit tests and add favourite button to detail view
Aug 23, 2022
2bf8da2
add card view model to view controller
Aug 23, 2022
f066165
polish cardview
Aug 23, 2022
9c25257
Merge branch 'master' of https://github.com/Stsikinas/HeartstoneAsses…
Aug 23, 2022
707f33e
manually resolve conflict with handleParsed function
Aug 23, 2022
7aa9deb
Persist isfavorite for detail view
Aug 23, 2022
26c3593
setup TestFavoritesService and write unit tests for saving favorites
Aug 24, 2022
68aea22
unit test existing functionality
Aug 24, 2022
335d6f1
code unit test for deletion and improve delete function from DBService
Aug 24, 2022
89595e8
remove unnecessary functionality in DBService
Aug 24, 2022
fbf6fff
code get favourites and write unit test
Aug 24, 2022
260fbf4
write unit test for getting multiple rows
Aug 24, 2022
dcf0429
enhance handleParsed to allow db queries and add db service to dataSe…
Aug 24, 2022
405773f
improve detail view to cleanup
Aug 25, 2022
522284c
add protocol to init/update fav button in collection view cards
Aug 26, 2022
5dcb582
write unit tests for UpdateFavoriteProtocol
Aug 26, 2022
f776eff
update data on tab changed
Aug 27, 2022
7978a04
add loading spinner on refresh data
Aug 28, 2022
8dd4d1b
create LoadingImage to cache images and improve experience
Aug 29, 2022
5364508
write ui tests from add/delete from detail view
Aug 29, 2022
ed860b7
write UI test for navigation
Aug 29, 2022
66289cf
write ui test for watermark view
Aug 29, 2022
7b15bcf
fix watermark on hsiaofavs and update ui on favourite button tap
Aug 29, 2022
bb8ee1a
add custom README
Aug 29, 2022
62a135f
add personal readme file
Aug 29, 2022
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
88 changes: 88 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Created by https://www.toptal.com/developers/gitignore/api/swift
# Edit at https://www.toptal.com/developers/gitignore?templates=swift

### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
# Pods/
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

# End of https://www.toptal.com/developers/gitignore/api/swift
896 changes: 896 additions & 0 deletions Hearthstone/Hearthstone.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions Hearthstone/Hearthstone/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// AppDelegate.swift
// Hearthstone
//
// Created by Stavros Tsikinas on 25/7/22.
//

import UIKit
import CoreData

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

// MARK: - Core Data Stuff

lazy var persistentContainer: NSPersistentContainer = {
let container = NSPersistentContainer(name: "Hearthstone")
container.loadPersistentStores { description, error in

if let error = error {
debugPrint("Unresolved error: \(error)")
}

}
container.viewContext.automaticallyMergesChangesFromParent = true
return container

}()

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Hearthstone/Hearthstone/Assets/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.161",
"green" : "0.113",
"red" : "0.131"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.251",
"green" : "0.251",
"red" : "0.251"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "Hearthstone-PNG-High-Quality-Image.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "PVPDR_SW_Passive_08.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
44 changes: 44 additions & 0 deletions Hearthstone/Hearthstone/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SplashScreen" translatesAutoresizingMaskIntoConstraints="NO" id="t7s-cH-kYU">
<rect key="frame" x="53.666666666666657" y="120.66666666666669" width="321" height="694.66666666666652"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="t7s-cH-kYU" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="XTq-Qs-9YJ"/>
<constraint firstItem="t7s-cH-kYU" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="ZS2-fE-dbV"/>
<constraint firstItem="t7s-cH-kYU" firstAttribute="height" secondItem="Ze5-6b-2t3" secondAttribute="height" multiplier="0.75" id="gSq-sU-s26"/>
<constraint firstItem="t7s-cH-kYU" firstAttribute="width" secondItem="Ze5-6b-2t3" secondAttribute="width" multiplier="0.75" id="xab-nd-FUW"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="SplashScreen" width="525" height="525"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
15 changes: 15 additions & 0 deletions Hearthstone/Hearthstone/FavoriteDB/Favorite+CoreDataClass.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Favorite+CoreDataClass.swift
// Hearthstone
//
// Created by Stavros Tsikinas on 12/8/22.
//
//

import Foundation
import CoreData


public class Favorite: NSManagedObject {

}
Loading