Skip to content

Commit

Permalink
violate
Browse files Browse the repository at this point in the history
  • Loading branch information
Zafer Çalışkan committed Feb 27, 2024
1 parent 4b93598 commit 0ab4ea4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 4 additions & 0 deletions SOLID-Practice.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
F03EA6C12B8B6DFE00A6DC4C /* HomeCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03EA6C02B8B6DFE00A6DC4C /* HomeCellProtocol.swift */; };
F03EA6C32B8B6E6000A6DC4C /* NetworkError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03EA6C22B8B6E6000A6DC4C /* NetworkError.swift */; };
F0FF54292B8E4D7700AF1F6D /* SqliteService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0FF54282B8E4D7700AF1F6D /* SqliteService.swift */; };
F0FF542B2B8E703F00AF1F6D /* RepositoryProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0FF542A2B8E703F00AF1F6D /* RepositoryProtocol.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -60,6 +61,7 @@
F03EA6C02B8B6DFE00A6DC4C /* HomeCellProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeCellProtocol.swift; sourceTree = "<group>"; };
F03EA6C22B8B6E6000A6DC4C /* NetworkError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkError.swift; sourceTree = "<group>"; };
F0FF54282B8E4D7700AF1F6D /* SqliteService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SqliteService.swift; sourceTree = "<group>"; };
F0FF542A2B8E703F00AF1F6D /* RepositoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepositoryProtocol.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -237,6 +239,7 @@
isa = PBXGroup;
children = (
F03EA6C02B8B6DFE00A6DC4C /* HomeCellProtocol.swift */,
F0FF542A2B8E703F00AF1F6D /* RepositoryProtocol.swift */,
);
path = Protocols;
sourceTree = "<group>";
Expand Down Expand Up @@ -319,6 +322,7 @@
F03EA6C12B8B6DFE00A6DC4C /* HomeCellProtocol.swift in Sources */,
F03EA6AD2B8AA08A00A6DC4C /* UIResponder+Ext.swift in Sources */,
F03EA6922B8A925500A6DC4C /* NetworkService.swift in Sources */,
F0FF542B2B8E703F00AF1F6D /* RepositoryProtocol.swift in Sources */,
F03EA6A92B8A9FF100A6DC4C /* FavoriteJokeTableViewCell.swift in Sources */,
F03EA67F2B8A904E00A6DC4C /* SOLID_Practice.xcdatamodeld in Sources */,
F03EA6992B8A968F00A6DC4C /* HomeViewModel.swift in Sources */,
Expand Down
17 changes: 17 additions & 0 deletions SOLID-Practice/Protocols/RepositoryProtocol.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// RepositoryProtocol.swift
// SOLID-Practice
//
// Created by Zafer Çalışkan on 27.02.2024.
//

import Foundation

protocol RepositoryService {
func getJokes() -> [JokeModel]
func getJoke(id: String) -> JokeModel?
func getJokeEntity(id: String) -> [JokeEntity]?
func saveJoke(item: JokeModel)
func deleteJoke(item: JokeModel)
func deleteAllData()
}
9 changes: 0 additions & 9 deletions SOLID-Practice/Services/CoreDataService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@

import UIKit

protocol RepositoryService {
func getJokes() -> [JokeModel]
func getJoke(id: String) -> JokeModel?
func getJokeEntity(id: String) -> [JokeEntity]?
func saveJoke(item: JokeModel)
func deleteJoke(item: JokeModel)
func deleteAllData()
}

final class CoreDataService {


Expand Down

0 comments on commit 0ab4ea4

Please sign in to comment.