Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
41788c6
restructure project and add json sample files
Jan 28, 2023
faeb4e7
gitignore added
Jan 28, 2023
54641a6
Delete .DS_Store
farzaneh-Givehchian Jan 28, 2023
6464118
swiftlint added
Jan 28, 2023
89d2f8b
Merge branch 'master' of https://github.com/farzaneh-Givehchian/tech-…
Jan 28, 2023
711a806
network layer and models added
Jan 28, 2023
bde9ab1
network layer and models added
Jan 28, 2023
77468aa
mock service added
Jan 28, 2023
ebbf363
constant file added
Jan 28, 2023
b34944b
image model and extensions added
Jan 28, 2023
4ad0e58
image helper added
Jan 28, 2023
a9bf539
fixed lint of imageloader
Jan 28, 2023
76eca12
base protocol added
Jan 28, 2023
b0c976f
movie scene added
Jan 28, 2023
13947bb
movie detail added
Jan 28, 2023
8dbcc84
loadable json test added
Jan 28, 2023
b208d03
executer test added
Jan 28, 2023
44b1bb1
Test FailExecuter added
Jan 28, 2023
6eaff7e
viewcontroller test added
Jan 28, 2023
82e3247
add cache to network layer
Jan 28, 2023
147b13d
stringdict added for localization
Jan 28, 2023
aebabe7
timeout added to network layer
Jan 28, 2023
f889cdc
logger added to network layer
Jan 28, 2023
2a0f00d
favorite storage added
Jan 28, 2023
d104998
favorite storage model changed to list
Jan 28, 2023
7525556
favorite storage and its test added
Jan 29, 2023
bd5c26f
favorite scene added
Jan 29, 2023
c81f0b3
layout changed
Jan 29, 2023
0963b1b
colors added both for light and dark
Jan 29, 2023
c2f6a09
uiimage extension added
Jan 29, 2023
b6654b9
viewModel test added
Jan 29, 2023
06e5213
constant added
Jan 29, 2023
daaafc6
detail data fixed
Jan 29, 2023
d6f1c04
sync function added
Jan 29, 2023
ccc21bb
add header to list
Jan 29, 2023
a805839
add constant
Jan 29, 2023
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
90 changes: 90 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# 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/
39 changes: 39 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
disabled_rules: # rule identifiers to exclude from running

- trailing_whitespace
- function_parameter_count
- colon
- comma
- comment_spacing

excluded:
- Pods
- Package.swift



line_length:
warning: 300
error: 400

identifier_name:
min_length: 1
max_length: 50

type_name:
min_length: 2
max_length:
warning: 50

nesting:
type_level: 3

type_body_length:
warning: 300

force_try: warning
force_cast: warning

reporter: "xcode"


968 changes: 968 additions & 0 deletions DarsayTechTest.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EEB43AD729850E4000DF5CAD"
BuildableName = "DarsayTechTest.app"
BlueprintName = "DarsayTechTest"
ReferencedContainer = "container:DarsayTechTest.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EEB43AED29850E4100DF5CAD"
BuildableName = "DarsayTechTestTests.xctest"
BlueprintName = "DarsayTechTestTests"
ReferencedContainer = "container:DarsayTechTest.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EEB43AF729850E4100DF5CAD"
BuildableName = "DarsayTechTestUITests.xctest"
BlueprintName = "DarsayTechTestUITests"
ReferencedContainer = "container:DarsayTechTest.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EEB43AD729850E4000DF5CAD"
BuildableName = "DarsayTechTest.app"
BlueprintName = "DarsayTechTest"
ReferencedContainer = "container:DarsayTechTest.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EEB43AD729850E4000DF5CAD"
BuildableName = "DarsayTechTest.app"
BlueprintName = "DarsayTechTest"
ReferencedContainer = "container:DarsayTechTest.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DarsayTechTest.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>SnapKitPlayground (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>SnapKitPlayground (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>SnapKitPlayground (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>EEB43AD729850E4000DF5CAD</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>EEB43AED29850E4100DF5CAD</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>EEB43AF729850E4100DF5CAD</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
31 changes: 31 additions & 0 deletions DarsayTechTest/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// AppDelegate.swift
// DarsayTechTest
//
// Created by Farzaneh on 11/8/1401 AP.
//

import UIKit

@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: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
12 changes: 12 additions & 0 deletions DarsayTechTest/Constant/Constant.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Constant.swift
// DarsayTechTest
//
// Created by Farzaneh on 11/8/1401 AP.
//

import Foundation

enum Constant {
static let imageBaseURL = "https://image.tmdb.org/t/p/"
}
10 changes: 10 additions & 0 deletions DarsayTechTest/Constant/Layout.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Layout.swift
// DarsayTechTest
//
// Created by Farzaneh on 11/8/1401 AP.
//

import Foundation

enum Layout {}
18 changes: 18 additions & 0 deletions DarsayTechTest/Extension/Data.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// Data.swift
// DarsayTechTest
//
// Created by Farzaneh on 11/8/1401 AP.
//

import Foundation

extension Data {
var prettyPrintedJSONString: String? {
guard let object = try? JSONSerialization.jsonObject(with: self, options: []),
let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]),
let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) as String? else { return nil }

return prettyPrintedString
}
}
Loading