Skip to content

Commit 27d2578

Browse files
committed
Chapter 13 updated, Chapter 14 reset
1 parent 29f4aeb commit 27d2578

File tree

111 files changed

+1005
-1164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1005
-1164
lines changed

Chapter 13/MyProjectClient/iOS/Sources/Services/Api/MyProject/MyProjectApiService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class MyProjectApiService: ApiServiceInterface {
1919
}
2020

2121
func getBlogPosts() -> AnyPublisher<Page<BlogPostListObject>, HTTP.Error> {
22-
let url = URL(string: self.baseUrl + "/blog/posts")!
22+
let url = URL(string: self.baseUrl + "/blog/posts/")!
2323
var request = URLRequest(url: url)
2424
request.httpMethod = HTTP.Method.get.rawValue.uppercased()
2525

Chapter 14/MyProjectApi/Sources/MyProjectApi/Blog/BlogCategoryObjects.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ public struct BlogCategoryPatchObject: Codable {
4545
self.title = title
4646
}
4747
}
48-

Chapter 14/MyProjectApi/Sources/MyProjectApi/Blog/BlogPostObjects.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ public struct BlogPostPatchObject: Codable {
7777
self.categoryId = categoryId
7878
}
7979
}
80-
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Foundation
2+
3+
public struct UserTokenGetObject: Codable {
4+
5+
public let id: UUID
6+
public let value: String
7+
8+
public init(id: UUID, value: String) {
9+
self.id = id
10+
self.value = value
11+
}
12+
}

Chapter 14/MyProjectApi/Tests/MyProjectApiTests/MyProjectApiTests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import XCTest
22
@testable import MyProjectApi
33

44
final class MyProjectApiTests: XCTestCase {
5+
56
func testExample() {
6-
// This is an example of a functional test case.
7-
// Use XCTAssert and related functions to verify your tests produce the correct
8-
// results.
9-
XCTAssertEqual(MyProjectApi().text, "Hello, World!")
7+
XCTAssertTrue(true)
108
}
119

1210
static var allTests = [

Chapter 14/MyProjectClient/MyProjectClient.xcodeproj/project.pbxproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@
9797
16C6E73524AA232E00F362D4 /* iOS */ = {
9898
isa = PBXGroup;
9999
children = (
100-
16C6E73624AA232E00F362D4 /* Sources */,
101100
16C6E75424AA232E00F362D4 /* Assets */,
101+
16C6E73624AA232E00F362D4 /* Sources */,
102102
);
103103
path = iOS;
104104
sourceTree = "<group>";
@@ -243,15 +243,15 @@
243243
isa = PBXProject;
244244
attributes = {
245245
LastSwiftUpdateCheck = 1150;
246-
LastUpgradeCheck = 1150;
246+
LastUpgradeCheck = 1220;
247247
ORGANIZATIONNAME = "Tibor Bodecs";
248248
TargetAttributes = {
249249
16C6E71D24AA231000F362D4 = {
250250
CreatedOnToolsVersion = 11.5;
251251
};
252252
};
253253
};
254-
buildConfigurationList = 16C6E71924AA231000F362D4 /* Build configuration list for PBXProject "MyProject" */;
254+
buildConfigurationList = 16C6E71924AA231000F362D4 /* Build configuration list for PBXProject "MyProjectClient" */;
255255
compatibilityVersion = "Xcode 9.3";
256256
developmentRegion = en;
257257
hasScannedForEncodings = 0;
@@ -353,6 +353,7 @@
353353
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
354354
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
355355
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
356+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
356357
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
357358
CLANG_WARN_STRICT_PROTOTYPES = YES;
358359
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -413,6 +414,7 @@
413414
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
414415
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
415416
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
417+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
416418
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
417419
CLANG_WARN_STRICT_PROTOTYPES = YES;
418420
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -480,7 +482,7 @@
480482
/* End XCBuildConfiguration section */
481483

482484
/* Begin XCConfigurationList section */
483-
16C6E71924AA231000F362D4 /* Build configuration list for PBXProject "MyProject" */ = {
485+
16C6E71924AA231000F362D4 /* Build configuration list for PBXProject "MyProjectClient" */ = {
484486
isa = XCConfigurationList;
485487
buildConfigurations = (
486488
16C6E73024AA231300F362D4 /* Debug */,

Chapter 14/MyProjectClient/iOS/Sources/Modules/Root/RootInteractor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension RootInteractor: RootInteractorPresenterInterface {
1919
func list() -> AnyPublisher<RootEntity, Error> {
2020
self.services.api.getBlogPosts()
2121
.map { page -> RootEntity in
22-
let domain = "http://localhost:8080"
22+
let domain = "http://127.0.0.1:8080"
2323
return .init(items: page.items.map {
2424
.init(id: $0.id,
2525
title: $0.title,

Chapter 14/MyProjectClient/iOS/Sources/Services/Api/MyProject/MyProjectApiService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class MyProjectApiService: ApiServiceInterface {
1919
}
2020

2121
func getBlogPosts() -> AnyPublisher<Page<BlogPostListObject>, HTTP.Error> {
22-
let url = URL(string: self.baseUrl + "/blog/posts")!
22+
let url = URL(string: self.baseUrl + "/blog/posts/")!
2323
var request = URLRequest(url: url)
2424
request.httpMethod = HTTP.Method.get.rawValue.uppercased()
2525

Chapter 14/MyProjectClient/iOS/Sources/Services/ServiceBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ import Foundation
1111
final class ServiceBuilder: ServiceBuilderInterface {
1212

1313
lazy var api: ApiServiceInterface = {
14-
MyProjectApiService(baseUrl: "http://localhost:8080/api")
14+
MyProjectApiService(baseUrl: "http://127.0.0.1:8080/api")
1515
}()
1616
}

Chapter 14/myProject/.env.development

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)